From patchwork Tue Nov 15 20:46:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 695262 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tJKFg5Pydz9t10 for ; Wed, 16 Nov 2016 07:47:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b="fLeBJCTn"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7865931D6A; Tue, 15 Nov 2016 20:47:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9XXnAC5eqHS5; Tue, 15 Nov 2016 20:47:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 246CC31D66; Tue, 15 Nov 2016 20:47:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id C7EC71C22B9 for ; Tue, 15 Nov 2016 20:47:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C0FAC31D66 for ; Tue, 15 Nov 2016 20:47:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JH62qTPhMuKj for ; Tue, 15 Nov 2016 20:47:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by silver.osuosl.org (Postfix) with ESMTPS id 8CDBD30F6A for ; Tue, 15 Nov 2016 20:47:09 +0000 (UTC) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3tJKFN3Tftz1042 for ; Tue, 15 Nov 2016 21:47:04 +0100 (CET) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:from :from:received:received; s=default; t=1479242822; x=1479847623; bh=nnFZxyrQaLMj+2fkrD8W2eEaO8fUWUDUKS6UTczX0gQ=; b=fLeBJCTnlW/Y N0sD1XqcNsd7VJP11qt/V4vdIKBgiks5sBt4yyzaL4i3W/ZeVIdVvYdoIoqlJMd0 Wz0ofSciBoehdbkCOMBkFx5p+YY81+HT/1b7Qr8k7v85uIGU3nDl2KKc4m+rAC05 TkjoeLemTAWpTveONTDUO4Joe9vxyvDZU6/6QQjZtLAneKRMC0TRQ8WBzVnEQapQ lp3upEgNmLoclKPoPD59D/+Ev/jKIBjEuG6nTMf2+CC4hpV8xeZYmd3wN4OA7CA4 ANCbWLDfiYvufj2J5a01UT+0F7RNUGb6Bpam0BeOoQ5IjbbuaFtcXVdWbwLtoByG ryfq1IqN3A== Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id hr4KGEwfCYLP; Tue, 15 Nov 2016 21:47:02 +0100 (CET) Received: from nzxt.fritz.box (x4d0c910c.dyn.telefonica.de [77.12.145.12]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Tue, 15 Nov 2016 21:47:02 +0100 (CET) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Tue, 15 Nov 2016 21:46:58 +0100 Message-Id: <20161115204658.14288-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.10.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/tremor: fix build with Thumb only ARM archs X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" Some ARM architectures like ARNv7-M only supports Thumb instructions, but the tremor build configuration enables ARM assembly code unconditionally for all arm triplets by defining _ARM_ASSEM_. We are overriding this by undefining this macro for ARM architectures not supporting ARM instructions. Fixes: http://autobuild.buildroot.net/results/054/054f1c77b0e5d46b2dc53769469c0ed03e6b79ef/ http://autobuild.buildroot.net/results/ba1/ba1760b1428584f70e44dbffb8218ff3ee55e702/ http://autobuild.buildroot.net/results/2a6/2a687853cf0bc832fef29f88de0d85bd495fe87d/ http://autobuild.buildroot.net/results/cb6/cb6c560bf31834aadbe3d13a118b31ea8190159b/ Signed-off-by: Jörg Krause Reviewed-by: Arnout Vandecappelle (Essensium/Mind) --- package/tremor/tremor.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/package/tremor/tremor.mk b/package/tremor/tremor.mk index 97b0ce3..2a791b6 100644 --- a/package/tremor/tremor.mk +++ b/package/tremor/tremor.mk @@ -16,9 +16,17 @@ TREMOR_DEPENDENCIES = libogg # tremor has ARM assembly code that cannot be compiled in Thumb2 mode, # so we must force the traditional ARM mode. +# However, some ARM architectures like ARNv7-M only supports Thumb +# instructions, but the tremor build configuration enables ARM assembly +# code unconditionally for all arm triplets by defining _ARM_ASSEM_. +# We are overriding this by undefining this macro for the ARM +# architectures not supporting ARM instructions. ifeq ($(BR2_arm),y) -TREMOR_CONF_ENV = \ - CFLAGS="$(TARGET_CFLAGS) -marm" +ifeq ($(BR2_ARM_CPU_HAS_ARM),y) +TREMOR_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -marm" +else +TREMOR_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -U_ARM_ASSEM_" +endif endif $(eval $(autotools-package))