summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr42246.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-07-20 09:57:36 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-07-31 19:02:56 -0700
commita2ed5b4c96978fba81423e562cdcb4b85c8cf9cc (patch)
treeb191523481e2ae33cf2e3c753248f5fcd0f10a39 /gcc/testsuite/gcc.dg/pr42246.c
parent2486a41e399051d8389b52b6d4fbb0ea76caf463 (diff)
downloadgcc-a2ed5b4c96978fba81423e562cdcb4b85c8cf9cc.tar.gz
PR driver/81523: Make -static override -piehjl/pr81523/master
-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. 2017-07-24 Alan Modra <amodra@gmail.com> H.J. Lu <hongjiu.lu@intel.com> 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.
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr42246.c')
0 files changed, 0 insertions, 0 deletions