On Sun, Jan 20, 2002 at 05:32:49PM -0500, Ben Collins wrote: > > > The error seems to be in the specs file. In mine, I have: > > > > > > *libgcc: > > > %{shared-libgcc:-lgcc_s%M > > > -lgcc}%{static-libgcc:-lgcc}%{!shared-libgcc:%{!static-libgcc:%{shared:-lgcc_s%M > > > -lgcc}}}%{!shared-libgcc:%{!static-libgcc:%{!shared:-lgcc}}} > > > > > > This pretty much decrypts into: > > > > > > - If -shared-libgcc, then use -lgcc_s > > > - If -static-libgcc, then use -lgcc > > > - If not -static-libgcc or -shared-libgcc, and -shared, then use -lgcc_s > > > - If not -static-libgcc or -shared-libgcc, and -static, then use -lgcc > > > > > > > > > And that is exactly what it should be, and should work. > > > > I'm not following you. Are you saying that the specs file reads > > correctly and is being interpreted incorrectly? > > Does your specs file have that in it? If so, then execute with -V so > you get the cc1 command line and can see what it passes.
My specs file has the same entry you quoted above. The -v (not -V) switch says: gcc version 3.0.3 20011212 (Debian prerelease) /usr/lib/gcc-lib/i386-linux/3.0.3/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o bin/ssem /usr/lib/gcc-lib/i386-linux/3.0.3/../../../crt1.o /usr/lib/gcc-lib/i386-linux/3.0.3/../../../crti.o /usr/lib/gcc-lib/i386-linux/3.0.3/crtbegin.o -L/usr/lib/gcc-lib/i386-linux/3.0.3 -L/usr/lib/gcc-lib/i386-linux/3.0.3/../../.. <objects> -static -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc-lib/i386-linux/3.0.3/crtend.o /usr/lib/gcc-lib/i386-linux/3.0.3/../../../crtn.o I've tried combinations of -static and -shared-libgcc and -static-libgcc. The -lgcc and -lgcc_s switches do not vary. Once the link I inserted from libgcc.a to libgcc_s.a is removed, the link fails every time. So, either your interpretation differs from that which gcc performs, or gcc isn't performing as expected.