patches/uClibc/0.9.29/160-custom-ISA.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Sat Jan 04 01:02:57 2014 +0100 (2014-01-04)
changeset 3271 c65dc9b98841
parent 118 264aa721d2a4
permissions -rw-r--r--
cc/gcc: diable libsanitizer without NPTL

gcc-4.8 comes with a new library to sanitise memory access:
- heap-, stack-, and global-buffer overflow, use-after-free
- data-races between threads

This library requires some _np parts of the API, which are not
implemented in the (old) LinuxThreads, which is still available
in uClibc.

Since NPTL requires a i486 or above, i386 are stuck with using LT,
which precludes building the libsanitizer.

Disable libsanitizer, a bit like libatomic is.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Niels Penneman <niels@penneman.org>
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)