summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-15 07:40:58 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-15 07:40:58 +0000
commit86fffacc269de9e2e8bfc126fc78627fb690e91a (patch)
treea52e9179068d43033a18c21d608ae4b5d615b666 /libc
parent62ac74d3f2b957bc91f91a03d93fa523e9a80c9f (diff)
setup OUTPUT_FORMAT() in linker script (helps with multilib)
Diffstat (limited to 'libc')
-rw-r--r--libc/Makefile.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 6896952af..b769dfca2 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -54,6 +54,8 @@ lib-gdb-y += $(top_builddir)lib/libc.gdb
lib-so-y += $(libc)
objclean-y += libc_clean
+OUTPUT_FORMAT = $(CC) $(CFLAGS) $(LDFLAGS) -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p'
+
ifeq ($(DOMULTI),n)
$(libc:.$(MAJOR_VERSION)=): $(libc_OUT)/libc_so.a $(LIBS-libc.so)
$(call link.so,$(libc_FULL_NAME),$(MAJOR_VERSION))
@@ -64,6 +66,7 @@ $(libc:.$(MAJOR_VERSION)=): $(libc_OUT)/libc.oS $(libc-nomulti-y:.o=.oS) | $(LIB
endif
$(Q)$(RM) $@
$(Q)cp $(top_srcdir)extra/scripts/format.lds $@
+ $(Q)echo "OUTPUT_FORMAT ( $(shell $(OUTPUT_FORMAT)) )" >> $@
ifeq ($(COMPAT_ATEXIT),y)
$(Q)echo "GROUP ( $(NONSHARED_LIBNAME) $(SHARED_MAJORNAME) $(ASNEEDED) )" >> $@
else