From f2f09efd48f307031147d7d5b66e370a544a26b6 Mon Sep 17 00:00:00 2001 From: andreast Date: Fri, 11 Nov 2005 21:41:55 +0000 Subject: [PATCH] 2005-11-11 Andreas Tobler * gfortran.dg/static_linking_1.f: Fix static_libgfortran processing. * lib/target-supports.exp (check_effective_target_static_libgfortran): Add -static to additional_flags and pass it to target_compile. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106800 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gfortran.dg/static_linking_1.f | 2 +- gcc/testsuite/lib/target-supports.exp | 5 +++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a807562a663..03be1ca6625 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2005-11-11 Andreas Tobler + + * gfortran.dg/static_linking_1.f: Fix static_libgfortran processing. + + * lib/target-supports.exp (check_effective_target_static_libgfortran): + Add -static to additional_flags and pass it to target_compile. + 2005-11-11 Jerry DeLisle PR libgfortran/24719 diff --git a/gcc/testsuite/gfortran.dg/static_linking_1.f b/gcc/testsuite/gfortran.dg/static_linking_1.f index 5107a07da77..099f4d48506 100644 --- a/gcc/testsuite/gfortran.dg/static_linking_1.f +++ b/gcc/testsuite/gfortran.dg/static_linking_1.f @@ -1,5 +1,5 @@ -! { dg-require-effective-target static_libgfortran } ! { dg-do run } +! { dg-require-effective-target static_libgfortran } ! { dg-additional-sources static_linking_1.c } ! { dg-options "-static" } ! diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 38eb91ad197..5b770dc5ca4 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -634,8 +634,9 @@ proc check_effective_target_static_libgfortran { } { # Set up, compile, and execute a test program using static linking. # Include the current process ID in the file names to prevent # conflicts with invocations for multiple testsuites. + set opts "additional_flags=-static" set src static[pid].f - set exe static[pid].x + set exe static[pid].x set f [open $src "w"] puts $f " print *, 'test'" @@ -643,7 +644,7 @@ proc check_effective_target_static_libgfortran { } { close $f verbose "check_effective_target_static_libgfortran compiling testfile $src" 2 - set lines [${tool}_target_compile $src $exe executable "-static"] + set lines [${tool}_target_compile $src $exe executable "$opts"] file delete $src if [string match "" $lines] then { -- 2.11.0