diff mbox

[libgomp,testsuite] add libgfortran.spec.

Message ID BD480C51-EFC4-42AD-906D-AAE376D8751E@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Nov. 25, 2010, 11:18 a.m. UTC
This will allow fortran  libgomp tests to use libquadmath when  
required (I'm told none do yet).
.. but it will also ensure that, if the libgfortran.spec includes  
substitutions, they are available in the testsuite.

checked (in conjunction with http://gcc.gnu.org/ml/fortran/2010-11/msg00348.html) 
  that the static lib substitution occurs properly for i686-darwin9.

OK for trunk (with a proper Changelog, of course)?
Iain

{lang_library_path}:${blddir}/${quadmath_library_path}"
      } else {
          set ld_library_path "$always_ld_library_path"


===

Comments

Jakub Jelinek Nov. 25, 2010, 6:11 p.m. UTC | #1
On Thu, Nov 25, 2010 at 11:18:41AM +0000, IainS wrote:
> This will allow fortran  libgomp tests to use libquadmath when
> required (I'm told none do yet).
> .. but it will also ensure that, if the libgfortran.spec includes
> substitutions, they are available in the testsuite.
> 
> checked (in conjunction with
> http://gcc.gnu.org/ml/fortran/2010-11/msg00348.html) that the static
> lib substitution occurs properly for i686-darwin9.
> 
> OK for trunk (with a proper Changelog, of course)?

This is wrong.  If anything (we don't have any test that needs it),
it should be adding -B${blddir}/${lang_spec_path}/ being added,
to let the driver find it automatically if it wants to.
But forcing -specs when the driver doesn't want it just means
we would be testing something that isn't done in the installed compiler.

	Jakub
Iain Sandoe Nov. 25, 2010, 6:41 p.m. UTC | #2
On 25 Nov 2010, at 18:11, Jakub Jelinek wrote:

> On Thu, Nov 25, 2010 at 11:18:41AM +0000, IainS wrote:
>> This will allow fortran  libgomp tests to use libquadmath when
>> required (I'm told none do yet).
>> .. but it will also ensure that, if the libgfortran.spec includes
>> substitutions, they are available in the testsuite.
>>
>> checked (in conjunction with
>> http://gcc.gnu.org/ml/fortran/2010-11/msg00348.html) that the static
>> lib substitution occurs properly for i686-darwin9.
>>
>> OK for trunk (with a proper Changelog, of course)?
>
> This is wrong.  If anything (we don't have any test that needs it),

well, we can't test -static-libgfortran without it on darwin (assuming  
that we implement that).

> it should be adding -B${blddir}/${lang_spec_path}/ being added,
> to let the driver find it automatically if it wants to.
> But forcing -specs when the driver doesn't want it just means
> we would be testing something that isn't done in the installed  
> compiler.

AFAIU, the installed driver is gfortran - which understands/adds the  
spec...

...  the libgomp testsuite is driven by xgcc - which doesn't.

(I believe you would have to do the same if you wished to build a  
quadmath fortran program from the c/l using 'gcc')

Iain
diff mbox

Patch

Index: libgomp/testsuite/libgomp.fortran/fortran.exp
===================================================================
--- libgomp/testsuite/libgomp.fortran/fortran.exp	(revision 167142)
+++ libgomp/testsuite/libgomp.fortran/fortran.exp	(working copy)
@@ -8,6 +8,7 @@  set lang_library_path	"../libgfortran/.libs"
  set lang_link_flags	"-lgfortran"
  set lang_test_file_found 0
  set quadmath_library_path "../libquadmath/.libs"
+set lang_spec_path "../libgfortran"


  # Initialize dg.
@@ -44,6 +45,8 @@  if { $lang_test_file_found } {
  	lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/"
  	# Allow for spec subsitution.
  	lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/$ 
{quadmath_library_path}/"
+	# use the libgfortran spec.
+	lappend ALWAYS_CFLAGS "additional_flags=-specs=${blddir}/$ 
{lang_spec_path}/libgfortran.spec"
  	set ld_library_path "$always_ld_library_path:${blddir}/$