diff --git a/devel/freebsd-gcc12/Makefile b/devel/freebsd-gcc12/Makefile index 9d0d604194f8..477a59e07680 100644 --- a/devel/freebsd-gcc12/Makefile +++ b/devel/freebsd-gcc12/Makefile @@ -1,132 +1,131 @@ PORTNAME= gcc -DISTVERSION= 12.3.0 -PORTREVISION= 2 +DISTVERSION= 12.4.0 CATEGORIES= devel MASTER_SITES= GCC PKGNAMEPREFIX= ${TARGETARCH}- PKGNAMESUFFIX= ${SUFFIX} MAINTAINER= jhb@FreeBSD.org COMMENT= Cross GNU Compiler ${SUFFIX} for FreeBSD/${TARGETARCH} WWW= https://gcc.gnu.org/ LICENSE= GPLv3 GPLv3RLE LICENSE_COMB= multi BUILD_DEPENDS= ${BU_PREFIX}-as:devel/binutils@${BU_FLAVOR} \ objdump:devel/binutils LIB_DEPENDS= libgmp.so:math/gmp \ libmpfr.so:math/mpfr \ libmpc.so:math/mpc RUN_DEPENDS= ${BU_PREFIX}-as:devel/binutils@${BU_FLAVOR} FLAVORS= aarch64 amd64 armv6 armv7 i386 powerpc powerpc64 riscv64 TARGETARCH= ${FLAVOR} USES= compiler:c++11-lang cpe gmake iconv libtool makeinfo tar:xz CPE_VENDOR= gnu PLIST_SUB= OPSYS=${OPSYS:tl} \ SUFFIX=${SUFFIX} \ TARGETARCH=${TARGETARCH} \ GCC_TARGET=${GCC_TARGET} \ GCC_VERSION=${PORTVERSION} SUB_FILES= xtoolchain.mk SUB_LIST= BU_PREFIX=${BU_PREFIX} \ GCC_TARGET=${GCC_TARGET} \ SUFFIX=${SUFFIX} SUFFIX= ${PORTVERSION:C/([0-9]+).*/\1/} GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share CONFIGURE_OUTSOURCE= yes CONFIGURE_ARGS+=--target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \ --enable-gnu-indirect-function \ --enable-initfini-array \ --program-prefix=${GCC_TARGET}- \ --program-suffix=${SUFFIX} \ --without-headers \ --with-gmp=${LOCALBASE} \ --with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \ --with-system-zlib \ --without-zstd \ --with-gxx-libcxx-include-dir=//usr/include/c++/v1 \ --with-sysroot="/" \ --with-as=${LOCALBASE}/bin/${BU_PREFIX}-as \ --with-ld=${LOCALBASE}/bin/${BU_PREFIX}-ld .if ${TARGETARCH:Mpowerpc64*} CONFIGURE_ARGS+=--with-abi=elfv2 .endif CPPFLAGS+= -DLIBCXXABI=NULL ALL_TARGET= all-gcc INSTALL_TARGET= install-gcc .include .if ${TARGETARCH:Marm*} TARGET_ABI= gnueabi BU_FLAVOR= arm_${TARGET_ABI} BU_PREFIX= arm-${TARGET_ABI}-${OPSYS:tl}${OSREL} .else TARGET_ABI= unknown BU_FLAVOR= ${TARGETARCH} BU_PREFIX= ${GCC_TARGET} .endif GCC_TARGET= ${TARGETARCH:S/amd64/x86_64/}-${TARGET_ABI}-${OPSYS:tl}${OSREL} post-patch: @${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} == "amd64" || ${TARGETARCH} == "powerpc64" CONFIGURE_ARGS+=--enable-multilib .endif .if ${ARCH} == "aarch64" PLIST_SUB+= PLUGINS="@comment plugin does not build" .else PLIST_SUB+= PLUGINS="" .endif .if ${TARGETARCH} == "amd64" || ${TARGETARCH} == "i386" PLIST_SUB+= FLOAT_H="@comment " .else PLIST_SUB+= FLOAT_H="" .endif PLIST= ${.CURDIR}/pkg-plist PLISTARCH= ${TARGETARCH:C/armv[67]/arm_gnueabi/} PLIST+= ${.CURDIR}/pkg-plist.${PLISTARCH} .if ${TARGETARCH} == "aarch64" || ${TARGETARCH:Marm*} PLIST+= ${.CURDIR}/pkg-plist.arm .endif .if ${TARGETARCH} == "amd64" PLIST+= ${.CURDIR}/pkg-plist.i386 .endif post-install: ${RM} ${STAGEDIR}${PREFIX}/bin/${GCC_TARGET}-${GCC_TARGET}-* ${RM} ${STAGEDIR}${PREFIX}/share/info/* ${RM} ${STAGEDIR}${PREFIX}/share/man/man7/* ${RM} -r ${STAGEDIR}${PREFIX}/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include-fixed .if ${TARGETARCH} == "amd64" || ${TARGETARCH} == "i386" # Conflicts with sys/x86/include/float.h ${RM} ${STAGEDIR}${PREFIX}/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include/float.h .endif ${MKDIR} ${STAGEDIR}${PREFIX}/share/toolchains/ ${INSTALL_DATA} ${WRKDIR}/xtoolchain.mk \ ${STAGEDIR}${PREFIX}/share/toolchains/${TARGETARCH}-gcc${SUFFIX}.mk .include diff --git a/devel/freebsd-gcc12/distinfo b/devel/freebsd-gcc12/distinfo index 5244e55e1ebf..10f4fd77ca10 100644 --- a/devel/freebsd-gcc12/distinfo +++ b/devel/freebsd-gcc12/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1688234909 -SHA256 (gcc-12.3.0.tar.xz) = 949a5d4f99e786421a93b532b22ffab5578de7321369975b91aec97adfda8c3b -SIZE (gcc-12.3.0.tar.xz) = 85491976 +TIMESTAMP = 1767711919 +SHA256 (gcc-12.4.0.tar.xz) = 704f652604ccbccb14bdabf3478c9511c89788b12cb3bbffded37341916a9175 +SIZE (gcc-12.4.0.tar.xz) = 83377372 diff --git a/devel/freebsd-gcc12/files/patch-gcc_configure b/devel/freebsd-gcc12/files/patch-gcc_configure new file mode 100644 index 000000000000..cc60593ba6f7 --- /dev/null +++ b/devel/freebsd-gcc12/files/patch-gcc_configure @@ -0,0 +1,22 @@ +Enable support for .init_array and .fini_array, which FreeBSD supports +since commit 83aa9cc00c2d83d05a0efe7a1496d8aab4a153bb in the src +repository. + +There __FreeBSD_version is 1000009, so we start enabling the support +from __FreeBSD_version == 1000010. +--- gcc/configure.orig 2023-05-11 22:33:34 UTC ++++ gcc/configure +@@ -24214,6 +24214,13 @@ EOF + #else + # if defined __sun__ && defined __svr4__ + /* Solaris ld.so.1 supports .init_array/.fini_array since Solaris 8. */ ++# elif defined __FreeBSD__ ++# include ++# if __FreeBSD_version >= 1000010 ++ /* FreeBSD supports .init_array/.fini_array since FreeBSD 10. */ ++# else ++# error The C library not known to support .init_array/.fini_array ++# endif + # else + # error The C library not known to support .init_array/.fini_array + # endif diff --git a/devel/freebsd-gcc12/files/patch-gcc_system.h b/devel/freebsd-gcc12/files/patch-gcc_system.h deleted file mode 100644 index 5322885b8b2e..000000000000 --- a/devel/freebsd-gcc12/files/patch-gcc_system.h +++ /dev/null @@ -1,42 +0,0 @@ ---- gcc/system.h.orig 2023-05-08 12:14:40 UTC -+++ gcc/system.h -@@ -203,19 +203,6 @@ extern int fprintf_unlocked (FILE *, const char *, ... - #endif - #endif - --/* There are an extraordinary number of issues with . -- The last straw is that it varies with the locale. Use libiberty's -- replacement instead. */ --#include "safe-ctype.h" -- --#include -- --#include -- --#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO --extern int errno; --#endif -- - #ifdef __cplusplus - #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY) - # include -@@ -243,6 +230,19 @@ extern int errno; - # include - # include - # include -+#endif -+ -+/* There are an extraordinary number of issues with . -+ The last straw is that it varies with the locale. Use libiberty's -+ replacement instead. */ -+#include "safe-ctype.h" -+ -+#include -+ -+#include -+ -+#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO -+extern int errno; - #endif - - /* Some of glibc's string inlines cause warnings. Plus we'd rather