From mboxrd@z Thu Jan 1 00:00:00 1970 From: Craig Burley To: oliva@dcc.unicamp.br Cc: egcs@cygnus.com Subject: Re: Results for egcs-2.91.42 19980621 (gcc2 ss-980502 experimental) testsuite on sparc-sun-sunos4.1.3 Date: Wed, 24 Jun 1998 21:23:00 -0000 Message-id: <199806242351.TAA00883@melange.gnu.org> References: X-SW-Source: 1998-06/msg00880.html >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)