diff mbox series

testsuite, Darwin : Do not claim 'GAS' for cctools assembler.

Message ID 547DC7B1-9C80-4A0E-8CC4-FC7C18927735@sandoe.co.uk
State New
Headers show
Series testsuite, Darwin : Do not claim 'GAS' for cctools assembler. | expand

Commit Message

Iain Sandoe Aug. 19, 2021, 8:02 p.m. UTC
Hi,

Although the cctools assembler is based of GNU GAS, it is from a
very old version (1.38) which does not support many of the features
that the target supports test is expecting***.

tested on i686 and x86_64 darwin versions using the cctools as.
OK for master?

thanks
Iain

*** I guess we could be more clever and parse the output to find a version
and then alter the supports condition to “gas NN”, but I don’t currently
have cycles to implement that.


gcc/testsuite/ChangeLog:

	* lib/target-supports.exp: Exclude cctools assembler based on
	GAS 1.38.
---
 gcc/testsuite/lib/target-supports.exp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Mike Stump Aug. 26, 2021, 7:04 p.m. UTC | #1
On Aug 19, 2021, at 1:02 PM, Iain Sandoe <iain@sandoe.co.uk> wrote:
> 
> Although the cctools assembler is based of GNU GAS, it is from a
> very old version (1.38) which does not support many of the features
> that the target supports test is expecting***.
> 
> tested on i686 and x86_64 darwin versions using the cctools as.
> OK for master?

Ok.
diff mbox series

Patch

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 44465b14b06..ac9daee26b8 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -9454,7 +9454,14 @@  proc check_effective_target_gas { } {
 	set status [remote_exec host "$gcc_as" "-v /dev/null"]
 	set as_output [lindex $status 1]
 	if { [ string first "GNU" $as_output ] >= 0 } {
-	    set use_gas_saved 1
+	    # Some Darwin versions have an assembler which is based on an old
+	    # version of GAS (and reports GNU assembler in its -v output) but
+	    # but doesn't support many of the modern GAS features.
+	    if { [ string first "cctools" $as_output ] >= 0 } {
+	        set use_gas_saved 0
+	    } else {
+	        set use_gas_saved 1
+	    }
 	} else {
 	    set use_gas_saved 0
 	}