]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
binutils: Use the newly built assembler and linker
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 28 Dec 2020 18:44:28 +0000 (10:44 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 28 Dec 2020 18:44:28 +0000 (10:44 -0800)
Use the newly built assembler and linker in test_gnu_debuglink by passing
$gcc_gas_flag to target_compile.

* testsuite/binutils-all/compress.exp (test_gnu_debuglink): Pass
$gcc_gas_flag to target_compile.

binutils/ChangeLog
binutils/testsuite/binutils-all/compress.exp

index 3626fd83972ba134a0a0731aedb024c3ac87bae3..bd087e5ec971d9f93ba63f2ea6f2fd9c1856e921 100644 (file)
@@ -1,3 +1,8 @@
+2020-12-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/binutils-all/compress.exp (test_gnu_debuglink): Pass
+       $gcc_gas_flag to target_compile.
+
 2020-12-24  Alan Modra  <amodra@gmail.com>
 
        * readelf.c (INT64_MIN): Define if not already defined.
index 831192c7ac2cc56de481bd561fc5c33613ca003f..a1dd8d32b82a2227676e3a5bf9f237e2a65df3e7 100644 (file)
@@ -680,10 +680,19 @@ proc test_gnu_debuglink {} {
     global STRIP
     global OBJCOPY
     global OBJDUMP
+    global gcc_gas_flag
 
     set test "gnu-debuglink"
 
-    if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog executable debug] != "" } {
+    # Use the newly built assembler and linker.
+    set flags debug
+    if { [istarget *-*-linux*]
+        || [istarget *-*-gnu*] } {
+       foreach i $gcc_gas_flag {
+           set flags "additional_flags=$i $flags"
+       }
+    }
+    if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog executable $flags] != "" } {
        unsupported "$test (build)"
        return
     }