Module Name:    src
Committed By:   mrg
Date:           Fri Oct 21 07:24:30 UTC 2016

Modified Files:
        src/external/gpl3/gcc/dist/gcc/config: netbsd-elf.h

Log Message:
basic support for -static -pie:  use -dynamic-linker.
doesn't work for all ports (reloc startup issues.)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.10 src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.11
--- src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.10	Fri Aug 19 05:11:09 2016
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h	Fri Oct 21 07:24:30 2016
@@ -73,6 +73,9 @@ along with GCC; see the file COPYING3.  
 
    Target-specific code must provide the %(netbsd_entry_point) spec.  */
 
+#define NETBSD_LINK_LD_ELF_SO_SPEC \
+  "%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}"
+
 #define NETBSD_LINK_SPEC_ELF \
   "%{assert*} %{R*} %{rpath*} \
    %{shared:-shared} \
@@ -84,14 +87,16 @@ along with GCC; see the file COPYING3.  
 	 %{!e*:-e %(netbsd_entry_point)}}} \
      %{!static: \
        %{rdynamic:-export-dynamic} \
-       -dynamic-linker /usr/libexec/ld.elf_so} \
-     %{static:-static}} \
+       %(netbsd_link_ld_elf_so)} \
+     %{static:-static \
+       %{pie: %(netbsd_link_ld_elf_so)}}} \
    %{!nostdlib:%{!nodefaultlibs:\
      %{%:sanitize(address): -lasan } \
      %{%:sanitize(undefined): -lubsan}}}"
 
 /* Provide the standard list of subtarget extra specs for NetBSD targets.  */
 #define NETBSD_SUBTARGET_EXTRA_SPECS \
+  { "netbsd_link_ld_elf_so",    NETBSD_LINK_LD_ELF_SO_SPEC }, \
   { "netbsd_cpp_spec",          NETBSD_CPP_SPEC }, \
   { "netbsd_link_spec",         NETBSD_LINK_SPEC_ELF }, \
   { "netbsd_entry_point",       NETBSD_ENTRY_POINT }, \

Reply via email to