base-files: link libpthread against libc
[openwrt.git] / toolchain / uClibc / patches-0.9.32 / 960-remove_eabi_oabi_selection.patch
1 Rely on the compiler to be properly setup for the default ABI.
2
3 When installing-headers, there are two cases:
4 - NPTL: no issue, a cross-compiler is already expected
5 - LinuxThreads: no issue, EABI/OABI has no impact on installed headers.
6
7 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
8 Cc: Khem Raj <raj.khem@gmail.com>
9 Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
10 Cc: Carmelo AMOROSO <carmelo.amoroso@st.com>
11 ---
12 extra/Configs/Config.arm | 11 -----------
13 libc/sysdeps/linux/arm/Makefile.arch | 9 +++++++--
14 libc/sysdeps/linux/arm/bits/huge_val.h | 4 ++--
15 3 files changed, 9 insertions(+), 15 deletions(-)
16
17 --- a/extra/Configs/Config.arm
18 +++ b/extra/Configs/Config.arm
19 @@ -12,17 +12,6 @@ config FORCE_OPTIONS_FOR_ARCH
20 default y
21 select ARCH_ANY_ENDIAN
22
23 -config CONFIG_ARM_EABI
24 - bool "Build for EABI"
25 - help
26 - If you say 'y' here, functions and constants required by the
27 - ARM EABI will be built into the library. You should say 'y'
28 - if your compiler uses the ARM EABI, in which case you will also
29 - need a kernel supporting the EABI system call interface.
30 -
31 - If you say 'n' here, then the library will be built for the
32 - old Linux ABI.
33 -
34 config COMPILE_IN_THUMB_MODE
35 bool "Build using Thumb mode"
36 select USE_BX
37 --- a/libc/sysdeps/linux/arm/Makefile.arch
38 +++ b/libc/sysdeps/linux/arm/Makefile.arch
39 @@ -24,7 +24,12 @@ ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
40 CSRC += posix_fadvise.c posix_fadvise64.c
41 endif
42
43 -ifeq ($(CONFIG_ARM_EABI),y)
44 +# Is our compiler set up for EABI ?
45 +IS_EABI:=$(shell $(CC) $(CFLAGS) -x c - -E -dM </dev/null 2>/dev/null \
46 + |sed -r -e '/^\#[[:space:]]*define[[:space:]]+__ARM_EABI__([[:space:]]+1)?$$/!d; s/.+/y/;' \
47 + )
48 +
49 +ifeq ($(IS_EABI),y)
50 CSRC += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
51 aeabi_localeconv.c aeabi_memclr.c aeabi_memcpy.c \
52 aeabi_memmove.c aeabi_memset.c find_exidx.c
53 @@ -37,7 +42,7 @@ else
54 CSRC += syscall.c
55 endif
56
57 -ifeq ($(CONFIG_ARM_EABI),y)
58 +ifeq ($(IS_EABI),y)
59 libc-static-y += $(ARCH_OUT)/aeabi_lcsts.o $(ARCH_OUT)/aeabi_math.o \
60 $(ARCH_OUT)/aeabi_sighandlers.o
61 libc-nonshared-y += $(ARCH_OUT)/aeabi_lcsts.os $(ARCH_OUT)/aeabi_math.os \
62 --- a/libc/sysdeps/linux/arm/bits/huge_val.h
63 +++ b/libc/sysdeps/linux/arm/bits/huge_val.h
64 @@ -32,7 +32,7 @@
65 # define HUGE_VAL (__extension__ 0x1.0p2047)
66 #elif defined __GNUC__
67
68 -#ifndef __CONFIG_ARM_EABI__
69 +#ifndef __ARM_EABI__
70 # define HUGE_VAL \
71 (__extension__ \
72 ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
73 @@ -50,7 +50,7 @@
74
75 typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
76
77 -#ifndef __CONFIG_ARM_EABI__
78 +#ifndef __ARM_EABI__
79 # if __BYTE_ORDER == __BIG_ENDIAN
80 # define __HUGE_VAL_bytes { 0, 0, 0, 0, 0x7f, 0xf0, 0, 0 }
81 # endif
This page took 0.048523 seconds and 5 git commands to generate.