This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Results for egcs-2.91.42 19980621 (gcc2 ss-980502 experimental) testsuite on sparc-sun-sunos4.1.3
- To: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Subject: Re: Results for egcs-2.91.42 19980621 (gcc2 ss-980502 experimental) testsuite on sparc-sun-sunos4.1.3
- From: Dave Love <d dot love at dl dot ac dot uk>
- Date: 25 Jun 1998 10:42:59 +0100
- Cc: Craig Burley <burley at gnu dot org>, egcs at cygnus dot com
- References: <199806241515.LAA11786@melange.gnu.org> <orzpf2d4w6.fsf@zecarneiro.lsd.dcc.unicamp.br>
>>>>> "AO" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:
AO> oliva@atibaia% egcsc cabs.f -lg2c
AO> /n/temp1/gcctest/egcs/SunOS-4.1.3/lib/gcc-lib/sparc-sun-sunos4.1.3/egcs-2.91.42/libg2c.a(cabs.o): In function `f__cabs':
AO> /n/temp1/gcctest/bin/../src/egcs/libf2c/libF77/cabs.c:25: undefined reference to `sqrt'
AO> collect2: ld returned 1 exit status
AO> oliva@atibaia% egcsc cabs.f -lg2c -lm
AO> oliva@atibaia% ./a.out
I suspect that's not testing the right thing, though. You should use
the `g77' driver, which is analagous to the `g++' one; the `-v' switch
can be helpful. What's the output from the test in the testsuite
g77.log?
AO> Does anyone know how we can add `-lm' to the link command of this test
AO> program, iff libm exists?
The relevant line from `g77 -v cabs.f' on a non-egcs installation I
have available on sunos4 is this (which works):
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.7.2.3.f.1/ld -e start -dc -dp /lib/crt0.o -L/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.7.2.3.f.1 -L/usr/local/lib /tmp/cca196901.o -lf2c -lm -lgcc -lc -lgcc
(You should see -lg2c now, not -lf2c.) If it's really a problem with
-lm, the question is whether the library list needs to be permuted or
added to somehow. Thanks for any light you can shed.