Hi,

I want to commit the following change, which is required for Xtensa. It
doesn't affect architectures that do provide the OUTPUT_FORMAT(...) line
in their linker script (as printed by 'gcc -Wl,--verbose')

Thanks,
-Chris

Omit 'OUTPUT_FORMAT' in the libc.so linker script if none was
provided by the compiler. The Xtensa linker script, for example,
doesn't use it and, thus, the linker fails.

Signed-off-by: Chris Zankel <[EMAIL PROTECTED]>

Index: libc/Makefile.in
===================================================================
--- uclibc.orig/libc/Makefile.in        (revision 20928)
+++ uclibc/libc/Makefile.in     (working copy)
@@ -54,7 +54,8 @@
 lib-so-y += $(libc)
 objclean-y += libc_clean
 
-OUTPUT_FORMAT = $(CC) $(CFLAGS) -Wl,--verbose 2>&1 | sed -n 
's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p'
+OUTPUT_FORMAT_CMD = $(CC) $(CFLAGS) -Wl,--verbose 2>&1 | sed -n 
's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p'
+OUTPUT_FORMAT := $(shell $(OUTPUT_FORMAT_CMD))
 
 ifeq ($(DOMULTI),n)
 $(libc:.$(MAJOR_VERSION)=): $(libc_OUT)/libc_so.a $(LIBS-libc.so)
@@ -66,7 +67,9 @@
 endif
        $(Q)$(RM) $@
        $(Q)cp $(top_srcdir)extra/scripts/format.lds $@
+ifneq ($(OUTPUT_FORMAT),)
        $(Q)echo "OUTPUT_FORMAT ( $(shell $(OUTPUT_FORMAT)) )" >> $@
+endif
 ifeq ($(COMPAT_ATEXIT),y)
        $(Q)echo "GROUP ( $(NONSHARED_LIBNAME) $(SHARED_MAJORNAME) $(ASNEEDED) 
)" >> $@
 else

_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Reply via email to