diff mbox

[libgfortran] path to libquadmath

Message ID 20101210165825.GA28835@hiauly1.hia.nrc.ca
State New
Headers show

Commit Message

John David Anglin Dec. 10, 2010, 4:58 p.m. UTC
On Sun, 28 Nov 2010, Ralf Wildenhues wrote:

> * John David Anglin wrote on Sun, Nov 28, 2010 at 09:42:43PM CET:
> > The current relative path to libquadmath can be incorrectly interpreted
> > on systems that hard code library paths.  In particular, on 32-bit
> > hppa*-*hpux*, the '..' part of the path is relative to the final executable.
> > As a result, all libgfortran tests fail due to a dynamic loader error.
> > 
> > The patch changes the path to an absolute path.
> > 
> > Tested on hppa2.0w-hp-hpux11.11 and i686-apple-darwin9 with no observed
> > regressions.
> > 
> > OK for trunk?
> 
> That doesn't seem to make sense to me.  The fix should be in ltmain.sh
> or in libtool.m4.  Please post the output of how libquadmath is linked
> on your system (the 'libtool --mode=link' command plus all of its
> output).

The attached change to ltmain.sh fixes the above problem on on 32-bit
hppa*-*hpux*.  Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.

Would you please apply if ok to libtool, gcc and sourceware?

Thanks,
Dave

Comments

John David Anglin Dec. 19, 2010, 4:04 p.m. UTC | #1
Ping.

On Fri, 10 Dec 2010, John David Anglin wrote:

> On Sun, 28 Nov 2010, Ralf Wildenhues wrote:
> 
> > * John David Anglin wrote on Sun, Nov 28, 2010 at 09:42:43PM CET:
> > > The current relative path to libquadmath can be incorrectly interpreted
> > > on systems that hard code library paths.  In particular, on 32-bit
> > > hppa*-*hpux*, the '..' part of the path is relative to the final executable.
> > > As a result, all libgfortran tests fail due to a dynamic loader error.
> > > 
> > > The patch changes the path to an absolute path.
> > > 
> > > Tested on hppa2.0w-hp-hpux11.11 and i686-apple-darwin9 with no observed
> > > regressions.
> > > 
> > > OK for trunk?
> > 
> > That doesn't seem to make sense to me.  The fix should be in ltmain.sh
> > or in libtool.m4.  Please post the output of how libquadmath is linked
> > on your system (the 'libtool --mode=link' command plus all of its
> > output).
> 
> The attached change to ltmain.sh fixes the above problem on on 32-bit
> hppa*-*hpux*.  Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.
> 
> Would you please apply if ok to libtool, gcc and sourceware?
> 
> Thanks,
> Dave
> -- 
> J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
> National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
> 
> 2010-12-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
> 
> 	* ltmain.sh (relink): Use absolute path when hardcoding with -L.
> 
> Index: ltmain.sh
> ===================================================================
> --- ltmain.sh	(revision 167668)
> +++ ltmain.sh	(working copy)
> @@ -5928,7 +5928,7 @@
>  	         test "$hardcode_direct_absolute" = no; then
>  		add="$dir/$linklib"
>  	      elif test "$hardcode_minus_L" = yes; then
> -		add_dir="-L$dir"
> +		add_dir="-L$absdir"
>  		# Try looking first in the location we're being installed to.
>  		if test -n "$inst_prefix_dir"; then
>  		  case $libdir in

Dave
Ralf Wildenhues Dec. 19, 2010, 6:31 p.m. UTC | #2
* John David Anglin wrote on Sun, Dec 19, 2010 at 05:04:36PM CET:
> Ping.
> 
> On Fri, 10 Dec 2010, John David Anglin wrote:
> > The attached change to ltmain.sh fixes the above problem on on 32-bit
> > hppa*-*hpux*.  Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.
> > 
> > Would you please apply if ok to libtool, gcc and sourceware?

Sorry for the delay, I really would like to test the patch on the
Libtool tree on a couple of systems, and write a Libtool testsuite
addition for it, so we don't regress in the future.  I hope to get
to it before the end of the calendar year.

If you'd like to help, you can download the Libtool source tree
(git or nightly tarball from the website), apply the patch, run
'make -k check' and send the log files the output tells to send,
on the HP systems you have available for testing.

Thanks,
Ralf

> > 2010-12-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
> > 
> > 	* ltmain.sh (relink): Use absolute path when hardcoding with -L.
> > 
> > Index: ltmain.sh
> > ===================================================================
> > --- ltmain.sh	(revision 167668)
> > +++ ltmain.sh	(working copy)
> > @@ -5928,7 +5928,7 @@
> >  	         test "$hardcode_direct_absolute" = no; then
> >  		add="$dir/$linklib"
> >  	      elif test "$hardcode_minus_L" = yes; then
> > -		add_dir="-L$dir"
> > +		add_dir="-L$absdir"
> >  		# Try looking first in the location we're being installed to.
> >  		if test -n "$inst_prefix_dir"; then
> >  		  case $libdir in
diff mbox

Patch

Index: ltmain.sh
===================================================================
--- ltmain.sh	(revision 167668)
+++ ltmain.sh	(working copy)
@@ -5928,7 +5928,7 @@ 
 	         test "$hardcode_direct_absolute" = no; then
 		add="$dir/$linklib"
 	      elif test "$hardcode_minus_L" = yes; then
-		add_dir="-L$dir"
+		add_dir="-L$absdir"
 		# Try looking first in the location we're being installed to.
 		if test -n "$inst_prefix_dir"; then
 		  case $libdir in