Changeset View
Changeset View
Standalone View
Standalone View
devel/psptoolchain-newlib/Makefile
Show All 23 Lines | |||||
USES= gmake makeinfo | USES= gmake makeinfo | ||||
HAS_CONFIGURE= yes | HAS_CONFIGURE= yes | ||||
# psp-gcc doesn't need -march=... in CFLAGS (e.g. set by CPUTYPE in make.conf); also need -g on psp for some reason | # psp-gcc doesn't need -march=... in CFLAGS (e.g. set by CPUTYPE in make.conf); also need -g on psp for some reason | ||||
CONFIGURE_ENV= PATH=${LOCALBASE}/${PSP_GCC_STAGE_PREFIX}/bin:${PATH} \ | CONFIGURE_ENV= PATH=${LOCALBASE}/${PSP_GCC_STAGE_PREFIX}/bin:${PATH} \ | ||||
CFLAGS="${CFLAGS:C/(^|[[:space:]])-march=[^[:space:]]*//g} -g" | CFLAGS="${CFLAGS:C/(^|[[:space:]])-march=[^[:space:]]*//g} -g" | ||||
MAKE_ENV= PATH=${LOCALBASE}/${PSP_GCC_STAGE_PREFIX}/bin:${PATH} | MAKE_ENV= PATH=${LOCALBASE}/${PSP_GCC_STAGE_PREFIX}/bin:${PATH} | ||||
CONFIGURE_ARGS= --prefix=${PREFIX} --target="psp" | CONFIGURE_ARGS= --prefix=${PREFIX} --target="psp" | ||||
SSP_CFLAGS?= -fstack-protector # XXX -strong isn't supported by GCC < 4.9 | |||||
# Disable installation of .info files and fix includedir reference. | # Disable installation of .info files and fix includedir reference. | ||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -E 's/^(install.*:.*)install-info(.*)/\1\2/' ${WRKSRC}/etc/Makefile.in | @${REINPLACE_CMD} -E 's/^(install.*:.*)install-info(.*)/\1\2/' ${WRKSRC}/etc/Makefile.in | ||||
@${REINPLACE_CMD} -E 's#(-I\$$\{prefix}/)psp(/sdk/include)#-I${LOCALBASE}/${PSP_SDK_STAGE_PREFIX:S,/,\\/,}\2#' ${WRKSRC}/newlib/configure.host | @${REINPLACE_CMD} -E 's#(-I\$$\{prefix}/)psp(/sdk/include)#-I${LOCALBASE}/${PSP_SDK_STAGE_PREFIX:S,/,\\/,}\2#' ${WRKSRC}/newlib/configure.host | ||||
# Rename installed crt0.o as real crt0.o used by PSP code comes with psptoolchain-pspsdk-stage2 | # Rename installed crt0.o as real crt0.o used by PSP code comes with psptoolchain-pspsdk-stage2 | ||||
# and would overwrite the one from this port. | # and would overwrite the one from this port. | ||||
post-install: | post-install: | ||||
@${MV} ${STAGEDIR}${PREFIX}/psp/lib/crt0.o ${STAGEDIR}${PREFIX}/psp/lib/crt0.newlib.o | @${MV} ${STAGEDIR}${PREFIX}/psp/lib/crt0.o ${STAGEDIR}${PREFIX}/psp/lib/crt0.newlib.o | ||||
.include <bsd.port.mk> | .include <bsd.port.mk> |