1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00

Add the needed changes for amd64-gcc to build

Reported by:	antoine
Pointyhat:	bapt
This commit is contained in:
Baptiste Daroussin 2014-11-30 09:16:15 +00:00
parent 80cb93461c
commit 4a36f4df76
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=373658
2 changed files with 32 additions and 7 deletions

View File

@ -30,12 +30,16 @@ WRKSRC= ${WRKDIR}/build-gcc
.if empty(GCC_TARGET)
# We are building for a FreeBSD target
GCC_TARGET= ${PKGNAMEPREFIX}portbld-${OPSYS:tl}${OSREL}
BU_PREFIX= ${PKGNAMEPREFIX}${OPSYS:tl}
GCC_TARGET?= ${PKGNAMEPREFIX}portbld-${OPSYS:tl}${OSREL}
BU_PREFIX?= ${PKGNAMEPREFIX}${OPSYS:tl}
EXTRA_PATCHES+= ${FILESDIR}/freebsd-format-extensions
.else
BU_PREFIX= ${GCC_TARGET}
BU_PREFIX?= ${GCC_TARGET}
.if defined(FREEBSD_EXTENSION)
EXTRA_PATCHES+= ${FILESDIR}/freebsd-format-extensions
.endif
.endif
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \
--without-headers \
@ -50,10 +54,26 @@ CONFIGURE_SCRIPT= ../${PORTNAME}-${PORTVERSION}/configure
ALL_TARGET= all-gcc
INSTALL_TARGET= install-gcc
.include <bsd.port.options.mk>
.if ${ARCH} == "amd64"
CONFIGURE_TARGET= x86_64-portbld-${OPSYS:tl}${OSREL}
.else
CONFIGURE_TARGET= ${ARCH}-portbld-${OPSYS:tl}${OSREL}
.endif
post-extract:
@${MKDIR} ${WRKSRC}
post-stage:
@if [ -f ${STAGEDIR}${PREFIX}/bin/cpp ] ; then \
mv ${STAGEDIR}${PREFIX}/bin/cpp \
${STAGEDIR}${PREFIX}/bin/${GCC_TARGET}-cpp ; \
fi
.for f in c++ cpp g++ gcc gcc-ar gcc-nm gcc-ranlib gcov
@${RM} ${STAGEDIR}${PREFIX}/bin/$f
@${RM} ${STAGEDIR}${PREFIX}/man/man1/$f.1.gz
.endfor
@${RM} ${STAGEDIR}${PREFIX}/info/*
@${RM} ${STAGEDIR}${PREFIX}/man/man7/*

View File

@ -13,15 +13,20 @@ COMMENT= Pre seeded toolchain to cross build FreeBSD base
NO_BUILD= yes
XCC?= ${PKGNAMEPREFIX}portbld-${OPSYS:tl}${OSREL}-gcc
XCXX?= ${PKGNAMEPREFIX}portbld-${OPSYS:tl}${OSREL}-g++
XCPP?= ${PKGNAMEPREFIX}portbld-${OPSYS:tl}${OSREL}-cpp
.if ${PKGNAMEPREFIX} == "amd64-"
TOOLCHAIN_PREFIX= x86_64-
.else
TOOLCHAIN_PREFIX= ${PKGNAMEPREFIX}
.endif
XCC?= ${TOOLCHAIN_PREFIX}portbld-${OPSYS:tl}${OSREL}-gcc
XCXX?= ${TOOLCHAIN_PREFIX}portbld-${OPSYS:tl}${OSREL}-g++
XCPP?= ${TOOLCHAIN_PREFIX}portbld-${OPSYS:tl}${OSREL}-cpp
X_COMPILER_TYPE?= ${PKGNAMESUFFIX:C/-//g}
RUN_DEPENDS?= ${XCC}:${PORTSDIR}/devel/${PKGNAMEPREFIX}${X_COMPILER_TYPE}
SUB_FILES= xtoolchain.mk
SUB_LIST= TARGETARCH=${PKGNAMEPREFIX:C/-//g} \
SUB_LIST= TARGETARCH=${TOOLCHAIN_PREFIX:C/-//g} \
OPSYS=${OPSYS:tl} \
XCC=${XCC} \
XCXX=${XCXX} \