This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for g77 failures on !gnuld systems (was Re: rewrite lib/g77.exp)
- To: geoffk at geoffk dot org
- Subject: Patch for g77 failures on !gnuld systems (was Re: rewrite lib/g77.exp)
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Wed, 31 Oct 2001 11:19:56 -0500 (EST)
- Cc: gcc-patches at gcc dot gnu dot org
> > > All tests yield this error:
> > >
> > > > collect2: ld returned 1 exit status
> > > > compiler exited with status 1
> > > > output is:
> > > > /usr/ccs/bin/ld: illegal option -- -
> > > > usage: ld [-abc:d:e:f:h:il:mo:p:rstu:z:B:D:F:GI:L:M:N:P:Q:R:S:VY:] file(s)
> > > > [...]
> > >
> > > (I'm using native as/ld.)
> > >
> > > When I revert your g77.exp patch I get only 9 failures.
> >
> > Yes.
> >
> > I'm sure the problem is with the second of these lines:
> >
> > if [file exists "${gccpath}/libf2c/.libs/libg2c.so"] {
> > append flags "-Wl,--rpath-link,${rootme} "
> > append ld_library_path ":${gccpath}/libf2c/.libs"
> > }
> >
> > which is GNU ld specific; it aims to ensure that the just-built
> > libgcc_s.so is linked against. Can you propose a substitute for it
> > that works with both Solaris ld and GNU ld?
>
>
> What's wrong with:
>
> > append ld_library_path ":${rootme}"
>
> like in g++.exp?
> --Kaveh
Geoff,
In thinking about this more, --rpath-link can't be the way to go.
Since its gnu-ld specific, it condemns every other platform that
supports shared libs to fail all fortran tests. Adding flags as you
suggest for each platform essentially means reimplementing libtool in
dejagnu TCL.
No other .exp file does this including g++.exp, which you claimed to
have used as your template for this change. They all rely on
LB_LIBRARY_PATH and it seems to work. So I don't understand why you
think --rpath-link is needed. Can you please educate me?
Otherwise, I think this patch is the right thing. I tested it and it
works I think because the "append ld_library_path" line I suggested
above is already in the file a few lines down.
Ok to install?
Thanks,
--Kaveh
2001-10-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lib/g77.exp: Don't use a gnu-ld specific flag.
--- egcs-CVS20011029/gcc/testsuite/lib/g77.exp~ Sun Oct 28 19:12:46 2001
+++ egcs-CVS20011029/gcc/testsuite/lib/g77.exp Tue Oct 30 19:14:22 2001
@@ -84,7 +84,6 @@ proc g77_link_flags { paths } {
if [file exists "${gccpath}/libf2c/.libs/libg2c.a"] {
append flags "-L${gccpath}/libf2c/.libs "
if [file exists "${gccpath}/libf2c/.libs/libg2c.so"] {
- append flags "-Wl,--rpath-link,${rootme} "
append ld_library_path ":${gccpath}/libf2c/.libs"
}
}