[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files

2017-09-13 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170

--- Comment #7 from Aldy Hernandez  ---
Author: aldyh
Date: Wed Sep 13 16:54:43 2017
New Revision: 252412

URL: https://gcc.gnu.org/viewcvs?rev=252412=gcc=rev
Log:
[RS6000] linux startfile/endfile

These need to match the gnu-user.h definitions to support
--enable-default-pie.  Otherwise we end up linking the wrong startup
files when defaulting to PIE.

PR target/81170
PR target/81295
* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
match gnu-user.h startfile.
(ENDFILE_LINUX_SPEC): Similarly.

Modified:
branches/range-gen2/gcc/ChangeLog
branches/range-gen2/gcc/config/rs6000/sysv4.h

[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files

2017-08-29 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170

Alan Modra  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Alan Modra  ---
Fixed

[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files

2017-08-29 Thread amodra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170

--- Comment #5 from Alan Modra  ---
Author: amodra
Date: Tue Aug 29 08:27:02 2017
New Revision: 251405

URL: https://gcc.gnu.org/viewcvs?rev=251405=gcc=rev
Log:
[RS6000] linux startfile/endfile

These need to match the gnu-user.h definitions to support
--enable-default-pie.  Otherwise we end up linking the wrong startup
files when defaulting to PIE.

PR target/81170
PR target/81295
* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
match gnu-user.h startfile.
(ENDFILE_LINUX_SPEC): Similarly.

Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/config/rs6000/sysv4.h

[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files

2017-08-29 Thread amodra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170

--- Comment #4 from Alan Modra  ---
Author: amodra
Date: Tue Aug 29 08:25:17 2017
New Revision: 251404

URL: https://gcc.gnu.org/viewcvs?rev=251404=gcc=rev
Log:
PR driver/81523: Make -static override -pie

-static and -pie together behave differently depending on whether GCC is
configured with --enable-default-pie.  On x86, "-static -pie" fails to
create executable when --enable-default-pie isn't used, but creates a
static executable when --enable-default-pie is used.  This patch makes
-static completely override -pie to create a static executable, regardless
if --enable-default-pie is used to configure GCC.

PR target/81170
PR target/81295
PR driver/81523
* gcc.c (NO_PIE_SPEC): Delete.
(PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
exclusion..
(LINK_PIE_SPEC): ..to here.
(LINK_COMMAND_SPEC): Support -no-pie.
* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
chain of crtbegin*.o selection, update for PIE_SPEC changes and
format.
(GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
(ENDFILE_CRTEND_SPEC): Similarly.

Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/config/gnu-user.h
branches/gcc-6-branch/gcc/config/sol2.h
branches/gcc-6-branch/gcc/gcc.c

[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files

2017-08-29 Thread amodra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170

--- Comment #3 from Alan Modra  ---
Author: amodra
Date: Tue Aug 29 08:23:44 2017
New Revision: 251403

URL: https://gcc.gnu.org/viewcvs?rev=251403=gcc=rev
Log:
[RS6000] linux startfile/endfile

These need to match the gnu-user.h definitions to support
--enable-default-pie.  Otherwise we end up linking the wrong startup
files when defaulting to PIE.

PR target/81170
PR target/81295
* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
match gnu-user.h startfile.
(ENDFILE_LINUX_SPEC): Similarly.

Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/rs6000/sysv4.h

[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files

2017-08-29 Thread amodra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170

--- Comment #2 from Alan Modra  ---
Author: amodra
Date: Tue Aug 29 08:22:44 2017
New Revision: 251402

URL: https://gcc.gnu.org/viewcvs?rev=251402=gcc=rev
Log:
PR driver/81523: Make -static override -pie

-static and -pie together behave differently depending on whether GCC is
configured with --enable-default-pie.  On x86, "-static -pie" fails to
create executable when --enable-default-pie isn't used, but creates a
static executable when --enable-default-pie is used.  This patch makes
-static completely override -pie to create a static executable, regardless
if --enable-default-pie is used to configure GCC.

PR target/81170
PR target/81295
PR driver/81523
* gcc.c (NO_PIE_SPEC): Delete.
(PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
exclusion..
(LINK_PIE_SPEC): ..to here.
(LINK_COMMAND_SPEC): Support -no-pie.
* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
chain of crtbegin*.o selection, update for PIE_SPEC changes and
format.
(GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
(ENDFILE_CRTEND_SPEC): Similarly.

Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/gnu-user.h
branches/gcc-7-branch/gcc/config/sol2.h
branches/gcc-7-branch/gcc/gcc.c

[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files

2017-08-11 Thread amodra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170

--- Comment #1 from Alan Modra  ---
Author: amodra
Date: Sat Aug 12 00:28:04 2017
New Revision: 251065

URL: https://gcc.gnu.org/viewcvs?rev=251065=gcc=rev
Log:
[RS6000] linux startfile/endfile

These need to match the gnu-user.h definitions to support
--enable-default-pie.  Otherwise we end up linking the wrong startup
files when defaulting to PIE.

PR target/81170
PR target/81295
* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
match gnu-user.h startfile.
(ENDFILE_LINUX_SPEC): Similarly.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/sysv4.h

[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files

2017-08-08 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170
Bug 81170 depends on bug 81523, which changed state.

Bug 81523 Summary: -static -pie behaves differently depending on if 
--enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files

2017-06-23 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170

Alan Modra  changed:

   What|Removed |Added

   Keywords||patch
   Priority|P3  |P2
URL||https://gcc.gnu.org/ml/gcc-
   ||patches/2017-06/msg01678.ht
   ||ml

[Bug target/81170] powerpc*-linux --enable-default-pie chooses incorrect startup files

2017-06-22 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81170

Alan Modra  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-06-22
 CC||doko at ubuntu dot com,
   ||wschmidt at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |amodra at gmail dot com
 Ever confirmed|0   |1
  Known to fail||6.3.1, 7.1.1, 8.0