public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] binutils: Use the newly built assembler and linker
@ 2020-12-28 18:46 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2020-12-28 18:46 UTC (permalink / raw)
  To: binutils

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                           |  5 +++++
 binutils/testsuite/binutils-all/compress.exp | 11 ++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 3626fd8397..bd087e5ec9 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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.
diff --git a/binutils/testsuite/binutils-all/compress.exp b/binutils/testsuite/binutils-all/compress.exp
index 831192c7ac..a1dd8d32b8 100644
--- a/binutils/testsuite/binutils-all/compress.exp
+++ b/binutils/testsuite/binutils-all/compress.exp
@@ -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
     }
-- 
2.29.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-28 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 18:46 [PATCH] binutils: Use the newly built assembler and linker H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).