+2018-05-28 Alan Modra <amodra@gmail.com>
+
+ PR 23235
+ * testsuite/binutils-all/compress.exp (test_gnu_debuglink): Return
+ unsupported rather than fail on compile errors.
+ * testsuite/binutils-all/objdump.exp (test_build_id_debuglink):
+ Likewise. Save and restore CFLAGS_FOR_TARGET.
+
2018-05-18 Kito Cheng <kito.cheng@gmail.com>
* readelf.c (get_machine_flags): Handle EF_RISCV_RVE.
}
# Use a fixed build-id.
+ if { [info exists CFLAGS_FOR_TARGET] } {
+ set save_CFLAGS_FOR_TARGET $CFLAGS_FOR_TARGET
+ }
set CFLAGS_FOR_TARGET "-g -Wl,--build-id=0x12345678abcdef01"
if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog exectuable debug] != "" } {
- fail "$test (build)"
+ unsupported "$test (build)"
return
}
- # FIXME: Do we need to restore CFLAGS_FOR_TARGET to its old value ?
+ if { [info exists save_CFLAGS_FOR_TARGET] } {
+ set CFLAGS_FOR_TARGET $save_CFLAGS_FOR_TARGET
+ } else {
+ unset CFLAGS_FOR_TARGET
+ }
if { [binutils_run $STRIP "--strip-debug --remove-section=.comment tmpdir/testprog -o tmpdir/testprog.strip"] != "" } {
fail "$test (strip debug info)"