glibc/glibc-arm-hardfloat-2.patch

43 lines
1.6 KiB
Diff
Raw Normal View History

2012-05-07 19:47:26 +00:00
diff --git a/sysdeps/arm/configure.in b/sysdeps/arm/configure.in
index 706add2..f00b798 100644
--- a/sysdeps/arm/configure.in
+++ b/sysdeps/arm/configure.in
@@ -49,3 +49,20 @@ EOF
2012-05-08 18:44:43 +00:00
if test $libc_cv_asm_cfi_directive_sections != yes; then
AC_MSG_ERROR([need .cfi_sections in this configuration])
fi
+
2012-05-07 19:47:26 +00:00
+# We check to see if the compiler and flags are
+# selecting the hard-float ABI and if they are then
+# we set libc_cv_arm_pcs_vfp to yes which causes
+# HAVE_ARM_PCS_VFP to be defined in config.h and
+# in include/libc-symbols.h and thus available to
+# shlib-versions to select the appropriate name for
+# the dynamic linker via %ifdef.
+AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI],
+ [libc_cv_arm_pcs_vfp],
2012-05-07 19:47:26 +00:00
+ [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP
+ yes
+ #endif
2012-05-08 18:44:43 +00:00
+ ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
+if test $libc_cv_arm_pcs_vfp = yes; then
+ AC_DEFINE(HAVE_ARM_PCS_VFP)
+fi
2012-05-07 19:47:26 +00:00
diff -rup c/sysdeps/arm/shlib-versions d/sysdeps/arm/shlib-versions
--- c/sysdeps/arm/shlib-versions 2012-01-08 22:47:04.000000000 -0700
+++ d/sysdeps/arm/shlib-versions 2012-05-07 11:57:07.739567660 -0600
@@ -1,4 +1,10 @@
arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4
-arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3
+%ifdef HAVE_ARM_PCS_VFP
+# The EABI-derived hard-float ABI uses a new dynamic linker.
+arm.*-.*-linux-gnueabi.* ld=ld-linux-armhf.so.3
+%else
+# The EABI-derived soft-float ABI continues to use ld-linux.so.3.
+arm.*-.*-linux-gnueabi.* ld=ld-linux.so.3
+%endif
arm.*-.*-linux.* ld=ld-linux.so.2
2012-05-07 19:47:26 +00:00