patches/uClibc/0.9.29/170-filter-gnu99-from-assembly-flags.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jul 31 09:08:33 2008 +0000 (2008-07-31)
changeset 752 b037a5643e04
parent 498 fc7db1806873
permissions -rw-r--r--
Have the glibc build use the cross-objdump, rather than the host one.
On some distros (eg. Fedora), the native objdump can not interpret objects not for the native system, and thus fail.
This commit adds a new patch against glibc-2.7 that introduces OBJDUMP_FOR_HOST, wich, if set, overides the detected objdump.

Note: bizarely enough, glibc already has code to detect the cross-objdump, but that does not work for an unknown reason... :-(

/trunk/patches/glibc/2.7/220-objdump_for_host.patch | 13 13 0 0 +++++++++
/trunk/scripts/build/libc_glibc.sh | 37 21 16 0 +++++++++++++++------------
2 files changed, 34 insertions(+), 16 deletions(-)
yann@498
     1
diff -ur uClibc-0.9.29/Makerules uClibc-0.9.29-patched/Makerules
yann@498
     2
--- uClibc-0.9.29/Makerules	2006-12-10 18:25:23.000000000 -0600
yann@498
     3
+++ uClibc-0.9.29-patched/Makerules	2008-01-26 17:04:50.965699518 -0600
yann@498
     4
@@ -96,7 +96,7 @@
yann@498
     5
 disp_ld        = $($(DISP)_disp_ld)
yann@498
     6
 
yann@498
     7
 cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $(^D)))) $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) $(CFLAGS-$(notdir $<)) $(CFLAGS-$(notdir $@))
yann@498
     8
-cmd_compile.S = $(cmd_compile.c) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
yann@498
     9
+cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
yann@498
    10
 cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
yann@498
    11
 cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@))
yann@498
    12
 cmd_strip     = $(STRIPTOOL) $(STRIP_FLAGS) $^