From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Love To: Alexandre Oliva Cc: Craig Burley , egcs@cygnus.com Subject: Re: Results for egcs-2.91.42 19980621 (gcc2 ss-980502 experimental) testsuite on sparc-sun-sunos4.1.3 Date: Thu, 25 Jun 1998 06:50:00 -0000 Message-id: References: <199806241515.LAA11786@melange.gnu.org> X-SW-Source: 1998-06/msg00898.html >>>>> "AO" == Alexandre Oliva 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.