patches/uClibc/0.9.29/160-custom-ISA.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 118 264aa721d2a4
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@118
     1
diff -dur uClibc-0.9.29.orig/extra/Configs/Config.mips uClibc-0.9.29/extra/Configs/Config.mips
yann@118
     2
--- uClibc-0.9.29.orig/extra/Configs/Config.mips	2007-03-16 20:38:14.000000000 +0100
yann@118
     3
+++ uClibc-0.9.29/extra/Configs/Config.mips	2007-05-22 19:30:43.000000000 +0200
yann@118
     4
@@ -71,4 +71,16 @@
yann@118
     5
 config CONFIG_MIPS_ISA_MIPS64
yann@118
     6
 	bool "MIPS64"
yann@118
     7
 
yann@118
     8
+config CONFIG_MIPS_ISA_CUSTOM
yann@118
     9
+	bool "Custom"
yann@118
    10
+
yann@118
    11
 endchoice
yann@118
    12
+
yann@118
    13
+config CONFIG_MIPS_CPU_CFLAGS_CUSTOM
yann@118
    14
+	string
yann@118
    15
+	prompt "Custon ISA"
yann@118
    16
+	depends on CONFIG_MIPS_ISA_CUSTOM
yann@118
    17
+	default ""
yann@118
    18
+	help
yann@118
    19
+	  Enter your custom ISA here (eg: lx4189!).
yann@118
    20
+
yann@118
    21
diff -dur uClibc-0.9.29.orig/Rules.mak uClibc-0.9.29/Rules.mak
yann@118
    22
--- uClibc-0.9.29.orig/Rules.mak	2007-04-17 15:34:11.000000000 +0200
yann@118
    23
+++ uClibc-0.9.29/Rules.mak	2007-05-22 19:31:48.000000000 +0200
yann@118
    24
@@ -234,6 +234,7 @@
yann@118
    25
 	CPU_CFLAGS-$(CONFIG_MIPS_N64_ABI)+=-mabi=64
yann@118
    26
 	CPU_CFLAGS-$(CONFIG_MIPS_O32_ABI)+=-mabi=32
yann@118
    27
 	CPU_CFLAGS-$(CONFIG_MIPS_N32_ABI)+=-mabi=n32
yann@118
    28
+	CPU_CFLAGS-$(CONFIG_MIPS_ISA_CUSTOM)+=-march=$(CONFIG_MIPS_CPU_CFLAGS_CUSTOM)
yann@118
    29
 endif
yann@118
    30
 
yann@118
    31
 ifeq ($(TARGET_ARCH),nios)