mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 16:00:58 +08:00
Skip optional_mthumb tests if GCC has a default mode
2017-01-20 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/testsuite/ * lib/target-supports.exp (check_configured_with): New procedure. (check_effective_target_default_mode): new effective target. * gcc.target/arm/optional_thumb-1.c: Skip if GCC was configured with a default mode. Fix dg-skip-if target selector syntax. * gcc.target/arm/optional_thumb-2.c: Likewise. * gcc.target/arm/optional_thumb-3.c: Fix dg-skip-if target selector syntax. From-SVN: r244723
This commit is contained in:
parent
12905f106c
commit
449cd5af04
@ -1,3 +1,13 @@
|
||||
2017-01-20 Thomas Preud'homme <thomas.preudhomme@arm.com>
|
||||
|
||||
* lib/target-supports.exp (check_configured_with): New procedure.
|
||||
(check_effective_target_default_mode): new effective target.
|
||||
* gcc.target/arm/optional_thumb-1.c: Skip if GCC was configured with a
|
||||
default mode. Fix dg-skip-if target selector syntax.
|
||||
* gcc.target/arm/optional_thumb-2.c: Likewise.
|
||||
* gcc.target/arm/optional_thumb-3.c: Fix dg-skip-if target selector
|
||||
syntax.
|
||||
|
||||
2017-01-20 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
PR c++/77829
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-*} { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */
|
||||
/* { dg-do compile { target { ! default_mode } } } */
|
||||
/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-* } { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */
|
||||
/* { dg-options "-march=armv6-m" } */
|
||||
|
||||
/* Check that -mthumb is not needed when compiling for a Thumb-only target. */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-*} { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */
|
||||
/* { dg-do compile { target { ! default_mode } } } */
|
||||
/* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-* } { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */
|
||||
/* { dg-options "-mcpu=cortex-m4" } */
|
||||
|
||||
/* Check that -mthumb is not needed when compiling for a Thumb-only target. */
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target arm_cortex_m } */
|
||||
/* { dg-skip-if "-mthumb given" { *-*-*} { "-mthumb" } } */
|
||||
/* { dg-skip-if "-mthumb given" { *-*-* } { "-mthumb" } } */
|
||||
/* { dg-options "-marm" } */
|
||||
/* { dg-error "target CPU does not support ARM mode" "missing error with -marm on Thumb-only targets" { target *-*-*} 0 } */
|
||||
/* { dg-error "target CPU does not support ARM mode" "missing error with -marm on Thumb-only targets" { target *-*-* } 0 } */
|
||||
|
||||
/* Check that -marm gives an error when compiling for a Thumb-only target. */
|
||||
|
||||
|
@ -252,6 +252,20 @@ proc check_runtime {prop args} {
|
||||
}]
|
||||
}
|
||||
|
||||
# Return 1 if GCC was configured with $pattern.
|
||||
proc check_configured_with { pattern } {
|
||||
global tool
|
||||
|
||||
set gcc_output [${tool}_target_compile "-v" "" "none" ""]
|
||||
if { [ regexp "Configured with: \[^\n\]*$pattern" $gcc_output ] } {
|
||||
verbose "Matched: $pattern" 2
|
||||
return 1
|
||||
}
|
||||
|
||||
verbose "Failed to match: $pattern" 2
|
||||
return 0
|
||||
}
|
||||
|
||||
###############################
|
||||
# proc check_weak_available { }
|
||||
###############################
|
||||
@ -3817,6 +3831,12 @@ proc add_options_for_arm_arch_v7ve { flags } {
|
||||
return "$flags -march=armv7ve"
|
||||
}
|
||||
|
||||
# Return 1 if GCC was configured with --with-mode=
|
||||
proc check_effective_target_default_mode { } {
|
||||
|
||||
return [check_configured_with "with-mode="]
|
||||
}
|
||||
|
||||
# Return 1 if this is an ARM target where -marm causes ARM to be
|
||||
# used (not Thumb)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user