package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / libffi / 0002-Fix-use-of-compact-eh-frames-on-MIPS.patch
blobc19e395f900d06378904201d53bafc1c82be9d7e
1 From 31b6b6bc14197cd4183bdbd311fddeb36b5ae100 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3 Date: Sat, 19 Sep 2015 22:53:29 +0200
4 Subject: [PATCH] Fix use of compact eh frames on MIPS
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Newer MIPS toolchains use a different (compact) eh_frame format.
10 libffi don't like them, so we have to switch to the older format.
12 This patch add -mno-compact-eh to CFLAGS when compiling for
13 Mips and compiler support it.
15 Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
16 [unfuzz for 3.2.1]
17 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
18 ---
19 configure.ac | 10 ++++++++++
20 1 file changed, 10 insertions(+)
22 diff --git a/configure.ac b/configure.ac
23 index a7bf5ee..36cd0d4 100644
24 --- a/configure.ac
25 +++ b/configure.ac
26 @@ -469,6 +469,16 @@ esac
27 AM_CONDITIONAL(FFI_EXEC_TRAMPOLINE_TABLE, test x$FFI_EXEC_TRAMPOLINE_TABLE = x1)
28 AC_SUBST(FFI_EXEC_TRAMPOLINE_TABLE)
30 +if test x$TARGET = xMIPS; then
31 + save_CFLAGS="$CFLAGS"
32 + CFLAGS=-mno-compact-eh
33 + AC_MSG_CHECKING([whether the C compiler needs -mno-compact-eh])
34 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
35 + [AC_MSG_RESULT([yes])]; [save_CFLAGS="$save_CFLAGS -mno-compact-eh"],
36 + [AC_MSG_RESULT([no])])
37 + CFLAGS="$save_CFLAGS"
38 +fi
40 if test x$TARGET = xX86_64; then
41 AC_CACHE_CHECK([toolchain supports unwind section type],
42 libffi_cv_as_x86_64_unwind_section_type, [
43 --
44 2.5.3