The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libffi / 0002-Fix-use-of-compact-eh-frames-on-MIPS.patch
1 Newer MIPS toolchains use a different (compact) eh_frame format.
2 libffi don't like them, so we have to switch to the older format.
3
4 This patch add -mno-compact-eh to CFLAGS when compiling for
5 Mips and compiler support it.
6
7 Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
8
9 --- a/configure.ac      2013-08-08 14:53:11.884267155 +0200
10 +++ b/configure.ac      2013-08-08 14:54:14.437493244 +0200
11 @@ -430,6 +430,16 @@
12  AM_CONDITIONAL(FFI_EXEC_TRAMPOLINE_TABLE, test x$FFI_EXEC_TRAMPOLINE_TABLE = x1)
13  AC_SUBST(FFI_EXEC_TRAMPOLINE_TABLE)
14  
15 +if test x$TARGET = xMIPS; then
16 +    save_CFLAGS="$CFLAGS"
17 +    CFLAGS=-mno-compact-eh
18 +    AC_MSG_CHECKING([whether the C compiler needs -mno-compact-eh])
19 +    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
20 +                      [AC_MSG_RESULT([yes])]; [save_CFLAGS="$save_CFLAGS -mno-compact-eh"],
21 +                      [AC_MSG_RESULT([no])])
22 +    CFLAGS="$save_CFLAGS"
23 +fi
24 +
25  if test x$TARGET = xX86_64; then
26      AC_CACHE_CHECK([assembler supports unwind section type],
27         libffi_cv_as_x86_64_unwind_section_type, [