This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix for cyclic dependency between libc.a and libgcc.a
On Thu, May 5, 2011 at 12:50 PM, Roland McGrath <roland@hack.frob.com> wrote:
>
> > One of our ARM builds failed to link some of the static libc executables with
> > __aeabi_i2d and __aeabi_dsub (defined in libgcc.a, referenced from libc.a)
> > due to intra-library cyclic dependencies.
> >
> > I wonder if attached patch is a reasonable way to fix this.
>
> It might be. ?What does the normal gcc lib_spec produce under -static for
> the installed analogue of this situation?
I may not have understood your question correctly, if so apologies.
echo "int main() { return 0; }" | gcc -xc - -static -v
results (on Ubuntu 10.04) in:
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/collect2 --build-id -m elf_x86_64 \
--hash-style=both -static ... /tmp/ccISUurC.o \
--start-group -lgcc -lgcc_eh -lc --end-group \
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/crtend.o ...
which (AFAICT) is the same as what I am doing with this patch.
Thanks,
--
Paul Pluzhnikov