diff options
author | 2015-04-02 11:54:27 +0000 | |
---|---|---|
committer | 2015-04-02 11:54:27 +0000 | |
commit | c3b5dcdca6b08f955c4630e618d2f84717fe3602 (patch) | |
tree | 023ec64dbbb7fb82840e82c91512c1ae3111cb4e | |
parent | Merge openpic_init() into openpic_attach(), no functional change. (diff) | |
download | wireguard-openbsd-c3b5dcdca6b08f955c4630e618d2f84717fe3602.tar.xz wireguard-openbsd-c3b5dcdca6b08f955c4630e618d2f84717fe3602.zip |
Change gcc and ld semantics to make static PIE the default when invoking
'cc -static'. To explicitly request the legacy behaviour, use -nopie.
For the few port affected by this, bumps will follow shortly.
looks good to kettenis@, ok kurt@
-rw-r--r-- | gnu/gcc/gcc/config/alpha/openbsd.h | 4 | ||||
-rw-r--r-- | gnu/gcc/gcc/config/i386/openbsd64.h | 4 | ||||
-rw-r--r-- | gnu/gcc/gcc/config/i386/openbsdelf.h | 4 | ||||
-rw-r--r-- | gnu/gcc/gcc/config/mips/openbsd.h | 3 | ||||
-rw-r--r-- | gnu/gcc/gcc/config/pa/openbsd.h | 4 | ||||
-rw-r--r-- | gnu/gcc/gcc/config/rs6000/sysv4.h | 2 | ||||
-rw-r--r-- | gnu/gcc/gcc/config/sh/openbsd.h | 4 | ||||
-rw-r--r-- | gnu/gcc/gcc/config/sparc/openbsd64.h | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/ld/lexsup.c | 2 |
9 files changed, 15 insertions, 16 deletions
diff --git a/gnu/gcc/gcc/config/alpha/openbsd.h b/gnu/gcc/gcc/config/alpha/openbsd.h index 552b346beac..287779fb058 100644 --- a/gnu/gcc/gcc/config/alpha/openbsd.h +++ b/gnu/gcc/gcc/config/alpha/openbsd.h @@ -39,8 +39,8 @@ Boston, MA 02110-1301, USA. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "\ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \ - %{!p:%{!static:crt0%O%s} %{static:%{pie:rcrt0%O%s} %{!pie:crt0%O%s}}}} \ - crtbegin%O%s} %{shared:crtbeginS%O%s}" + %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \ + %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" diff --git a/gnu/gcc/gcc/config/i386/openbsd64.h b/gnu/gcc/gcc/config/i386/openbsd64.h index 7984fe61a8f..5a5584bd588 100644 --- a/gnu/gcc/gcc/config/i386/openbsd64.h +++ b/gnu/gcc/gcc/config/i386/openbsd64.h @@ -45,8 +45,8 @@ Boston, MA 02111-1307, USA. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "\ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \ - %{!p:%{!static:crt0%O%s} %{static:%{pie:rcrt0%O%s} %{!pie:crt0%O%s}}}} \ - crtbegin%O%s} %{shared:crtbeginS%O%s}" + %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \ + %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" diff --git a/gnu/gcc/gcc/config/i386/openbsdelf.h b/gnu/gcc/gcc/config/i386/openbsdelf.h index b0e86a62394..5832f64cc76 100644 --- a/gnu/gcc/gcc/config/i386/openbsdelf.h +++ b/gnu/gcc/gcc/config/i386/openbsdelf.h @@ -48,8 +48,8 @@ Boston, MA 02110-1301, USA. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "\ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \ - %{!p:%{!static:crt0%O%s} %{static:%{pie:rcrt0%O%s} %{!pie:crt0%O%s}}}} \ - crtbegin%O%s} %{shared:crtbeginS%O%s}" + %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \ + %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" diff --git a/gnu/gcc/gcc/config/mips/openbsd.h b/gnu/gcc/gcc/config/mips/openbsd.h index d5f4812b260..5109cc99e12 100644 --- a/gnu/gcc/gcc/config/mips/openbsd.h +++ b/gnu/gcc/gcc/config/mips/openbsd.h @@ -138,7 +138,8 @@ Boston, MA 02110-1301, USA. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "\ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \ - %{!p:%{!static:crt0%O%s} %{static:%{pie:rcrt0%O%s} %{!pie:crt0%O%s}}}} \ + %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \ + %{!nopie:rcrt0%O%s}}}} \ crtbegin%O%s} %{shared:crtbeginS%O%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" diff --git a/gnu/gcc/gcc/config/pa/openbsd.h b/gnu/gcc/gcc/config/pa/openbsd.h index 9bb1e573239..1658138f86b 100644 --- a/gnu/gcc/gcc/config/pa/openbsd.h +++ b/gnu/gcc/gcc/config/pa/openbsd.h @@ -188,7 +188,7 @@ Boston, MA 02111-1307, USA. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "\ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \ - %{!p:%{!static:crt0%O%s} %{static:%{pie:rcrt0%O%s} %{!pie:crt0%O%s}}}} \ - crtbegin%O%s} %{shared:crtbeginS%O%s}" + %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \ + %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" diff --git a/gnu/gcc/gcc/config/rs6000/sysv4.h b/gnu/gcc/gcc/config/rs6000/sysv4.h index 6a800b61438..8a4b27eec09 100644 --- a/gnu/gcc/gcc/config/rs6000/sysv4.h +++ b/gnu/gcc/gcc/config/rs6000/sysv4.h @@ -974,7 +974,7 @@ ncrtn.o%s" #ifndef STARTFILE_OPENBSD_SPEC #define STARTFILE_OPENBSD_SPEC "\ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \ -%{!p:%{!static:crt0%O%s} %{static:%{pie:rcrt0%O%s} %{!pie:crt0%O%s}}}} \ +%{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} %{!nopie:rcrt0%O%s}}}} \ crtbegin%O%s} %{shared:crtbeginS%O%s}" #endif diff --git a/gnu/gcc/gcc/config/sh/openbsd.h b/gnu/gcc/gcc/config/sh/openbsd.h index cb665a2dd3d..59dd3ded5a1 100644 --- a/gnu/gcc/gcc/config/sh/openbsd.h +++ b/gnu/gcc/gcc/config/sh/openbsd.h @@ -91,8 +91,8 @@ Boston, MA 02110-1301, USA. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "\ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \ - %{!p:%{!static:crt0%O%s} %{static:%{pie:rcrt0%O%s} %{!pie:crt0%O%s}}}} \ - crtbegin%O%s} %{shared:crtbeginS%O%s}" + %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \ + %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" diff --git a/gnu/gcc/gcc/config/sparc/openbsd64.h b/gnu/gcc/gcc/config/sparc/openbsd64.h index 00480796a2a..6a69aa435f2 100644 --- a/gnu/gcc/gcc/config/sparc/openbsd64.h +++ b/gnu/gcc/gcc/config/sparc/openbsd64.h @@ -96,8 +96,8 @@ Boston, MA 02110-1301, USA. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "\ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \ - %{!p:%{!static:crt0%O%s} %{static:%{pie:rcrt0%O%s} %{!pie:crt0%O%s}}}} \ - crtbegin%O%s} %{shared:crtbeginS%O%s}" + %{!p:%{!static:crt0%O%s} %{static:%{nopie:crt0%O%s} \ + %{!nopie:rcrt0%O%s}}}} crtbegin%O%s} %{shared:crtbeginS%O%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" diff --git a/gnu/usr.bin/binutils/ld/lexsup.c b/gnu/usr.bin/binutils/ld/lexsup.c index 68384f4330f..dbcb19880cf 100644 --- a/gnu/usr.bin/binutils/ld/lexsup.c +++ b/gnu/usr.bin/binutils/ld/lexsup.c @@ -649,8 +649,6 @@ parse_args (unsigned argc, char **argv) break; case OPTION_NON_SHARED: config.dynamic_link = FALSE; - if (! link_info.shared) - link_info.pie = FALSE; break; case OPTION_CREF: command_line.cref = TRUE; |