From 196827afe43138fbc5095b454aa386ddba15c4a7 Mon Sep 17 00:00:00 2001 From: marino Date: Thu, 8 Dec 2016 19:32:10 +0000 Subject: lang/gcc5-aux: Fix runpath on NetBSD x86-64 The runpath issue only affected the x86-64 arch on NetBSD. The spec change was only effective on i386, so relocating the change enables the RUNPATH tag in the gcc libraries on the amd64 platform. --- lang/gcc5-aux/Makefile | 10 ++++---- lang/gcc5-aux/Makefile.version | 4 +-- lang/gcc5-aux/files/diff-core | 57 ++++++++++++++++-------------------------- 3 files changed, 28 insertions(+), 43 deletions(-) (limited to 'lang/gcc5-aux') diff --git a/lang/gcc5-aux/Makefile b/lang/gcc5-aux/Makefile index 4cafebe2822..d492a557bf3 100644 --- a/lang/gcc5-aux/Makefile +++ b/lang/gcc5-aux/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2016/12/08 03:31:27 marino Exp $ +# $NetBSD: Makefile,v 1.6 2016/12/08 19:32:10 marino Exp $ # PKGNAME= gcc5-aux-${SNAPSHOT} @@ -109,8 +109,8 @@ MY_CONFIGURE_ENV+= RANLIB=${PREFIX}/bin/granlib . if defined(NATIVE_LINKER) EXTRA_CONFARGS+= --without-gnu-ld --with-ld=${NATIVE_LINKER} . else -EXTRA_CONFARGS+= --with-gnu-ld --with-ld=${PREFIX}/bin/gld.gold -MY_CONFIGURE_ENV+= LD=${PREFIX}/bin/gld.gold +EXTRA_CONFARGS+= --with-gnu-ld --with-ld=${PREFIX}/bin/gld.bfd +MY_CONFIGURE_ENV+= LD=${PREFIX}/bin/gld.bfd . endif .else EXTRA_CONFARGS+= --with-gnu-ld --with-ld=/usr/bin/ld @@ -243,8 +243,8 @@ post-extract: @${ECHO} "Configuring LINK_SPEC runpath" ${PERL5} -pi -e 's;\@PREFIX\@/\@GCCAUX\@;${PREFIX}/gcc5-aux;' \ ${WRKSRC}/gcc/config/dragonfly.h \ - ${WRKSRC}/gcc/config/i386/freebsd.h \ - ${WRKSRC}/gcc/config/i386/netbsd-elf.h + ${WRKSRC}/gcc/config/netbsd-elf.h \ + ${WRKSRC}/gcc/config/i386/freebsd.h .if defined(BOOTSTRAP_TRIPLET) # Bootstrap compiler has statically linked z, gmp, mpc, mpfr and iconv diff --git a/lang/gcc5-aux/Makefile.version b/lang/gcc5-aux/Makefile.version index edf6782d9ed..4050883149f 100644 --- a/lang/gcc5-aux/Makefile.version +++ b/lang/gcc5-aux/Makefile.version @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.version,v 1.5 2016/12/08 03:31:27 marino Exp $ +# $NetBSD: Makefile.version,v 1.6 2016/12/08 19:32:10 marino Exp $ # SNAPSHOT= 20160603 @@ -6,7 +6,7 @@ GCC_BRANCH= 5 GCC_POINT= 4.0 GCC_VERSION= ${GCC_BRANCH}.${GCC_POINT} BUILD_RELEASE= yes -MAIN_PR= 2 +MAIN_PR= 3 .if ${BUILD_RELEASE:Mno} # Snapshot naming pattern diff --git a/lang/gcc5-aux/files/diff-core b/lang/gcc5-aux/files/diff-core index 86a4675b7ce..b1055161a83 100644 --- a/lang/gcc5-aux/files/diff-core +++ b/lang/gcc5-aux/files/diff-core @@ -250,6 +250,27 @@ #endif +#endif } +--- gcc/config/netbsd-elf.h.orig ++++ gcc/config/netbsd-elf.h +@@ -70,6 +70,7 @@ + #define NETBSD_LINK_SPEC_ELF \ + "%{assert*} %{R*} %{rpath*} \ + %{shared:-shared} \ ++ %{!static:-rpath @PREFIX@/@GCCAUX@/lib} \ + %{!shared: \ + -dc -dp \ + %{!nostdlib: \ +@@ -84,3 +85,10 @@ + #ifdef HAVE_LD_AS_NEEDED + #define USE_LD_AS_NEEDED 1 + #endif ++ ++/* Define this to be nonzero if static stack checking is supported. */ ++#define STACK_CHECK_STATIC_BUILTIN 1 ++ ++#if defined(HAVE_LD_EH_FRAME_HDR) ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++#endif --- gcc/config.gcc.orig +++ gcc/config.gcc @@ -1399,12 +1399,16 @@ @@ -287,42 +308,6 @@ esac if test x$gcc_cv_target_dl_iterate_phdr = xyes; then ---- gcc/config/i386/netbsd-elf.h.orig -+++ gcc/config/i386/netbsd-elf.h -@@ -38,7 +38,8 @@ - /* Provide a LINK_SPEC appropriate for a NetBSD/i386 ELF target. */ - - #undef LINK_SPEC --#define LINK_SPEC NETBSD_LINK_SPEC_ELF -+#define LINK_SPEC NETBSD_LINK_SPEC_ELF \ -+"%{!static:-rpath @PREFIX@/@GCCAUX@/lib}" - - #define NETBSD_ENTRY_POINT "__start" - -@@ -121,3 +122,10 @@ - #define HAVE_ENABLE_EXECUTE_STACK - - #define IX86_MAYBE_NO_LIBGCC_TFMODE -+ -+/* Define this to be nonzero if static stack checking is supported. */ -+#define STACK_CHECK_STATIC_BUILTIN 1 -+ -+#if defined(HAVE_LD_EH_FRAME_HDR) -+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " -+#endif ---- gcc/config/i386/netbsd64.h.orig -+++ gcc/config/i386/netbsd64.h -@@ -69,3 +69,10 @@ - #define HAVE_ENABLE_EXECUTE_STACK - - #define IX86_MAYBE_NO_LIBGCC_TFMODE -+ -+/* Define this to be nonzero if static stack checking is supported. */ -+#define STACK_CHECK_STATIC_BUILTIN 1 -+ -+#if defined(HAVE_LD_EH_FRAME_HDR) -+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " -+#endif --- libgcc/crtstuff.c.orig +++ libgcc/crtstuff.c @@ -81,7 +81,7 @@ -- cgit v1.2.3