pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/gcc5-aux lang/gcc5-aux: Fix runpath on NetBSD x86-64



details:   https://anonhg.NetBSD.org/pkgsrc/rev/825282cb6d0b
branches:  trunk
changeset: 355649:825282cb6d0b
user:      marino <marino%pkgsrc.org@localhost>
date:      Thu Dec 08 19:32:10 2016 +0000

description:
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.

diffstat:

 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(-)

diffs (123 lines):

diff -r 8a4dd76f1ff5 -r 825282cb6d0b lang/gcc5-aux/Makefile
--- a/lang/gcc5-aux/Makefile    Thu Dec 08 16:58:50 2016 +0000
+++ b/lang/gcc5-aux/Makefile    Thu Dec 08 19:32:10 2016 +0000
@@ -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 @@
 .  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 @@
        @${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 -r 8a4dd76f1ff5 -r 825282cb6d0b lang/gcc5-aux/Makefile.version
--- a/lang/gcc5-aux/Makefile.version    Thu Dec 08 16:58:50 2016 +0000
+++ b/lang/gcc5-aux/Makefile.version    Thu Dec 08 19:32:10 2016 +0000
@@ -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_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 -r 8a4dd76f1ff5 -r 825282cb6d0b lang/gcc5-aux/files/diff-core
--- a/lang/gcc5-aux/files/diff-core     Thu Dec 08 16:58:50 2016 +0000
+++ b/lang/gcc5-aux/files/diff-core     Thu Dec 08 19:32:10 2016 +0000
@@ -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 @@



Home | Main Index | Thread Index | Old Index