Commit bfa21a28 by Mark Mitchell Committed by Mark Mitchell

file-format.exp (gcc_target_object_format): Use ${tool}_target_compile, not gcc_target_compile.

	* lib/file-format.exp (gcc_target_object_format): Use
	${tool}_target_compile, not gcc_target_compile.
	* lib/target-supports.exp (check_alias_available): Likewise.
	(check_gc_sections_available): Likewise.
	* g++.dg/ext/attrib10.C: Use dg-require-alias.
	* g++.old-deja/g++.ext/attrib5.C: Use dg-require-weak and
	dg-require-alias.

From-SVN: r77295
parent f63fd68b
...@@ -5,6 +5,16 @@ ...@@ -5,6 +5,16 @@
2004-02-04 Mark Mitchell <mark@codesourcery.com> 2004-02-04 Mark Mitchell <mark@codesourcery.com>
* lib/file-format.exp (gcc_target_object_format): Use
${tool}_target_compile, not gcc_target_compile.
* lib/target-supports.exp (check_alias_available): Likewise.
(check_gc_sections_available): Likewise.
* g++.dg/ext/attrib10.C: Use dg-require-alias.
* g++.old-deja/g++.ext/attrib5.C: Use dg-require-weak and
dg-require-alias.
2004-02-04 Mark Mitchell <mark@codesourcery.com>
PR c++/13969 PR c++/13969
* g++.dg/template/static6.C: New test. * g++.dg/template/static6.C: New test.
......
// PR c++/12795 // PR c++/12795
// { dg-require-alias "" }
void foo() void foo()
{ {
......
// { dg-do run { xfail alpha*-dec-osf* *-*-hms i?86-pc-cygwin *-*-coff hppa2*-hp-hpux11* } } // { dg-do run { xfail alpha*-dec-osf* *-*-hms i?86-pc-cygwin *-*-coff } }
// Test that attributes weak and alias coexist. // Test that attributes weak and alias coexist.
// { dg-require-weak "" }
// { dg-require-alias "" }
extern "C" { extern "C" {
void f () __attribute__((weak, alias ("_f"))); void f () __attribute__((weak, alias ("_f")));
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
proc gcc_target_object_format { } { proc gcc_target_object_format { } {
global gcc_target_object_format_saved global gcc_target_object_format_saved
global tool
if [info exists gcc_target_object_format_saved] { if [info exists gcc_target_object_format_saved] {
verbose "gcc_target_object_format returning saved $gcc_target_object_format_saved" 2 verbose "gcc_target_object_format returning saved $gcc_target_object_format_saved" 2
...@@ -33,7 +34,7 @@ proc gcc_target_object_format { } { ...@@ -33,7 +34,7 @@ proc gcc_target_object_format { } {
puts $open_file "void foo(void) { }" puts $open_file "void foo(void) { }"
close $open_file close $open_file
gcc_target_compile objfmtst.c objfmtst.o object "" ${tool}_target_compile objfmtst.c objfmtst.o object ""
catch { catch {
set output [exec $objdump_name --file-headers objfmtst.o ] set output [exec $objdump_name --file-headers objfmtst.o ]
......
...@@ -99,6 +99,7 @@ proc check_visibility_available { } { ...@@ -99,6 +99,7 @@ proc check_visibility_available { } {
proc check_alias_available { } { proc check_alias_available { } {
global alias_available_saved global alias_available_saved
global tool
if [info exists alias_available_saved] { if [info exists alias_available_saved] {
verbose "check_alias_available returning saved $alias_available_saved" 2 verbose "check_alias_available returning saved $alias_available_saved" 2
...@@ -110,7 +111,7 @@ proc check_alias_available { } { ...@@ -110,7 +111,7 @@ proc check_alias_available { } {
# about the program. # about the program.
puts $f "void g() {} void f() __attribute__((alias(\"g\")));" puts $f "void g() {} void f() __attribute__((alias(\"g\")));"
close $f close $f
set lines [gcc_target_compile "tmp.c" "tmp.o" object ""] set lines [${tool}_target_compile "tmp.c" "tmp.o" object ""]
file delete "tmp.c" file delete "tmp.c"
if [string match "" $lines] then { if [string match "" $lines] then {
...@@ -148,10 +149,11 @@ proc check_alias_available { } { ...@@ -148,10 +149,11 @@ proc check_alias_available { } {
proc check_gc_sections_available { } { proc check_gc_sections_available { } {
global gc_sections_available_saved global gc_sections_available_saved
global tool
if {![info exists gc_sections_available_saved]} { if {![info exists gc_sections_available_saved]} {
# Check if the ld used by gcc supports --gc-sections. # Check if the ld used by gcc supports --gc-sections.
set gcc_ld [lindex [gcc_target_compile "-print-prog-name=ld" "" "none" ""] 0] set gcc_ld [lindex [${tool}_target_compile "-print-prog-name=ld" "" "none" ""] 0]
set ld_output [remote_exec host "$gcc_ld" "--help"] set ld_output [remote_exec host "$gcc_ld" "--help"]
if { [ string first "--gc-sections" $ld_output ] >= 0 } { if { [ string first "--gc-sections" $ld_output ] >= 0 } {
set gc_sections_available_saved 1 set gc_sections_available_saved 1
......
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