Changeset View
Changeset View
Standalone View
Standalone View
devel/freebsd-gcc6/Makefile
- This file was copied from devel/powerpc64-gcc/Makefile.
# $FreeBSD: head/devel/powerpc64-gcc/Makefile 515276 2019-10-23 17:44:28Z jhb $ | # $FreeBSD: head/devel/freebsd-gcc6/Makefile 515276 2019-10-23 17:44:28Z jhb $ | ||||
PORTNAME= gcc | PORTNAME= gcc | ||||
PORTVERSION= 6.4.0 | PORTVERSION= 6.4.0 | ||||
PORTREVISION= 7 | |||||
CATEGORIES= devel | CATEGORIES= devel | ||||
MASTER_SITES= GCC/releases/gcc-${DISTVERSION} | MASTER_SITES= GCC/releases/gcc-${DISTVERSION} | ||||
PKGNAMEPREFIX?= powerpc64- | PKGNAMEPREFIX= ${TARGETARCH}- | ||||
PKGNAMESUFFIX= ${SUFFIX} | |||||
MAINTAINER= ports@FreeBSD.org | MAINTAINER= ports@FreeBSD.org | ||||
COMMENT= Cross GNU Compiler Collection for ${PKGNAMEPREFIX:C/-//g} | COMMENT= Cross GNU Compiler Collection for ${TARGETARCH} | ||||
LICENSE= GPLv3 GPLv3RLE | LICENSE= GPLv3 GPLv3RLE | ||||
LICENSE_COMB= multi | LICENSE_COMB= multi | ||||
LIB_DEPENDS= libgmp.so:math/gmp \ | LIB_DEPENDS= libgmp.so:math/gmp \ | ||||
libmpfr.so:math/mpfr \ | libmpfr.so:math/mpfr \ | ||||
libmpc.so:math/mpc | libmpc.so:math/mpc | ||||
BUILD_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils | BUILD_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils | ||||
RUN_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils | RUN_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils | ||||
CONFLICTS= ${TARGETARCH}-gcc | |||||
USES= gmake iconv libtool tar:xz makeinfo compiler:c++11-lang | USES= gmake iconv libtool tar:xz makeinfo compiler:c++11-lang | ||||
PLIST_SUB= TARGETARCH=${PKGNAMEPREFIX:C/-//g} \ | PLIST_SUB= OPSYS=${OPSYS:tl} \ | ||||
OPSYS=${OPSYS:tl} \ | SUFFIX=${SUFFIX} \ | ||||
GCC_TARGET=${GCC_TARGET} \ | GCC_TARGET=${GCC_TARGET} \ | ||||
GCC_VERSION=${PORTVERSION} | GCC_VERSION=${PORTVERSION} | ||||
TARGETARCH= ${PKGNAMEPREFIX:C/-//g} | FLAVORS= aarch64 amd64 i386 mips mips64 powerpc64 sparc64 | ||||
TARGETARCH= ${FLAVOR} | |||||
GCC_TARGET= ${PKGNAMEPREFIX:S/amd64/x86_64/}unknown-${OPSYS:tl}${OSREL} | GCC_TARGET= ${FLAVOR:S/amd64/x86_64/}-unknown-${OPSYS:tl}${OSREL} | ||||
BU_PREFIX?= ${GCC_TARGET} | SUFFIX= ${PORTVERSION:C/([0-9]+).*/\1/} | ||||
BU_PREFIX= ${GCC_TARGET} | |||||
mat: The FLAVORS section goes just after dependencies. | |||||
GNU_CONFIGURE= yes | GNU_CONFIGURE= yes | ||||
CONFIGURE_OUTSOURCE= yes | CONFIGURE_OUTSOURCE= yes | ||||
CONFIGURE_ARGS+=--target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \ | CONFIGURE_ARGS+=--target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \ | ||||
--enable-gnu-indirect-function \ | --enable-gnu-indirect-function \ | ||||
--enable-initfini-array \ | --enable-initfini-array \ | ||||
--program-prefix=${GCC_TARGET}- \ | |||||
--program-suffix=${SUFFIX} \ | |||||
--without-headers \ | --without-headers \ | ||||
--with-gmp=${LOCALBASE} \ | --with-gmp=${LOCALBASE} \ | ||||
--with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \ | --with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \ | ||||
--with-system-zlib \ | --with-system-zlib \ | ||||
--with-gxx-include-dir=/usr/include/c++/v1/ \ | --with-gxx-include-dir=/usr/include/c++/v1/ \ | ||||
--with-sysroot="/" \ | --with-sysroot="/" \ | ||||
--with-as=${LOCALBASE}/bin/${BU_PREFIX}-as \ | --with-as=${LOCALBASE}/bin/${BU_PREFIX}-as \ | ||||
--with-ld=${LOCALBASE}/bin/${BU_PREFIX}-ld | --with-ld=${LOCALBASE}/bin/${BU_PREFIX}-ld | ||||
Show All 16 Lines | |||||
.endif | .endif | ||||
.if ${TARGETARCH} == "armv6" || ${TARGETARCH} == "aarch64" | .if ${TARGETARCH} == "armv6" || ${TARGETARCH} == "aarch64" | ||||
. if ${COMPILER_TYPE} == clang | . if ${COMPILER_TYPE} == clang | ||||
MAKE_ARGS+=CXXFLAGS=-fbracket-depth=512 | MAKE_ARGS+=CXXFLAGS=-fbracket-depth=512 | ||||
. endif | . endif | ||||
.endif | .endif | ||||
# Disable LTO on aarch64 since we force aarch64-binutils to | |||||
# use STATIC | |||||
.if ${TARGETARCH} == "aarch64" | |||||
CONFIGURE_ARGS+= --disable-lto | |||||
PLIST_SUB+= LTO="@comment " | |||||
.else | |||||
PLIST_SUB+= LTO="" | |||||
.endif | |||||
.if ${ARCH} == "aarch64" | .if ${ARCH} == "aarch64" | ||||
PLIST_SUB+= PLUGINS="@comment plugin does not build" | PLIST_SUB+= PLUGINS="@comment plugin does not build" | ||||
.else | .else | ||||
PLIST_SUB+= PLUGINS="" | PLIST_SUB+= PLUGINS="" | ||||
.endif | .endif | ||||
post-install: | .if ${TARGETARCH} == "aarch64" | ||||
PLIST_SUB+= ARM="" | |||||
PLIST_SUB+= AARCH64="" | |||||
.else | |||||
PLIST_SUB+= ARM="@comment " | |||||
PLIST_SUB+= AARCH64="@comment " | |||||
.endif | |||||
.if ${TARGETARCH} == "amd64" || ${TARGETARCH} == "i386" | |||||
PLIST_SUB+= I386="" \ | |||||
linimonUnsubmitted Not Done Inline ActionsI would prefer "X86" to "I386" here (et seq.) to be more consistent with other ports in the tree. linimon: I would prefer "X86" to "I386" here (et seq.) to be more consistent with other ports in the… | |||||
jhbAuthorUnsubmitted Done Inline Actionsbase/gcc already uses I386 in its (nearly identical) plist. If you look at the affected filenames in the plist, most of them have "i386" in the pathname or filename (e.g. config/i386/*). The ARM/AARCH64 naming is somewhat similar in that the 64-bit version installs support for both, but the 32-bit version only includes support for 32-bit. jhb: base/gcc already uses I386 in its (nearly identical) plist. If you look at the affected… | |||||
FLOAT_H="@comment " | |||||
.else | |||||
PLIST_SUB+= I386="@comment " \ | |||||
FLOAT_H="" | |||||
.endif | |||||
.if ${TARGETARCH} == "amd64" | |||||
PLIST_SUB+= AMD64="" | |||||
.else | |||||
PLIST_SUB+= AMD64="@comment " | |||||
.endif | |||||
.if ${TARGETARCH:Mmips*} | |||||
PLIST_SUB+= MIPS="" | |||||
.else | |||||
PLIST_SUB+= MIPS="@comment " | |||||
.endif | |||||
.if ${TARGETARCH:Mpowerpc*} | |||||
PLIST_SUB+= POWERPC="" | |||||
.else | |||||
PLIST_SUB+= POWERPC="@comment " | |||||
.endif | |||||
.if ${TARGETARCH} == "sparc64" | |||||
PLIST_SUB+= SPARC64="" | |||||
.else | |||||
PLIST_SUB+= SPARC64="@comment " | |||||
.endif | |||||
post-install-xx: | |||||
jhbAuthorUnsubmitted Done Inline ActionsOops, I forgot to remove these bits which ended up not being needed (I used the xx target for testing so I could easily undo it if it broke plist stuff) jhb: Oops, I forgot to remove these bits which ended up not being needed (I used the xx target for… | |||||
.for f in cpp gcov gcov-dump gcov-tool | .for f in cpp gcov gcov-dump gcov-tool | ||||
@if [ -f ${STAGEDIR}${PREFIX}/bin/$f ] ; then \ | @if [ -f ${STAGEDIR}${PREFIX}/bin/$f ] ; then \ | ||||
${MV} ${STAGEDIR}${PREFIX}/bin/$f \ | ${MV} ${STAGEDIR}${PREFIX}/bin/$f \ | ||||
${STAGEDIR}${PREFIX}/bin/${GCC_TARGET}-$f ; \ | ${STAGEDIR}${PREFIX}/bin/${GCC_TARGET}-$f ; \ | ||||
fi | fi | ||||
.endfor | .endfor | ||||
.for f in c++ cpp g++ gcc gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool | .for f in c++ cpp g++ gcc gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool | ||||
@if [ ! -f ${STAGEDIR}${PREFIX}/man/man1/${GCC_TARGET}-$f.1 ] ; then \ | @if [ ! -f ${STAGEDIR}${PREFIX}/man/man1/${GCC_TARGET}-$f.1 ] ; then \ | ||||
if [ -f ${STAGEDIR}${PREFIX}/man/man1/$f.1 ] ; then \ | if [ -f ${STAGEDIR}${PREFIX}/man/man1/$f.1 ] ; then \ | ||||
${CP} ${STAGEDIR}${PREFIX}/man/man1/$f.1 \ | ${CP} ${STAGEDIR}${PREFIX}/man/man1/$f.1 \ | ||||
${STAGEDIR}${PREFIX}/man/man1/${GCC_TARGET}-$f.1 ; \ | ${STAGEDIR}${PREFIX}/man/man1/${GCC_TARGET}-$f.1 ; \ | ||||
fi \ | fi \ | ||||
fi | fi | ||||
@${RM} ${STAGEDIR}${PREFIX}/bin/$f | @${RM} ${STAGEDIR}${PREFIX}/bin/$f | ||||
@${RM} ${STAGEDIR}${PREFIX}/man/man1/$f.1 | @${RM} ${STAGEDIR}${PREFIX}/man/man1/$f.1 | ||||
@${RM} ${STAGEDIR}${PREFIX}/man/man1/$f.1.gz | @${RM} ${STAGEDIR}${PREFIX}/man/man1/$f.1.gz | ||||
.endfor | .endfor | ||||
post-install: | |||||
@${RM} ${STAGEDIR}${PREFIX}/bin/${GCC_TARGET}-${GCC_TARGET}-* | |||||
@${RM} ${STAGEDIR}${PREFIX}/share/info/* | @${RM} ${STAGEDIR}${PREFIX}/share/info/* | ||||
@${RM} ${STAGEDIR}${PREFIX}/man/man7/* | @${RM} ${STAGEDIR}${PREFIX}/man/man7/* | ||||
@${RM} -r ${STAGEDIR}${PREFIX}/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include-fixed | @${RM} -r ${STAGEDIR}${PREFIX}/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include-fixed | ||||
.if ${TARGETARCH} == "amd64" || ${TARGETARCH} == "i386" | .if ${TARGETARCH} == "amd64" || ${TARGETARCH} == "i386" | ||||
# Conflicts with sys/x86/include/float.h | # Conflicts with sys/x86/include/float.h | ||||
${RM} ${STAGEDIR}${PREFIX}/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include/float.h | ${RM} ${STAGEDIR}${PREFIX}/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include/float.h | ||||
.endif | .endif | ||||
.include <bsd.port.post.mk> | .include <bsd.port.post.mk> |
The FLAVORS section goes just after dependencies.