? diff Index: gcc/config/netbsd-elf.h =================================================================== RCS file: /cvsroot/src/external/gpl3/gcc.old/dist/gcc/config/netbsd-elf.h,v retrieving revision 1.5 diff -u -p -u -r1.5 netbsd-elf.h --- gcc/config/netbsd-elf.h 23 Jul 2017 01:11:03 -0000 1.5 +++ gcc/config/netbsd-elf.h 8 Oct 2017 15:13:05 -0000 @@ -34,10 +34,22 @@ along with GCC; see the file COPYING3. #define NETBSD_STARTFILE_SPEC \ "%{!shared: \ - %{pg:gcrt0%O%s} \ + %{pg: \ + %{pie: \ + %{static:mcrt0%O%s} \ + %{!static:gcrt0%O%s}} \ + %{!pie:gcrt0%O%s}} \ %{!pg: \ - %{p:gcrt0%O%s} \ - %{!p:crt0%O%s}}} \ + %{p: \ + %{pie \ + %{static:mcrt0%O%s} \ + %{!static:gcrt0%O%s}}\ + %{!pie:gcrt0%O%s}} \ + %{!p: \ + %{pie: \ + %{static:rcrt0%O%s} \ + %{!static:crt0%O%s}} \ + %{!pie:crt0%O%s}}}} \ %:if-exists(crti%O%s) \ %{static:%:if-exists-else(crtbeginT%O%s crtbegin%O%s)} \ %{!static: \ @@ -89,7 +101,7 @@ along with GCC; see the file COPYING3. %{rdynamic:-export-dynamic} \ %(netbsd_link_ld_elf_so)} \ %{static:-static \ - %{pie: %(netbsd_link_ld_elf_so)}}} \ + %{pie: -no-dynamic-linker}}} \ %{!nostdlib:%{!nodefaultlibs:\ %{%:sanitize(address): -lasan } \ %{%:sanitize(undefined): -lubsan}}}"