From patchwork Fri Jul 19 13:06:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 260259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 513AE2C00E1 for ; Fri, 19 Jul 2013 23:06:59 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E8FBF20177; Fri, 19 Jul 2013 13:06:57 +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 36fGaCKe9Uo0; Fri, 19 Jul 2013 13:06:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 760EF312DD; Fri, 19 Jul 2013 13:06:55 +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 F3C7C1BF9A4 for ; Fri, 19 Jul 2013 13:07:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BCD338CEFC for ; Fri, 19 Jul 2013 13:06:54 +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 YuJ6f4Fj2Hje for ; Fri, 19 Jul 2013 13:06:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from loknar.toptech.com.ar (loknar.toptech.com.ar [78.46.79.162]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0C5968A90F for ; Fri, 19 Jul 2013 13:06:53 +0000 (UTC) Received: from asgard (host231.190-138-230.telecom.net.ar [190.138.230.231]) (authenticated bits=0) by loknar.toptech.com.ar (8.14.7/8.14.7) with ESMTP id r6JD6l7J021076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 19 Jul 2013 13:06:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1374239211; bh=Cq7JgHNQxfM30TCEai6+3aedPwq7b//057MM98Ow9wE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KL8J/cHgI3JZBmEPg2BZoEwqezY+uLk9kUOOzmsKLyy3ZiQidQ3M1zHIWjAe4+BLP E8e0WftrpOHUEX+rnQ2/dNwLTyxNmsN26bMG8U/Q1txvZvx/BsnHWmwnnUhPwSct/3 Lpkq73psSEi4kN5l99AennG9FClYLZEzlZz0JuF4= Received: by asgard (sSMTP sendmail emulation); Fri, 19 Jul 2013 10:06:46 -0300 From: Gustavo Zacarias To: buildroot@busybox.net Date: Fri, 19 Jul 2013 10:06:33 -0300 Message-Id: <1374239193-23811-3-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1374239193-23811-1-git-send-email-gustavo@zacarias.com.ar> References: <1374239193-23811-1-git-send-email-gustavo@zacarias.com.ar> X-Virus-Scanned: clamav-milter 0.97.7 at loknar X-Virus-Status: Clean Subject: [Buildroot] [PATCHv2 3/3] uclibc/arm: doesn't build in thumb(1) mode with threads 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net It runs out of registers, it fails even in official form (COMPILE_IN_THUMB_MODE=y) so just build it in ARM mode since EABI mandates interworking. Tested in an arm920t board. Signed-off-by: Gustavo Zacarias --- package/uclibc/Config.in | 2 +- package/uclibc/uclibc.mk | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) -- 1.8.1.5 diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in index 8d16e8c..90aae90 100644 --- a/package/uclibc/Config.in +++ b/package/uclibc/Config.in @@ -185,7 +185,7 @@ config BR2_UCLIBC_ARM_TYPE config BR2_UCLIBC_ARM_BX bool depends on BR2_UCLIBC_TARGET_ARCH = "arm" - default y if !BR2_fa265 && !BR2_strongarm + default y if (BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2) config BR2_UCLIBC_MIPS_ABI string diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk index 0c76c3f..cf53280 100644 --- a/package/uclibc/uclibc.mk +++ b/package/uclibc/uclibc.mk @@ -74,6 +74,11 @@ define UCLIBC_ARM_ABI_CONFIG $(call UCLIBC_OPT_SET,CONFIG_ARM_EABI,y,$(@D)) endef +# Thumb build is broken with threads, build in ARM mode +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +UCLIBC_EXTRA_CFLAGS += -marm +endif + ifeq ($(BR2_UCLIBC_ARM_BX),y) define UCLIBC_ARM_BX_CONFIG $(call UCLIBC_OPT_SET,USE_BX,y,$(@D)) @@ -354,7 +359,7 @@ endif UCLIBC_MAKE_FLAGS = \ ARCH="$(UCLIBC_TARGET_ARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ - UCLIBC_EXTRA_CFLAGS="$(TARGET_ABI)" \ + UCLIBC_EXTRA_CFLAGS="$(UCLIBC_EXTRA_CFLAGS) $(TARGET_ABI)" \ HOSTCC="$(HOSTCC)" define UCLIBC_SETUP_DOT_CONFIG