Commit 19073ebc by Uros Bizjak

g++.exp (g++_init): Use istarget.

	* lib/g++.exp (g++_init):  Use istarget.  Remove target_triplet global.
	* lib/obj-c++.exp (obj-c++_init): Ditto.
	* lib/file-format.exp (gcc_target_object_format): Ditto.
	* lib/target-supports-dg.exp (dg-require-dll): Ditto.
	* lib/target-supports-dg-exp (check_weak_available): Ditto.
	(check_visibility_available): Ditto.
	(check_effective_target_tls_native): Ditto.
	(check_effective_target_tls_emulated): Ditto.
	(check_effective_target_function_sections): Ditto.

From-SVN: r176240
parent e141542e
2011-07-13 Uros Bizjak <ubizjak@gmail.com>
* lib/g++.exp (g++_init): Use istarget. Remove target_triplet global.
* lib/obj-c++.exp (obj-c++_init): Ditto.
* lib/file-format.exp (gcc_target_object_format): Ditto.
* lib/target-supports-dg.exp (dg-require-dll): Ditto.
* lib/target-supports-dg-exp (check_weak_available): Ditto.
(check_visibility_available): Ditto.
(check_effective_target_tls_native): Ditto.
(check_effective_target_tls_emulated): Ditto.
(check_effective_target_function_sections): Ditto.
2011-07-13 Chung-Lin Tang <cltang@codesourcery.com>
* gcc.target/arm/pr48183.c: New test.
......@@ -35,12 +47,11 @@
2011-07-11 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp: Check
ia32.
* gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp: Check ia32.
* go.test/go-test.exp (go-set-goarch): Likewise.
2011-07-11 Georg-Johann Lay <avr@gjlay.de>
PR target/39633
* gcc.target/avr/torture/pr39633.c: New test case.
......@@ -50,7 +61,7 @@
* gfortran.dg/coarray_lock_3.f90: Remove bogus dg-error.
2011-07-11 Georg-Johann Lay <avr@gjlay.de>
* lib/target-supports.exp (check_effective_target_scheduling):
New Function.
* gcc.dg/pr46614.c: Add dg-require-effective-target scheduling.
......@@ -59,7 +70,7 @@
* g++.dg/pr45056.C: Ditto.
2011-07-11 Georg-Johann Lay <avr@gjlay.de>
* gcc.dg/compat/struct-by-value-16_main.c: Skip AVR.
* gcc.dg/compat/struct-by-value-17_main.c: Skip AVR.
* gcc.dg/compat/struct-by-value-18_main.c: Skip AVR.
......@@ -588,7 +599,7 @@
* gcc.dg/debug/pr49522.c: New test.
2011-07-07 Georg-Johann Lay <avr@gjlay.de>
* gcc.dg/pragma-align.c: Run only if target !default_packed.
* gcc.dg/pr46212.c: Run only if target int32plus.
* gcc.dg/torture/pr48146.c: Ditto.
......
......@@ -24,17 +24,16 @@
proc gcc_target_object_format { } {
global gcc_target_object_format_saved
global target_triplet
global tool
if [info exists gcc_target_object_format_saved] {
verbose "gcc_target_object_format returning saved $gcc_target_object_format_saved" 2
} elseif { [string match "*-*-darwin*" $target_triplet] } {
} elseif { [istarget *-*-darwin*] } {
# Darwin doesn't necessarily have objdump, so hand-code it.
set gcc_target_object_format_saved mach-o
} elseif { [string match "hppa*-*-hpux*" $target_triplet] } {
} elseif { [istarget hppa*-*-hpux*] } {
# HP-UX doesn't necessarily have objdump, so hand-code it.
if { [string match "hppa*64*-*-hpux*" $target_triplet] } {
if { [istarget hppa*64*-*-hpux*] } {
set gcc_target_object_format_saved elf
} else {
set gcc_target_object_format_saved som
......
......@@ -37,33 +37,33 @@ proc get-fortran-torture-options { } {
set vectorizer_options [list "-O2" "-ftree-vectorize"]
if { [istarget "powerpc*-*-*"]
if { [istarget powerpc*-*-*]
&& [is-effective-target powerpc_altivec_ok]
&& [check_vmx_hw_available] } {
lappend vectorizer_options "-maltivec"
set test_tree_vectorize 1
} elseif { [istarget "spu-*-*"] } {
} elseif { [istarget spu-*-*] } {
set test_tree_vectorize 1
} elseif { ( [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] )
} elseif { ( [istarget i?86-*-*] || [istarget x86_64-*-*] )
&& [check_effective_target_sse2]
&& [check_sse2_hw_available]
&& [check_sse_os_support_available] } {
lappend vectorizer_options "-msse2"
set test_tree_vectorize 1
} elseif { [istarget "mips*-*-*"]
} elseif { [istarget mips*-*-*]
&& [check_effective_target_mpaired_single]
&& [check_effective_target_nomips16] } {
lappend vectorizer_options "-mpaired-single"
set test_tree_vectorize 1
} elseif { [istarget "sparc*-*-*"]
} elseif { [istarget sparc*-*-*]
&& [check_effective_target_ultrasparc_hw] } {
lappend vectorizer_options "-mcpu=ultrasparc" "-mvis"
set test_tree_vectorize 1
} elseif { [istarget "alpha*-*-*"]
} elseif { [istarget alpha*-*-*]
&& [check_alpha_max_hw_available] } {
lappend vectorizer_options "-mmax"
set test_tree_vectorize 1
} elseif [istarget "ia64-*-*"] {
} elseif [istarget ia64-*-*] {
set test_tree_vectorize 1
} else {
set test_tree_vectorize 0
......@@ -414,14 +414,14 @@ proc fortran-torture { args } {
#
proc add-ieee-options { } {
# Ensure that excess precision does not cause problems.
if { [istarget "i?86-*-*"]
|| [istarget "m68k-*-*"] } then {
if { [istarget i?86-*-*]
|| [istarget m68k-*-*] } then {
uplevel 1 lappend additional_flags "-ffloat-store"
}
# Enable full IEEE compliance mode.
if { [istarget "alpha*-*-*"]
|| [istarget "sh*-*-*"] } then {
if { [istarget alpha*-*-*]
|| [istarget sh*-*-*] } then {
uplevel 1 lappend additional_flags "-mieee"
}
}
......@@ -188,7 +188,6 @@ proc g++_init { args } {
global TOOL_EXECUTABLE TOOL_OPTIONS
global GXX_UNDER_TEST
global TESTING_IN_BUILD_TREE
global target_triplet
global gcc_warning_prefix
global gcc_error_prefix
......@@ -263,7 +262,7 @@ proc g++_init { args } {
set gcc_warning_prefix "warning:"
set gcc_error_prefix "error:"
if { [string match "*-*-darwin*" $target_triplet] } {
if { [istarget *-*-darwin*] } {
lappend ALWAYS_CXXFLAGS "ldflags=-multiply_defined suppress"
}
......
......@@ -157,8 +157,8 @@ proc ${tool}_check_unsupported_p { output } {
if [regexp "(^|\n)\[^\n\]*: region \[^\n\]* is full" $output] {
return "memory full"
}
if {[istarget spu-*-*] && \
[string match "*exceeds local store*" $output]} {
if { [istarget spu-*-*] && \
[string match "*exceeds local store*" $output] } {
return "memory full"
}
return ""
......
......@@ -356,14 +356,14 @@ proc go-torture { args } {
#
proc add-ieee-options { } {
# Ensure that excess precision does not cause problems.
if { [istarget "i?86-*-*"]
|| [istarget "m68k-*-*"] } then {
if { [istarget i?86-*-*]
|| [istarget m68k-*-*] } then {
uplevel 1 lappend additional_flags "-ffloat-store"
}
# Enable full IEEE compliance mode.
if { [istarget "alpha*-*-*"]
|| [istarget "sh*-*-*"] } then {
if { [istarget alpha*-*-*]
|| [istarget sh*-*-*] } then {
uplevel 1 lappend additional_flags "-mieee"
}
}
......@@ -210,7 +210,6 @@ proc obj-c++_init { args } {
global TOOL_EXECUTABLE TOOL_OPTIONS
global OBJCXX_UNDER_TEST
global TESTING_IN_BUILD_TREE
global target_triplet
global gcc_warning_prefix
global gcc_error_prefix
......@@ -270,7 +269,7 @@ proc obj-c++_init { args } {
set gcc_warning_prefix "warning:"
set gcc_error_prefix "error:"
if { [string match "*-*-darwin*" $target_triplet] } {
if { [istarget *-*-darwin*] } {
lappend ALWAYS_OBJCXXFLAGS "ldflags=-multiply_defined suppress"
}
......@@ -299,7 +298,7 @@ proc obj-c++_target_compile { source dest type options } {
# we need to add the include path for the gnu runtime if that is in
# use.
# First, set the default...
if { [istarget "*-*-darwin*"] } {
if { [istarget *-*-darwin*] } {
set nextruntime 1
} else {
set nextruntime 0
......
......@@ -30,7 +30,7 @@ proc objc-set-runtime-options { dowhat args } {
# installation can have the objc headers present in the same locations
# that Darwin uses. If NeXT is ported to another target, then it should
# be listed here.
if [istarget "*-*-darwin*" ] {
if [istarget *-*-darwin*] {
lappend rtlist "-fnext-runtime"
}
if [info exists OBJC_RUNTIME_OPTIONS] {
......
......@@ -150,7 +150,7 @@ proc objc_target_compile { source dest type options } {
# we need to add the include path for the gnu runtime if that is in
# use.
# First set the default...
if { [istarget "*-*-darwin*"] } {
if { [istarget *-*-darwin*] } {
set nextruntime 1
} else {
set nextruntime 0
......
......@@ -461,10 +461,10 @@ proc dg-function-on-line { args } {
}
}
if { [istarget "hppa*-*-*"] } {
if { [istarget hppa*-*-*] } {
set pattern [format {\t;[^:]+:%d\n(\t[^\t]+\n)+%s:\n\t.PROC} \
$line $symbol]
} elseif { [istarget "mips-sgi-irix*"] } {
} elseif { [istarget mips-sgi-irix*] } {
set pattern [format {\t\.loc [0-9]+ %d 0( [^\n]*)?\n\t\.set\t(no)?mips16\n\t\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \
$line $symbol $symbol $symbol]
} else {
......
......@@ -272,11 +272,11 @@ proc restore_ld_library_path_env_vars { } {
proc get_shlib_extension { } {
global shlib_ext
if { [ istarget *-*-darwin* ] } {
if { [istarget *-*-darwin*] } {
set shlib_ext "dylib"
} elseif { [ istarget *-*-cygwin* ] || [ istarget *-*-mingw* ] } {
} elseif { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
set shlib_ext "dll"
} elseif { [ istarget hppa*-*-hpux* ] } {
} elseif { [istarget hppa*-*-hpux*] } {
set shlib_ext "sl"
} else {
set shlib_ext "so"
......
......@@ -122,11 +122,10 @@ proc dg-require-profiling { args } {
# If this target does not support DLL attributes skip this test.
proc dg-require-dll { args } {
global target_triplet
# As a special case, the mcore-*-elf supports these attributes.
# All Symbian OS targets also support these attributes.
if { [string match "mcore-*-elf" $target_triplet]
|| [string match "*-*-symbianelf" $target_triplet]} {
if { [istarget mcore-*-elf]
|| [istarget *-*-symbianelf] } {
return
}
# PE/COFF targets support dllimport/dllexport.
......
......@@ -219,7 +219,6 @@ proc check_runtime {prop args} {
# this proc returns 1 if they're supported, 0 if they're not, or -1 if unsure
proc check_weak_available { } {
global target_triplet
global target_cpu
# All mips targets should support it
......@@ -230,25 +229,25 @@ proc check_weak_available { } {
# All solaris2 targets should support it
if { [regexp ".*-solaris2.*" $target_triplet] } {
if { [istarget *-*-solaris2*] } {
return 1
}
# DEC OSF/1/Digital UNIX/Tru64 UNIX supports it
if { [regexp "alpha.*osf.*" $target_triplet] } {
if { [istarget alpha*-dec-osf*] } {
return 1
}
# Windows targets Cygwin and MingW32 support it
if { [regexp ".*mingw32|.*cygwin" $target_triplet] } {
if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
return 1
}
# HP-UX 10.X doesn't support it
if { [istarget "hppa*-*-hpux10*"] } {
if { [istarget hppa*-*-hpux10*] } {
return 0
}
......@@ -276,7 +275,7 @@ proc check_weak_available { } {
# cannot be overridden.
proc check_weak_override_available { } {
if { [istarget "*-*-mingw*"] } {
if { [istarget *-*-mingw*] } {
return 0
}
return [check_weak_available]
......@@ -291,9 +290,6 @@ proc check_weak_override_available { } {
# The argument is the kind of visibility, default/protected/hidden/internal.
proc check_visibility_available { what_kind } {
global tool
global target_triplet
# On NetWare, support makes no sense.
if { [istarget *-*-netware*] } {
return 0
......@@ -627,7 +623,7 @@ proc check_effective_target_pcc_bitfield_type_matters { } {
proc add_options_for_tls { flags } {
# Tru64 UNIX uses emutls, which relies on a couple of pthread functions
# which only live in libpthread, so always pass -pthread for TLS.
if { [istarget *-*-osf*] } {
if { [istarget alpha*-dec-osf*] } {
return "$flags -pthread"
}
# On Solaris 8 and 9, __tls_get_addr/___tls_get_addr only lives in
......@@ -660,8 +656,7 @@ proc check_effective_target_tls {} {
proc check_effective_target_tls_native {} {
# VxWorks uses emulated TLS machinery, but with non-standard helper
# functions, so we fail to automatically detect it.
global target_triplet
if { [regexp ".*-.*-vxworks.*" $target_triplet] } {
if { [istarget *-*-vxworks*] } {
return 0
}
......@@ -677,8 +672,7 @@ proc check_effective_target_tls_native {} {
proc check_effective_target_tls_emulated {} {
# VxWorks uses emulated TLS machinery, but with non-standard helper
# functions, so we fail to automatically detect it.
global target_triplet
if { [regexp ".*-.*-vxworks.*" $target_triplet] } {
if { [istarget *-*-vxworks*] } {
return 1
}
......@@ -702,8 +696,7 @@ proc check_effective_target_tls_runtime {} {
proc check_effective_target_function_sections {} {
# Darwin has its own scheme and silently accepts -ffunction-sections.
global target_triplet
if { [regexp ".*-.*-darwin.*" $target_triplet] } {
if { [istarget *-*-darwin*] } {
return 0
}
......@@ -1435,7 +1428,7 @@ proc check_fork_available {} {
# Returns true iff "mkfifo" is available on the target system.
proc check_mkfifo_available {} {
if {[istarget *-*-cygwin*]} {
if { [istarget *-*-cygwin*] } {
# Cygwin has mkfifo, but support is incomplete.
return 0
}
......@@ -1447,10 +1440,10 @@ proc check_mkfifo_available {} {
proc check_cxa_atexit_available { } {
return [check_cached_effective_target cxa_atexit_available {
if { [istarget "hppa*-*-hpux10*"] } {
if { [istarget hppa*-*-hpux10*] } {
# HP-UX 10 doesn't have __cxa_atexit but subsequent test passes.
expr 0
} elseif { [istarget "*-*-vxworks"] } {
} elseif { [istarget *-*-vxworks] } {
# vxworks doesn't have __cxa_atexit but subsequent test passes.
expr 0
} else {
......@@ -2282,7 +2275,7 @@ proc check_effective_target_powerpc_ppu_ok { } {
# Return 1 if this is a PowerPC target that supports SPU.
proc check_effective_target_powerpc_spu { } {
if [istarget powerpc*-*-linux*] {
if { [istarget powerpc*-*-linux*] } {
return [check_effective_target_powerpc_altivec_ok]
} else {
return 0
......@@ -3705,11 +3698,11 @@ proc add_options_for_c99_runtime { flags } {
# full IEEE compliance mode.
proc add_options_for_ieee { flags } {
if { [istarget "alpha*-*-*"]
|| [istarget "sh*-*-*"] } {
if { [istarget alpha*-*-*]
|| [istarget sh*-*-*] } {
return "$flags -mieee"
}
if { [istarget "rx-*-*"] } {
if { [istarget rx-*-*] } {
return "$flags -mnofpu"
}
return $flags
......@@ -3999,21 +3992,21 @@ proc check_vect_support_and_set_flags { } {
global DEFAULT_VECTCFLAGS
global dg-do-what-default
if [istarget "powerpc-*paired*"] {
if [istarget powerpc-*paired*] {
lappend DEFAULT_VECTCFLAGS "-mpaired"
if [check_750cl_hw_available] {
set dg-do-what-default run
} else {
set dg-do-what-default compile
}
} elseif [istarget "powerpc*-*-*"] {
} elseif [istarget powerpc*-*-*] {
# Skip targets not supporting -maltivec.
if ![is-effective-target powerpc_altivec_ok] {
return 0
}
lappend DEFAULT_VECTCFLAGS "-maltivec"
if [check_vsx_hw_available] {
if [check_vsx_hw_available] {
lappend DEFAULT_VECTCFLAGS "-mvsx" "-mno-allow-movmisalign"
}
......@@ -4026,16 +4019,16 @@ proc check_vect_support_and_set_flags { } {
}
set dg-do-what-default compile
}
} elseif { [istarget "spu-*-*"] } {
} elseif { [istarget spu-*-*] } {
set dg-do-what-default run
} elseif { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
} elseif { [istarget i?86-*-*] || [istarget x86_64-*-*] } {
lappend DEFAULT_VECTCFLAGS "-msse2"
if { [check_effective_target_sse2_runtime] } {
set dg-do-what-default run
} else {
set dg-do-what-default compile
}
} elseif { [istarget "mips*-*-*"]
} elseif { [istarget mips*-*-*]
&& ([check_effective_target_mpaired_single]
|| [check_effective_target_mips_loongson])
&& [check_effective_target_nomips16] } {
......@@ -4043,14 +4036,14 @@ proc check_vect_support_and_set_flags { } {
lappend DEFAULT_VECTCFLAGS "-mpaired-single"
}
set dg-do-what-default run
} elseif [istarget "sparc*-*-*"] {
} elseif [istarget sparc*-*-*] {
lappend DEFAULT_VECTCFLAGS "-mcpu=ultrasparc" "-mvis"
if [check_effective_target_ultrasparc_hw] {
set dg-do-what-default run
} else {
set dg-do-what-default compile
}
} elseif [istarget "alpha*-*-*"] {
} elseif [istarget alpha*-*-*] {
# Alpha's vectorization capabilities are extremely limited.
# It's more effort than its worth disabling all of the tests
# that it cannot pass. But if you actually want to see what
......@@ -4063,7 +4056,7 @@ proc check_vect_support_and_set_flags { } {
} else {
set dg-do-what-default compile
}
} elseif [istarget "ia64-*-*"] {
} elseif [istarget ia64-*-*] {
set dg-do-what-default run
} elseif [is-effective-target arm_neon_ok] {
eval lappend DEFAULT_VECTCFLAGS [add_options_for_arm_neon ""]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment