This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Results for egcs-2.91.42 19980621 (gcc2 ss-980502 experimental) testsuite on sparc-sun-sunos4.1.3


>oliva@atibaia% egcsc cabs.f -lg2c    
>/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':
>/n/temp1/gcctest/bin/../src/egcs/libf2c/libF77/cabs.c:25: undefined reference to `sqrt'
>collect2: ld returned 1 exit status
>oliva@atibaia% egcsc cabs.f -lg2c -lm
>oliva@atibaia% ./a.out    
>
>Does anyone know how we can add `-lm' to the link command of this test
>program, iff libm exists?

The g77 driver does this automatically.  By "this" I mean adds -lg2c -lm.
In fact, I think if you specify -lg2c, it adds -lm after it; and if
you specify -lm, it adds -lg2c before it.  Haven't tested that for
awhile.  (But most of this is only since snapshot 19980615 or so;
before that, adding -lg2c -lm was done rather "mechanically".)

        tq vm, (burley)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]