This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] arm: do not abort EABI check for bootstrapping
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sourceware dot org
- Cc: roland at hack dot frob dot com
- Date: Thu, 20 Nov 2014 02:31:32 -0500
- Subject: [PATCH] arm: do not abort EABI check for bootstrapping
- Authentication-results: sourceware.org; auth=none
The change to simplify the EABI/OABI check from a tuple to a compile test
broke the ability to bootstrap a cross-compiler when generating the glibc
headers. At that point, there is no compiler yet, so this compile-time
test will always fail. Wrap the error with a basic sanity check so that
if the compiler fails, we assume this setup.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
Note: an alternative might be to just delete the EABI check altogether.
It's not like an OABI compiler will be able to properly build glibc ...
sysdeps/arm/preconfigure | 4 ++++
sysdeps/arm/preconfigure.ac | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure
index 59d776d..6a4c84e 100644
--- a/sysdeps/arm/preconfigure
+++ b/sysdeps/arm/preconfigure
@@ -7,9 +7,13 @@ arm*)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+/* Do not abort when bootstrapping initial glibc headers -- determine that with
+ a basic sanity check. */
+#ifdef __arm__
#if !__ARM_EABI__
#error
#endif
+#endif
int
main ()
{
diff --git a/sysdeps/arm/preconfigure.ac b/sysdeps/arm/preconfigure.ac
index d78817b..157e822 100644
--- a/sysdeps/arm/preconfigure.ac
+++ b/sysdeps/arm/preconfigure.ac
@@ -4,8 +4,12 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
case "$machine" in
arm*)
AC_TRY_COMPILE([
+/* Do not abort when bootstrapping initial glibc headers -- determine that with
+ a basic sanity check. */
+#ifdef __arm__
#if !__ARM_EABI__
#error
+#endif
#endif], [], [], [AC_MSG_ERROR([Old ABI no longer supported])])
# If the compiler enables unwind tables by default, this causes
--
2.1.3