Index: head/base/gcc/Makefile =================================================================== --- head/base/gcc/Makefile (revision 491172) +++ head/base/gcc/Makefile (revision 491173) @@ -1,123 +1,124 @@ # $FreeBSD$ PORTNAME= gcc PORTVERSION= 6.4.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= base MASTER_SITES= GCC/releases/gcc-${DISTVERSION} \ http://www.mpfr.org/mpfr-3.1.6/:mpfr \ http://www.mpfr.org/mpfr-current/:mpfr \ GNU/gmp:gmp \ https://ftp.gnu.org/gnu/mpc/:mpc DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} \ mpfr-3.1.6.tar.xz:mpfr \ gmp-6.1.2.tar.xz:gmp \ mpc-1.0.3.tar.gz:mpc PKGNAMEPREFIX= ${OPSYS:tl}- MAINTAINER= bapt@FreeBSD.org COMMENT= GNU Compiler Collection LICENSE= GPLv3 GPLv3RLE LICENSE_COMB= multi .if !defined(CROSS_TOOLCHAIN) .error Please define CROSS_TOOLCHAIN before building .endif .if !defined(CROSS_SYSROOT) .error Please define CROSS_SYSROOT before building .endif TARGETARCH= ${ARCH:S/amd64/x86_64/} GCC_TARGET= ${TARGETARCH}-unknown-${OPSYS:tl}${OSREL} PREFIX= /usr CONFIGURE_ENV= NM=/usr/bin/nm \ AS_FOR_TARGET=/usr/bin/as \ LD_FOR_TARGET=/usr/bin/ld \ NM_FOR_TARGET=/usr/bin/nm USES= gmake libtool tar:xz makeinfo PLIST_SUB= TARGETARCH=${TARGETARCH} \ OPSYS=${OPSYS:tl} \ GCC_TARGET=${GCC_TARGET} \ GCC_VERSION=${PORTVERSION} EXTRA_PATCHES+= ${.CURDIR}/../../devel/powerpc64-gcc/files/freebsd-format-extensions +EXTRA_PATCHES+= ${.CURDIR}/../../devel/powerpc64-gcc/files/freebsd-libdir EXTRA_PATCHES+= ${.CURDIR}/../../devel/powerpc64-gcc/files/patch-gcc-freebsd-mips GNU_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes CONFIGURE_ARGS+= \ --target=${GCC_TARGET} \ --enable-languages=c,c++ \ --enable-gnu-indirect-function \ --disable-nls \ --without-headers \ --with-gxx-include-dir=/usr/include/c++/v1/ \ --with-build-sysroot=${CROSS_SYSROOT} \ -with-pkgversion="GNU Collection for FreeBSD" ALL_TARGET?= all-gcc INSTALL_TARGET?= install-gcc .include .if ${OSVERSION} >= 1200000 CONFIGURE_ARGS+= --enable-initfini-array .endif .if ${ARCH} == "amd64" || ${ARCH} == "i386" PLIST_SUB+= I386="" \ FLOAT_H="@comment " .else PLIST_SUB+= I386="@comment " \ FLOAT_H="" .endif .if ${ARCH} == "amd64" PLIST_SUB+= AMD64="" .else PLIST_SUB+= AMD64="@comment " .endif .if ${ARCH:Mmips*} PLIST_SUB+= MIPS="" .else PLIST_SUB+= MIPS="@comment " .endif .if ${ARCH:Mpowerpc*} PLIST_SUB+= POWERPC="" .else PLIST_SUB+= POWERPC="@comment " .endif post-extract: cd ${WRKSRC}; ${LN} -sf ../mpfr-3.1.6 mpfr ; \ ${LN} -sf ../gmp-6.1.2 gmp ; \ ${LN} -sf ../mpc-1.0.3 mpc post-patch: @${REINPLACE_CMD} -e '/LIBSTDCXX/ s/stdc\+\+/c\+\+/g ' \ ${WRKSRC}//gcc/cp/g++spec.c @${REINPLACE_CMD} -e '/LOCAL_INCLUDE_DIR/ d ' \ ${WRKSRC}//gcc/Makefile.in post-install: ${MV} -f ${STAGEDIR}/usr/bin/gcov-tool ${STAGEDIR}/usr/bin/${GCC_TARGET}-gcov-tool ; \ for tool in cpp gcc g++ gcov; do \ ${MV} -f ${STAGEDIR}/usr/bin/$${tool} ${STAGEDIR}/usr/bin/${GCC_TARGET}-$${tool} ; \ ${LN} -sf ${GCC_TARGET}-$${tool} ${STAGEDIR}/usr/bin/$${tool} ; \ ${MV} -f ${STAGEDIR}/${MANDIR}1/$${tool}.1 ${STAGEDIR}/${MANDIR}1/${GCC_TARGET}-$${tool}.1 ; \ ${GZIP_CMD} ${STAGEDIR}/${MANDIR}1/${GCC_TARGET}-$${tool}.1 ; \ ${LN} -sf ${GCC_TARGET}-$${tool}.1.gz ${STAGEDIR}/${MANDIR}1/$${tool}.1.gz ; \ done ; \ ${LN} -sf ${GCC_TARGET}-g++ ${STAGEDIR}/usr/bin/c++ ; \ ${LN} -sf ${GCC_TARGET}-g++.1.gz ${STAGEDIR}/${MANDIR}1/c++.1.gz ${LN} -sf ${GCC_TARGET}-gcc ${STAGEDIR}/usr/bin/cc ; \ ${LN} -sf ${GCC_TARGET}-gcc.1.gz ${STAGEDIR}/${MANDIR}1/cc.1.gz ${RM} -r ${STAGEDIR}/usr/share/info ${RM} -r ${STAGEDIR}/usr/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include-fixed .if ${ARCH} == "amd64" || ${ARCH} == "i386" ${RM} ${STAGEDIR}/usr/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include/float.h .endif .include Index: head/devel/powerpc64-gcc/Makefile =================================================================== --- head/devel/powerpc64-gcc/Makefile (revision 491172) +++ head/devel/powerpc64-gcc/Makefile (revision 491173) @@ -1,115 +1,113 @@ # $FreeBSD$ PORTNAME= gcc PORTVERSION= 6.4.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel MASTER_SITES= GCC/releases/gcc-${DISTVERSION} PKGNAMEPREFIX?= powerpc64- MAINTAINER= kan@FreeBSD.org COMMENT= Cross GNU Compiler Collection for ${PKGNAMEPREFIX:C/-//g} LICENSE= GPLv3 GPLv3RLE LICENSE_COMB= multi LIB_DEPENDS= libgmp.so:math/gmp \ libmpfr.so:math/mpfr \ libmpc.so:math/mpc BUILD_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils RUN_DEPENDS= ${BU_PREFIX}-as:devel/${PKGNAMEPREFIX}binutils USES= gmake iconv libtool tar:xz makeinfo compiler:c++11-lang PLIST_SUB= TARGETARCH=${PKGNAMEPREFIX:C/-//g} \ OPSYS=${OPSYS:tl} \ GCC_TARGET=${GCC_TARGET} \ GCC_VERSION=${PORTVERSION} TARGETARCH= ${PKGNAMEPREFIX:C/-//g:S/amd64/x86_64/} .if empty(GCC_TARGET) # We are building for a FreeBSD target GCC_TARGET= ${PKGNAMEPREFIX:S/amd64/x86_64/}unknown-${OPSYS:tl}${OSREL} -EXTRA_PATCHES+= ${FILESDIR}/freebsd-format-extensions +EXTRA_PATCHES+= ${FILESDIR}/freebsd-format-extensions \ + ${FILESDIR}/freebsd-libdir .endif BU_PREFIX?= ${GCC_TARGET} GNU_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes CONFIGURE_ARGS+=--target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \ --enable-gnu-indirect-function \ --without-headers \ --with-gmp=${LOCALBASE} \ --with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \ --with-system-zlib \ --with-gxx-include-dir=/usr/include/c++/v1/ \ --with-sysroot="/" \ --with-as=${LOCALBASE}/bin/${BU_PREFIX}-as \ --with-ld=${LOCALBASE}/bin/${BU_PREFIX}-ld ALL_TARGET?= all-gcc INSTALL_TARGET?= install-gcc - -# Force build of a cross compiler even if the target matches the host. -CFLAGS+= -DCROSS_DIRECTORY_STRUCTURE .include .include .if ${GCC_TARGET:M*${OPSYS:tl}*} != "" CONFIGURE_ARGS+= --enable-initfini-array .endif post-patch: @${REINPLACE_CMD} -e '/LIBSTDCXX/ s/stdc\+\+/c\+\+/g ' \ ${WRKSRC}//gcc/cp/g++spec.c @${REINPLACE_CMD} -e '/LOCAL_INCLUDE_DIR/ d ' \ ${WRKSRC}//gcc/Makefile.in .if ${ARCH} == "amd64" CONFIGURE_TARGET= x86_64-unknown-${OPSYS:tl}${OSREL} .else CONFIGURE_TARGET= ${ARCH}-unknown-${OPSYS:tl}${OSREL} .endif .if ${TARGETARCH} == "armv6" || ${TARGETARCH} == "aarch64" . if ${COMPILER_TYPE} == clang MAKE_ARGS+=CXXFLAGS=-fbracket-depth=512 . endif .endif .if ${ARCH} == "aarch64" PLIST_SUB+= PLUGINS="@comment plugin does not build" .else PLIST_SUB+= PLUGINS="" .endif post-install: .for f in cpp gcov gcov-dump gcov-tool @if [ -f ${STAGEDIR}${PREFIX}/bin/$f ] ; then \ ${MV} ${STAGEDIR}${PREFIX}/bin/$f \ ${STAGEDIR}${PREFIX}/bin/${GCC_TARGET}-$f ; \ fi .endfor .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/$f.1 ] ; then \ ${CP} ${STAGEDIR}${PREFIX}/man/man1/$f.1 \ ${STAGEDIR}${PREFIX}/man/man1/${GCC_TARGET}-$f.1 ; \ fi \ fi @${RM} ${STAGEDIR}${PREFIX}/bin/$f @${RM} ${STAGEDIR}${PREFIX}/man/man1/$f.1 @${RM} ${STAGEDIR}${PREFIX}/man/man1/$f.1.gz .endfor @${RM} ${STAGEDIR}${PREFIX}/share/info/* @${RM} ${STAGEDIR}${PREFIX}/man/man7/* .if empty(PKGNAMEPREFIX:M*-*-) @${RM} -r ${STAGEDIR}${PREFIX}/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include-fixed .endif .if ${TARGETARCH} == "amd64" || ${TARGETARCH} == "i386" # Conflicts with sys/x86/include/float.h ${RM} ${STAGEDIR}${PREFIX}/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include/float.h .endif .include Index: head/devel/powerpc64-gcc/files/freebsd-libdir =================================================================== --- head/devel/powerpc64-gcc/files/freebsd-libdir (nonexistent) +++ head/devel/powerpc64-gcc/files/freebsd-libdir (revision 491173) @@ -0,0 +1,43 @@ +diff --git gcc/config/freebsd.h gcc/config/freebsd.h +index e7ea42370c5..191e7da2071 100644 +--- gcc/config/freebsd.h ++++ gcc/config/freebsd.h +@@ -44,6 +44,9 @@ along with GCC; see the file COPYING3. If not see + #undef LIB_SPEC + #define LIB_SPEC FBSD_LIB_SPEC + ++#undef STARTFILE_PREFIX_SPEC ++#define STARTFILE_PREFIX_SPEC "/usr/lib/ " ++ + #if defined(HAVE_LD_EH_FRAME_HDR) + #define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} " + #endif +diff --git gcc/gcc.c gcc/gcc.c +index f70755679f4..890ef20fd43 100644 +--- gcc/gcc.c ++++ gcc/gcc.c +@@ -4298,10 +4298,12 @@ process_command (unsigned int decoded_options_count, + } + + set_std_prefix (gcc_exec_prefix, len); ++#if 0 + add_prefix (&exec_prefixes, gcc_libexec_prefix, "GCC", + PREFIX_PRIORITY_LAST, 0, 0); + add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC", + PREFIX_PRIORITY_LAST, 0, 0); ++#endif + } + + /* COMPILER_PATH and LIBRARY_PATH have values +@@ -4585,9 +4587,11 @@ process_command (unsigned int decoded_options_count, + add_prefix (&exec_prefixes, + concat (tooldir_prefix, "bin", dir_separator_str, NULL), + "BINUTILS", PREFIX_PRIORITY_LAST, 0, 0); ++#if 0 + add_prefix (&startfile_prefixes, + concat (tooldir_prefix, "lib", dir_separator_str, NULL), + "BINUTILS", PREFIX_PRIORITY_LAST, 0, 1); ++#endif + free (tooldir_prefix); + + #if defined(TARGET_SYSTEM_ROOT_RELOCATABLE) && !defined(VMS) Property changes on: head/devel/powerpc64-gcc/files/freebsd-libdir ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property