Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jul 2018 16:50:00 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r474469 - in head: base/gcc devel/powerpc64-gcc
Message-ID:  <201807111650.w6BGo0BS015172@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb (src,doc committer)
Date: Wed Jul 11 16:50:00 2018
New Revision: 474469
URL: https://svnweb.freebsd.org/changeset/ports/474469

Log:
  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

Modified:
  head/base/gcc/Makefile
  head/devel/powerpc64-gcc/Makefile

Modified: head/base/gcc/Makefile
==============================================================================
--- head/base/gcc/Makefile	Wed Jul 11 16:44:34 2018	(r474468)
+++ head/base/gcc/Makefile	Wed Jul 11 16:50:00 2018	(r474469)
@@ -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 \
@@ -60,6 +61,10 @@ ALL_TARGET?=	all-gcc
 INSTALL_TARGET?=	install-gcc
 
 .include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 1200000
+CONFIGURE_ARGS+= --enable-initfini-array
+.endif
 
 .if ${ARCH:Mmips*}
 PLIST_SUB+=	MIPS=""

Modified: head/devel/powerpc64-gcc/Makefile
==============================================================================
--- head/devel/powerpc64-gcc/Makefile	Wed Jul 11 16:44:34 2018	(r474468)
+++ head/devel/powerpc64-gcc/Makefile	Wed Jul 11 16:50:00 2018	(r474469)
@@ -2,6 +2,7 @@
 
 PORTNAME=	gcc
 PORTVERSION=	6.4.0
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	GCC/releases/gcc-${DISTVERSION}
 PKGNAMEPREFIX?=	powerpc64-
@@ -59,6 +60,10 @@ CFLAGS+=	-DCROSS_DIRECTORY_STRUCTURE
 
 .include <bsd.port.options.mk>
 .include <bsd.port.pre.mk>
+
+.if ${GCC_TARGET:M*${OPSYS:tl}*} != ""
+CONFIGURE_ARGS+= --enable-initfini-array
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e '/LIBSTDCXX/ s/stdc\+\+/c\+\+/g ' \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807111650.w6BGo0BS015172>