Use NOPIE_CFLAGS and NOPIE_LDFLAGS to disable PIE
Since not all compilers support -no-pie, NOPIE_CFLAGS and NOPIE_LDFLAGS should be used to disable PIE. PR ld/21090 * testsuite/ld-x86-64/x86-64.exp (undefined_weak): Use NOPIE_CFLAGS and NOPIE_LDFLAGS to disable PIE for the non-pie version of the test.
This commit is contained in:
parent
8170f7693b
commit
a7eaf017f9
@ -1,3 +1,10 @@
|
||||
2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/21090
|
||||
* testsuite/ld-x86-64/x86-64.exp (undefined_weak): Use
|
||||
NOPIE_CFLAGS and NOPIE_LDFLAGS to disable PIE for the non-pie
|
||||
version of the test.
|
||||
|
||||
2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/19579
|
||||
|
@ -589,6 +589,8 @@ proc undefined_weak {cflags ldflags} {
|
||||
|
||||
# Add $PLT_CFLAGS if PLT is expected.
|
||||
global PLT_CFLAGS
|
||||
# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
|
||||
global NOPIE_CFLAGS NOPIE_LDFLAGS
|
||||
|
||||
# Must be native with the C compiler
|
||||
if { [isnative] && [which $CC] != 0 } {
|
||||
@ -1277,7 +1279,7 @@ if { [isnative] && [which $CC] != 0 } {
|
||||
]
|
||||
}
|
||||
|
||||
undefined_weak "-fno-pie" "-no-pie"
|
||||
undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS"
|
||||
undefined_weak "-fPIE" ""
|
||||
undefined_weak "-fPIE" "-pie"
|
||||
undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak"
|
||||
|
Loading…
Reference in New Issue
Block a user