diff options
author | Jérôme Pouiller <jezz@sysmic.org> | 2013-08-09 09:34:30 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2013-08-10 10:13:42 +0200 |
commit | 98204e8feaaccfdf3a56192aa1f7a24fccafd5e9 (patch) | |
tree | ce03201c0f39d05dac17ea097e8a24173705e411 /package/libffi | |
parent | 129233fed6295d154acc2c84b5d51236be4e61d6 (diff) | |
download | buildroot-98204e8feaaccfdf3a56192aa1f7a24fccafd5e9.tar.gz buildroot-98204e8feaaccfdf3a56192aa1f7a24fccafd5e9.zip |
libffi: Add -mno-compact-eh when compiling for Mips
Fix compilation on Mips. Resolve issues detected here:
http://autobuild.buildroot.net/results/f0c9db496233f53c26e92294d7305aa4511ec7b3/
http://autobuild.buildroot.net/results/8968690c248df86b040218867f92b573721e872c/
http://autobuild.buildroot.net/results/a35db8e6a49d022133b486b12f6a8e40b3c95b6e/
Also remove previous special case handling defined in libffi.mk.
[Thomas: add Signed-off-by from Jérôme inside the patch itself.]
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/libffi')
-rw-r--r-- | package/libffi/libffi-002-Fix-use-of-compact-eh-frames-on-MIPS.patch | 27 | ||||
-rw-r--r-- | package/libffi/libffi.mk | 6 |
2 files changed, 27 insertions, 6 deletions
diff --git a/package/libffi/libffi-002-Fix-use-of-compact-eh-frames-on-MIPS.patch b/package/libffi/libffi-002-Fix-use-of-compact-eh-frames-on-MIPS.patch new file mode 100644 index 0000000000..15d1c96ea7 --- /dev/null +++ b/package/libffi/libffi-002-Fix-use-of-compact-eh-frames-on-MIPS.patch @@ -0,0 +1,27 @@ +Newer MIPS toolchains use a different (compact) eh_frame format. +libffi don't like them, so we have to switch to the older format. + +This patch add -mno-compact-eh to CFLAGS when compiling for +Mips and compiler support it. + +Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> + +--- a/configure.ac 2013-08-08 14:53:11.884267155 +0200 ++++ b/configure.ac 2013-08-08 14:54:14.437493244 +0200 +@@ -430,6 +430,16 @@ + AM_CONDITIONAL(FFI_EXEC_TRAMPOLINE_TABLE, test x$FFI_EXEC_TRAMPOLINE_TABLE = x1) + AC_SUBST(FFI_EXEC_TRAMPOLINE_TABLE) + ++if test x$TARGET = xMIPS; then ++ save_CFLAGS="$CFLAGS" ++ CFLAGS=-mno-compact-eh ++ AC_MSG_CHECKING([whether the C compiler needs -mno-compact-eh]) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ [AC_MSG_RESULT([yes])]; [save_CFLAGS="$save_CFLAGS -mno-compact-eh"], ++ [AC_MSG_RESULT([no])]) ++ CFLAGS="$save_CFLAGS" ++fi ++ + if test x$TARGET = xX86_64; then + AC_CACHE_CHECK([assembler supports unwind section type], + libffi_cv_as_x86_64_unwind_section_type, [ diff --git a/package/libffi/libffi.mk b/package/libffi/libffi.mk index 51cbbce8cd..0ad5c84ec0 100644 --- a/package/libffi/libffi.mk +++ b/package/libffi/libffi.mk @@ -11,12 +11,6 @@ LIBFFI_LICENSE_FILES = LICENSE LIBFFI_INSTALL_STAGING = YES LIBFFI_AUTORECONF = YES -# Newer CS MIPS toolchains use a different (compact) eh_frame format -# libffi don't like them, just switch to the older format -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209)$(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203),y) -LIBFFI_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -mno-compact-eh" -endif - # Move the headers to the usual location, and adjust the .pc file # accordingly. define LIBFFI_MOVE_STAGING_HEADERS |