This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

[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...


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