]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - binutils/patches/binutils-default-test-flags.patch
binutils: Update to 2.23.51.0.5.
[people/ms/ipfire-3.x.git] / binutils / patches / binutils-default-test-flags.patch
diff --git a/binutils/patches/binutils-default-test-flags.patch b/binutils/patches/binutils-default-test-flags.patch
new file mode 100644 (file)
index 0000000..8870fab
--- /dev/null
@@ -0,0 +1,35 @@
+many tests rely on order of symbols and the gnu hash style/relro options
+change that.  so to avoid having to constantly thrash in the test files,
+use the normal options that everyone tests against.
+
+--- binutils/ld/testsuite/lib/ld-lib.exp
++++ binutils/ld/testsuite/lib/ld-lib.exp
+@@ -84,7 +84,7 @@
+     global HOSTING_EMU
+     remote_file host delete $target
+-    return [run_host_cmd_yesno "$ld" "$HOSTING_EMU -o $target -r $objects"]
++    return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -z norelro -o $target -r $objects"]
+ }
+ # Check to see if ld is being invoked with a non-endian output format
+@@ -158,7 +158,7 @@
+     remote_file host delete $target
+-    return [run_host_cmd_yesno "$ld" "$HOSTING_EMU $flags -o $target $objs $libs"]
++    return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -z norelro $flags -o $target $objs $libs"]
+ }
+ # Link a program using ld, without including any libraries.
+@@ -189,7 +189,9 @@
+     }
+     set ldexe [string replace $ldexe 0 [string last "/" $ldexe] ""]
+     if {[string match "*gcc*" $ldexe] || [string match "*++*" $ldexe]} then {
+-      set ldflags "$gcc_ld_flag $ldflags"
++      set ldflags "$gcc_ld_flag -Wl,--hash-style=sysv -Wl,-z,norelro $ldflags"
++    } else {
++      set ldflags "--hash-style=sysv -z norelro $ldflags"
+     }
+     remote_file host delete $target