diff mbox

GCC/test: Don't try ARM cortex-M check on non-ARM

Message ID alpine.DEB.1.10.1408282242590.2958@tp.orcam.me.uk
State Accepted
Headers show

Commit Message

Maciej W. Rozycki Aug. 30, 2014, 12:04 a.m. UTC
Hi,

 This change fixes ugly confusing error messages like:

Executing on host: powerpc-linux-gnu-gcc arm_cortex_m25641.c  -fno-diagnostics-show-caret -fdiagnostics-color=never  -mthumb -S  -o arm_cortex_m25641.s    (timeout = 300)
powerpc-linux-gnu-gcc: error: unrecognized command line option '-mthumb'
compiler exited with status 1
output is:
powerpc-linux-gnu-gcc: error: unrecognized command line option '-mthumb'

FAIL: gcc.dg/binop-xor1.c scan-tree-dump-times optimized "\\^" 1

(check_effective_target_logical_op_short_circuit has been since updated to 
include powerpc*-*-* so the error won't trigger anymore, however it still 
falls through to check_effective_target_arm_cortex_m if none from its 
target list matched, so there *will* be another non-ARM target still 
triggering this).

 OK to apply?

2014-08-30  Maciej W. Rozycki  <macro@codesourcery.com>

	gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_arm_cortex_m):
	Return right away if !arm*-*-*.

  Maciej

gcc-test-target-arm-cortex-m.diff

Comments

Mike Stump Sept. 1, 2014, 2:15 a.m. UTC | #1
On Aug 29, 2014, at 5:04 PM, Maciej W. Rozycki <macro@codesourcery.com> wrote:
> Executing on host: powerpc-linux-gnu-gcc arm_cortex_m25641.c  -fno-diagnostics-show-caret -fdiagnostics-color=never  -mthumb -S  -o arm_cortex_m25641.s    (timeout = 300)

> OK to apply?

Ok.
Maciej W. Rozycki Sept. 1, 2014, 2:43 p.m. UTC | #2
On Mon, 1 Sep 2014, Mike Stump wrote:

> > Executing on host: powerpc-linux-gnu-gcc arm_cortex_m25641.c  -fno-diagnostics-show-caret -fdiagnostics-color=never  -mthumb -S  -o arm_cortex_m25641.s    (timeout = 300)
> 
> > OK to apply?
> 
> Ok.

 Applied, thanks.

  Maciej
diff mbox

Patch

Index: gcc-fsf-trunk-quilt/gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/lib/target-supports.exp	2014-08-26 20:34:31.378258198 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/lib/target-supports.exp	2014-08-30 00:23:59.697532006 +0100
@@ -2818,6 +2818,9 @@  proc check_effective_target_arm_cond_exe
 # Return 1 if this is an ARM cortex-M profile cpu
 
 proc check_effective_target_arm_cortex_m { } {
+    if { ![istarget arm*-*-*] } {
+	return 0
+    }
     return [check_no_compiler_messages arm_cortex_m assembly {
 	#if !defined(__ARM_ARCH_7M__) \
             && !defined (__ARM_ARCH_7EM__) \