Commit 79c70e5a by Mark Mitchell Committed by Joseph Myers

target-supports.exp (check_visibility_available): Really test the compiler.

2004-11-19  Mark Mitchell  <mark@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>

	* lib/target-supports.exp (check_visibility_available): Really
	test the compiler.

Co-Authored-By: Joseph Myers <joseph@codesourcery.com>

From-SVN: r90937
parent 72c4e4db
2004-11-19 Mark Mitchell <mark@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* lib/target-supports.exp (check_visibility_available): Really
test the compiler.
2004-11-19 Dorit Naishlos <dorit@il.ibm.com> 2004-11-19 Dorit Naishlos <dorit@il.ibm.com>
PR tree-opt/18181 PR tree-opt/18181
......
...@@ -97,30 +97,30 @@ proc check_weak_available { } { ...@@ -97,30 +97,30 @@ proc check_weak_available { } {
############################### ###############################
# The visibility attribute is only support in some object formats # The visibility attribute is only support in some object formats
# This proc returns 1 if it is supported, 0 if not, -1 if unsure. # This proc returns 1 if it is supported, 0 if not.
proc check_visibility_available { } { proc check_visibility_available { } {
global visibility_available_saved
global tool
global target_triplet global target_triplet
global target_cpu
# On NetWare, support makes no sense. # On NetWare, support makes no sense.
if { [string match "*-*-netware*" $target_triplet] } { if { [string match "*-*-netware*" $target_triplet] } {
return 0 return 0
} }
# ELF supports it if the system has recent GNU ld and gas. if {![info exists visibility_available_saved] } {
# As a start we return 1 for all ELF systems; we'll let people set lines [get_compiler_messages visibility object {
# add exceptions as necessary. void f() __attribute__((visibility("hidden")));
void f() {}
set objformat [gcc_target_object_format] }]
if [string match "" $lines] then {
switch $objformat { set visibility_available_saved 1
elf { return 1 } } else {
mach-o { return 1 } set visibility_available_saved 0
unknown { return -1 } }
default { return 0 }
} }
return $visibility_available_saved
} }
############################### ###############################
......
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