NOCROSSREFS tests don't work with -fno-plt. This path appends
$PLT_CFLAGS to CC for NOCROSSREFS tests.
* ld-scripts/crossref.exp (CC): Save and restore. Append
$PLT_CFLAGS.
+2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-scripts/crossref.exp (CC): Save and restore. Append
+ $PLT_CFLAGS.
+
2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
* ld-i386/i386.exp (run_cc_link_tests): Add $PLT_CFLAGS to
global CFLAGS
set old_CFLAGS "$CFLAGS"
+# Pass -fplt to CC since -fno-plt doesn't work with NOCROSSREFS tests.
+global PLT_CFLAGS
+set old_CC "$CC"
+set CC "$CC $PLT_CFLAGS"
+
# Xtensa targets currently default to putting literal values in a separate
# section and that requires linker script support, so put literals in text.
if [istarget xtensa*-*-*] {
unresolved $test1
unresolved $test2
set CFLAGS "$old_CFLAGS"
+ set CC "$old_CC"
return
}
if { ![ld_compile $CC "$srcdir/$subdir/cross3.c" tmpdir/cross3.o] } {
unresolved $test2
set CFLAGS "$old_CFLAGS"
+ set CC "$old_CC"
return
}
if { ![ld_compile $CC "$srcdir/$subdir/cross4.c" tmpdir/cross4.o] } {
unresolved $test3
set CFLAGS "$old_CFLAGS"
+ set CC "$old_CC"
return
}
if ![ld_relocate $ld tmpdir/cross3-partial.o "tmpdir/cross1.o tmpdir/cross4.o"] {
unresolved $test3
set CFLAGS "$old_CFLAGS"
+ set CC "$old_CC"
return
}
}
set CFLAGS "$old_CFLAGS"
+set CC "$old_CC"