summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/arm/Makefile.arch5
-rw-r--r--libc/sysdeps/linux/arm/bits/uClibc_arch_features.h11
2 files changed, 13 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/arm/Makefile.arch b/libc/sysdeps/linux/arm/Makefile.arch
index cc73c45c7..093eb2dbd 100644
--- a/libc/sysdeps/linux/arm/Makefile.arch
+++ b/libc/sysdeps/linux/arm/Makefile.arch
@@ -21,9 +21,8 @@ CSRC += posix_fadvise.c posix_fadvise64.c
endif
# Is our compiler set up for EABI ?
-IS_EABI:=$(shell $(CC) $(CFLAGS) -x c - -E -dM </dev/null 2>/dev/null \
- | grep __ARM_EABI__ 2>&1 >/dev/null && echo 'y' \
- )
+CC_IS_EABI_CHECK = $(filter-out -include libc-symbols.h,$(CC) $(CFLAGS))
+$(eval $(call cache-output-var,IS_EABI,$(CC_IS_EABI_CHECK) -x c - -E -dM </dev/null 2>/dev/null | grep __ARM_EABI__ 2>&1 >/dev/null && echo 'y'))
ifeq ($(IS_EABI),y)
CSRC += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
diff --git a/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h b/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
index 14621d9bd..8c43e5345 100644
--- a/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
@@ -48,4 +48,15 @@
/* only weird assemblers generally need this */
#undef __UCLIBC_ASM_LINE_SEP__
+#ifdef __GNUC__
+# define __need_uClibc_config_h
+# include <bits/uClibc_config.h>
+# undef __need_uClibc_config_h
+# if defined __CONFIG_ARM_EABI__ && !defined __ARM_EABI__
+# error Your toolchain does not support EABI
+# elif !defined __CONFIG_ARM_EABI__ && defined __ARM_EABI__
+# error Your toolchain was built for EABI, but you have chosen OABI
+# endif
+#endif
+
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */