diff --git a/lang/gcc9-devel/Makefile b/lang/gcc9-devel/Makefile index 4e4ee03ee4ee..93e5a8cef971 100644 --- a/lang/gcc9-devel/Makefile +++ b/lang/gcc9-devel/Makefile @@ -1,158 +1,158 @@ # Created by: Gerald Pfeifer PORTNAME= gcc PORTVERSION= 9.3.1.s20210326 CATEGORIES= lang MASTER_SITES= GCC/snapshots/${DIST_VERSION} PKGNAMESUFFIX= ${SUFFIX}-devel DISTNAME= gcc-${DIST_VERSION} MAINTAINER= gerald@FreeBSD.org COMMENT= GNU Compiler Collection 9 LICENSE= GPLv3 GPLv3RLE LICENSE_COMB= multi -ONLY_FOR_ARCHS= aarch64 amd64 arm armv6 armv7 i386 powerpc powerpc64 sparc64 +ONLY_FOR_ARCHS= aarch64 amd64 arm armv6 armv7 i386 powerpc powerpc64 powerpc64le sparc64 LIB_DEPENDS= libgmp.so:math/gmp \ libmpfr.so:math/mpfr \ libmpc.so:math/mpc BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils RUN_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils .if defined(MAINTAINER_MODE) BUILD_DEPENDS+= runtest:misc/dejagnu .endif USES= compiler cpe gmake iconv libtool makeinfo perl5 tar:xz USE_BINUTILS= yes USE_PERL5= build CONFLICTS= gcc9-9.* CPE_VENDOR= gnu CPE_VERSION= ${GCC_VERSION} # DIST_VERSION relates to downloads, GCC_VERSION and SUFFIX to names # of executables and directories once installed. A PORTVERSION of # Y.2.1.s20140817 results in values of Y-20140817, Y.2.1, and Y # for these three. DIST_VERSION= ${PORTVERSION:C/([0-9]+).*\.s([0-9]+)/\1-\2/} GCC_VERSION= ${PORTVERSION:C/(.+)\.s[0-9]{8}/\1/} SUFFIX= ${PORTVERSION:C/([0-9]+).*/\1/} CFLAGS:= ${CFLAGS:N-mretpoline} CXXFLAGS:= ${CXXFLAGS:N-mretpoline} OPTIONS_DEFINE= BOOTSTRAP OPTIONS_DEFAULT= BOOTSTRAP BOOTSTRAP_DESC= Build using a full bootstrap .if exists(/usr/lib32/libc.so) OPTIONS_DEFINE_amd64+= MULTILIB OPTIONS_DEFAULT_amd64+= MULTILIB OPTIONS_DEFINE_powerpc64+= MULTILIB OPTIONS_DEFAULT_powerpc64+= MULTILIB MULTILIB_DESC= Build support for 32-bit and 64-bit targets MULTILIB_CONFIGURE_ENABLE= multilib .else CONFIGURE_ARGS+= --disable-multilib .endif .include .if ${ARCH} == amd64 CONFIGURE_TARGET= x86_64-portbld-${OPSYS:tl}${OSREL} .elif ${ARCH} == powerpc64 CONFIGURE_ENV+= UNAME_m="powerpc64" . if defined(PPC_ABI) && ${PPC_ABI} == ELFv2 CONFIGURE_ARGS+= --with-abi=elfv2 . else MAKE_ARGS+= CFLAGS_FOR_TARGET="-O0" CXXFLAGS_FOR_TARGET="-O0" BOOT_CFLAGS="-O0" EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libgcc_config_rs6000_t-crtstuff . endif .endif LANGUAGES:= c,c++,objc,fortran TARGLIB= ${PREFIX}/lib/gcc${SUFFIX} TARGLIB32= ${PREFIX}/lib32 # The version information is added later LIBEXEC= ${PREFIX}/libexec/gcc${SUFFIX} GNU_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes .if empty(PORT_OPTIONS:MBOOTSTRAP) CONFIGURE_ARGS+=--disable-bootstrap .else CONFIGURE_ARGS+=--with-build-config=bootstrap-debug ALL_TARGET= bootstrap-lean .endif INSTALL_TARGET= install-strip .if ${UID} != 0 BINMODE= 755 .endif CONFIGURE_ARGS+=--disable-nls \ --enable-gnu-indirect-function \ --enable-plugin \ --libdir=${TARGLIB} \ --libexecdir=${LIBEXEC} \ --program-suffix=${SUFFIX} \ --with-as=${LOCALBASE}/bin/as \ --with-gmp=${LOCALBASE} \ --with-gxx-include-dir=${TARGLIB}/include/c++/ \ --with-ld=${LOCALBASE}/bin/ld \ ${ICONV_CONFIGURE_ARG} \ --with-pkgversion="FreeBSD Ports Collection" \ --with-system-zlib \ --without-zstd MAKE_ARGS+= MAKEINFOFLAGS="--no-split" USE_LDCONFIG= ${TARGLIB} PLIST_SUB+= GCC_VERSION=${GCC_VERSION} \ GNU_HOST=${CONFIGURE_TARGET} \ SUFFIX=${SUFFIX} INFO= gcc${SUFFIX}/cpp \ gcc${SUFFIX}/cppinternals \ gcc${SUFFIX}/gcc \ gcc${SUFFIX}/gccinstall \ gcc${SUFFIX}/gccint \ gcc${SUFFIX}/gfortran \ gcc${SUFFIX}/libgomp .if ${ARCH} == amd64 || ${ARCH} == i386 INFO+= gcc${SUFFIX}/libquadmath \ gcc${SUFFIX}/libitm .endif SUB_FILES= pkg-message SUB_LIST+= TARGLIB=${TARGLIB} CONFIGURE_ARGS+=--enable-languages=${LANGUAGES} pre-everything:: @${ECHO_MSG} "Making GCC ${PORTVERSION} for ${CONFIGURE_TARGET} [${LANGUAGES}]" pre-configure: cd ${WRKSRC} ; contrib/gcc_update --touch @${RM} ${WRKSRC}/gcc/*/*.info* .if defined(MAINTAINER_MODE) full-regression-test: build cd ${TEST_WRKSRC}; ${MAKE_CMD} -sk check \ ; ${WRKSRC}/contrib/test_summary .endif post-stage: ${RM} ${STAGEDIR}${PREFIX}/man/man7/* ${RM} -r ${STAGEDIR}${TARGLIB}/gcc/*/${GCC_VERSION}/include-fixed/ # Add target libraries and include files to packaging list. ${RM} ${WRKDIR}/PLIST.lib .if (${ARCH} == amd64 || ${ARCH} == powerpc64) && ${PORT_OPTIONS:MMULTILIB} ${MKDIR} ${STAGEDIR}${TARGLIB32} ${MV} ${STAGEDIR}${PREFIX}/lib/lib32 ${STAGEDIR}${TARGLIB32}/gcc${SUFFIX} .endif .for d in ${TARGLIB:S/^${PREFIX}\///} ${TARGLIB32:S/^${PREFIX}\///} ${LIBEXEC:S/^${PREFIX}\///} cd ${STAGEDIR}${PREFIX} ; if [ -d $d ]; then \ ${FIND} $d -type f -o -type l >>${WRKDIR}/PLIST.lib ;\ fi .endfor cd ${WRKDIR} ; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST} .include diff --git a/lang/gcc9-devel/files/patch-libcpp_lex.c b/lang/gcc9-devel/files/patch-libcpp_lex.c new file mode 100644 index 000000000000..05ad28872d11 --- /dev/null +++ b/lang/gcc9-devel/files/patch-libcpp_lex.c @@ -0,0 +1,25 @@ +This is + + commit cd547f0ddcd3a54e5b73bcda5ac0f0c46808db8b + Author: Jakub Jelinek + Date: Sat Sep 26 10:07:41 2020 +0200 + +which is on the GCC 10 release branch and thus part of lang/gcc10-devel; +we should automatically get it with GCC 10.3. + +--- libcpp/lex.c.orig 2020-11-02 10:24:50 UTC ++++ libcpp/lex.c +@@ -531,11 +531,11 @@ init_vectorized_lexer (void) + search_line_fast = impl; + } + +-#elif defined(_ARCH_PWR8) && defined(__ALTIVEC__) ++#elif (GCC_VERSION >= 4005) && defined(_ARCH_PWR8) && defined(__ALTIVEC__) + + /* A vection of the fast scanner using AltiVec vectorized byte compares + and VSX unaligned loads (when VSX is available). This is otherwise +- the same as the pre-GCC 5 version. */ ++ the same as the AltiVec version. */ + + ATTRIBUTE_NO_SANITIZE_UNDEFINED + static const uchar *