This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[patch] Fix for cyclic dependency between libc.a and libgcc.a
- From: ppluzhnikov at google dot com (Paul Pluzhnikov)
- To: libc-alpha at sourceware dot org
- Cc: ppluzhnikov at google dot com, kbaclawski at google dot com
- Date: Thu, 5 May 2011 10:43:06 -0700 (PDT)
- Subject: [patch] Fix for cyclic dependency between libc.a and libgcc.a
Greetings,
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.
Thanks,
--
Paul Pluzhnikov
2011-05-05 Paul Pluzhnikov <ppluzhnikov@google.com>
* Makeconfig (link-libc-static): Work around cyclic dependency
between libgcc.a and libc.a
diff --git a/Makeconfig b/Makeconfig
index 0c4c75a..4d91458 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -531,7 +531,7 @@ endif
# The static libraries.
ifeq (yes,$(build-static))
-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
+link-libc-static = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib) -Wl,--end-group
else
ifeq (yes,$(build-shared))
# We can try to link the programs with lib*_pic.a...