* 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
+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.
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.
* 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.
* 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.
* 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.
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
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
#
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"
}
}
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
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"
}
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 ""
#
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"
}
}
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
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"
}
# 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
# 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] {
# 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
}
}
- 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 {
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"
# 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.
# 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
# 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
}
# cannot be overridden.
proc check_weak_override_available { } {
- if { [istarget "*-*-mingw*"] } {
+ if { [istarget *-*-mingw*] } {
return 0
}
return [check_weak_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
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
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
}
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
}
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
}
# 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
}
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 {
# 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
# 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
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"
}
}
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] } {
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
} 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 ""]