[Bug driver/81523] -static -pie behaves differently depending on if --enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523 Jonathan Wakely changed: What|Removed |Added CC||alinshans at gmail dot com --- Comment #8 from Jonathan Wakely --- *** Bug 85564 has been marked as a duplicate of this bug. ***
[Bug driver/81523] -static -pie behaves differently depending on if --enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523 --- Comment #7 from Aldy Hernandez --- Author: aldyh Date: Wed Sep 13 16:41:41 2017 New Revision: 252351 URL: https://gcc.gnu.org/viewcvs?rev=252351=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. gcc/ 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. gcc/testsuite/ PR driver/81523 * gcc.dg/pie-7.c: New test. * gcc.dg/pie-static-1.c: Likewise. * gcc.dg/pie-static-2.c: Likewise. Added: branches/range-gen2/gcc/testsuite/gcc.dg/pie-7.c branches/range-gen2/gcc/testsuite/gcc.dg/pie-static-1.c branches/range-gen2/gcc/testsuite/gcc.dg/pie-static-2.c Modified: branches/range-gen2/gcc/ChangeLog branches/range-gen2/gcc/config/gnu-user.h branches/range-gen2/gcc/config/sol2.h branches/range-gen2/gcc/gcc.c branches/range-gen2/gcc/testsuite/ChangeLog
[Bug driver/81523] -static -pie behaves differently depending on if --enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523 --- Comment #6 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 driver/81523] -static -pie behaves differently depending on if --enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523 --- Comment #5 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 driver/81523] -static -pie behaves differently depending on if --enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523 H.J. Lu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |8.0 --- Comment #4 from H.J. Lu --- Fixed for GCC 8.
[Bug driver/81523] -static -pie behaves differently depending on if --enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523 --- Comment #3 from hjl at gcc dot gnu.org --- Author: hjl Date: Tue Aug 8 22:06:21 2017 New Revision: 250974 URL: https://gcc.gnu.org/viewcvs?rev=250974=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. gcc/ 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. gcc/testsuite/ PR driver/81523 * gcc.dg/pie-7.c: New test. * gcc.dg/pie-static-1.c: Likewise. * gcc.dg/pie-static-2.c: Likewise. Added: trunk/gcc/testsuite/gcc.dg/pie-7.c trunk/gcc/testsuite/gcc.dg/pie-static-1.c trunk/gcc/testsuite/gcc.dg/pie-static-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/gnu-user.h trunk/gcc/config/sol2.h trunk/gcc/gcc.c trunk/gcc/testsuite/ChangeLog
[Bug driver/81523] -static -pie behaves differently depending on if --enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523 --- Comment #2 from H.J. Lu --- Created attachment 41825 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41825=edit A patch
[Bug driver/81523] -static -pie behaves differently depending on if --enable-default-pie is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81523 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-07-25 Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- Ugh.