From patchwork Thu Aug 8 13:04:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 265721 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id AB88B2C00C4 for ; Thu, 8 Aug 2013 23:04:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B5AA98B700; Thu, 8 Aug 2013 13:04:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EmXzIUQt9iae; Thu, 8 Aug 2013 13:04:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D5C1E8A3BE; Thu, 8 Aug 2013 13:04:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id ADFF21C2AB7 for ; Thu, 8 Aug 2013 13:05:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5185A8A3BE for ; Thu, 8 Aug 2013 13:04:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F1Y77uHTh+h9 for ; Thu, 8 Aug 2013 13:04:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sysmic.org (88-191-79-235.rev.dedibox.fr [88.191.79.235]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5CEDD88132 for ; Thu, 8 Aug 2013 13:04:39 +0000 (UTC) Received: from localhost.localdomain (mal35-3-82-240-201-171.fbx.proxad.net [82.240.201.171]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jezz) by sysmic.org (Postfix) with ESMTPSA id BAC4A60522; Thu, 8 Aug 2013 15:04:36 +0200 (CEST) From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= To: buildroot@busybox.net Date: Thu, 8 Aug 2013 15:04:34 +0200 Message-Id: <1375967074-17438-1-git-send-email-jezz@sysmic.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Cc: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [Buildroot] [PATCH] libffi: Add -mno-compact-eh when compiling for Mips X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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. Signed-off-by: Jérôme Pouiller --- ...-002-Fix-use-of-compact-eh-frames-on-MIPS.patch | 25 ++++++++++++++++++++ package/libffi/libffi.mk | 6 ----- 2 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 package/libffi/libffi-002-Fix-use-of-compact-eh-frames-on-MIPS.patch 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 0000000..027e3d3 --- /dev/null +++ b/package/libffi/libffi-002-Fix-use-of-compact-eh-frames-on-MIPS.patch @@ -0,0 +1,25 @@ +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. + +--- 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 CC need -mno-compact-eh]) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ [AC_MSG_RESULT([yes])]; [AM_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 51cbbce..0ad5c84 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