This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Gcc 3.2 compiler driver bug (?)
- From: Sergey Ostrovsky <sostrovs at kns dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 09 Sep 2002 15:13:02 -0400
- Subject: Gcc 3.2 compiler driver bug (?)
Hello,
I've built Gcc 3.2 on Sun Solaris 7. It uses binutils-2.12.1.
The build of
char mkstemps();
int main()
{
mkstemps();
return 0;
}
(1)
invoking
gcc -L/sw/sostrovs/99th/lib -liberty test.c
( or gcc -Wl,-L/sw/sostrovs/99th/lib,-liberty test.c )
fails with
/var/tmp//ccWoI2Qs.o: In function `main':
/var/tmp//ccWoI2Qs.o(.text+0x4): undefined reference to `mkstemps'
collect2: ld returned 1 exit status
(2)
invoking
gcc test.c -L/sw/sostrovs/99th/lib -liberty
does the job.
I tried these examples with -v and noticed that "-L/sw/sostrovs/99th/lib
-liberty" thing
just isn't passed to the collect2 in the (1), but is in (2).
gcc --help says
Usage: gcc [options] file...
Please tell me what I did wrong.
Thank you.
Sergey Ostrovsky.