aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2018-07-11 16:50:00 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2018-07-11 16:50:00 +0000
commit9b66924988bfaf1c9a4c87842cd2bf2322d4d457 (patch)
tree87494318e879a973effe8750581e857eca1b98d6 /base
parentaf3ce47a68cfa81e0a1d783345c5b03959223dfe (diff)
downloadports-9b66924988bfaf1c9a4c87842cd2bf2322d4d457.tar.gz
ports-9b66924988bfaf1c9a4c87842cd2bf2322d4d457.zip
Enable .init_array and .fini_array with xtoolchain GCC.
For base/gcc, only enable .init_array and .fini_array for 12.0 and later to match the policy used by clang and llvm. For the xtoolchain ports, enable these unconditionally since the only OS version handy is the OS version of the build host, not the target OS to be built. Unlike llvm, the use of .init_array and .fini_array is set at compile-time for GCC and can't be changed at runtime. Bump PORTREVISION for base/gcc and the xtoolchain GCC ports. Reviewed by: bapt (earlier version) Differential Revision: https://reviews.freebsd.org/D16014
Notes
Notes: svn path=/head/; revision=474469
Diffstat (limited to 'base')
-rw-r--r--base/gcc/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/gcc/Makefile b/base/gcc/Makefile
index 7c807974a213..47ea555a0296 100644
--- a/base/gcc/Makefile
+++ b/base/gcc/Makefile
@@ -2,6 +2,7 @@
PORTNAME= gcc
PORTVERSION= 6.4.0
+PORTREVISION= 1
CATEGORIES= base
MASTER_SITES= GCC/releases/gcc-${DISTVERSION} \
http://www.mpfr.org/mpfr-3.1.6/:mpfr \
@@ -61,6 +62,10 @@ INSTALL_TARGET?= install-gcc
.include <bsd.port.pre.mk>
+.if ${OSVERSION} >= 1200000
+CONFIGURE_ARGS+= --enable-initfini-array
+.endif
+
.if ${ARCH:Mmips*}
PLIST_SUB+= MIPS=""
.else