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]
Other format: [Raw text]

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.


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