Omit OUTPUT_FORMAT in the libc.so linker script if none was provided
Chris Zankel
chris at zankel.net
Thu Feb 7 21:58:09 UTC 2008
Hi Bernhard,
Thanks for you comment. That's certainly a much cleaner way. I modified
the patch and intend to commit it over the weekend. I've tested in on
Xtensa and i386.
Thanks,
-Chris
Bernhard Fischer wrote:
> On Tue, Feb 05, 2008 at 03:06:34PM -0800, Chris Zankel wrote:
>> 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')
>
> Just
>
>> -OUTPUT_FORMAT = $(CC) $(CFLAGS) -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p'
> +OUTPUT_FORMAT = $(CC) $(CFLAGS) -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/OUTPUT_FORMAT ( \1 )/p'
>
> should do what you seem to want to achieve and is less bloated.
>
Index: libc/Makefile.in
===================================================================
--- libc/Makefile.in (revision 20928)
+++ libc/Makefile.in (working copy)
@@ -54,7 +54,7 @@
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 = $(CC) $(CFLAGS) -Wl,--verbose 2>&1 | sed -n
's/^OUTPUT_FORMAT("\([^"]*\)",.*/OUTPUT_FORMAT ( \1 )/p'
ifeq ($(DOMULTI),n)
$(libc:.$(MAJOR_VERSION)=): $(libc_OUT)/libc_so.a $(LIBS-libc.so)
@@ -66,7 +66,7 @@
endif
$(Q)$(RM) $@
$(Q)cp $(top_srcdir)extra/scripts/format.lds $@
- $(Q)echo "OUTPUT_FORMAT ( $(shell $(OUTPUT_FORMAT)) )" >> $@
+ $(Q)echo "$(shell $(OUTPUT_FORMAT))" >> $@
ifeq ($(COMPAT_ATEXIT),y)
$(Q)echo "GROUP ( $(NONSHARED_LIBNAME) $(SHARED_MAJORNAME)
$(ASNEEDED) )" >> $@
else
More information about the uClibc
mailing list