Re: GCC-3.0, -static, and -shared-libgcc
On Sun, Jan 20, 2002 at 02:17:15PM -0800, elf@florence.buici.com wrote:
> On Sun, Jan 20, 2002 at 04:53:20PM -0500, Ben Collins wrote:
> > > This fails
> > >
> > > g++-3.0 -o bin/program o/object1.o ... -static
> > >
> > > because gcc-3.0 cannot find the libgcc_s.a file.
> > >
> > > /usr/bin/ld: cannot find -lgcc_s
> >
> > It shouldn't be looking for libgcc_s.a, it should use libgcc.a (which is
> > in /usr/lib/gcc-lib/..../).
>
> I agree.
>
> > 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.
--
.----------=======-=-======-=========-----------=====------------=-=-----.
/ Ben Collins -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'
Reply to: