From patchwork Wed Mar 16 21:43:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 598779 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 3qQQ3W2s2qz9t0t for ; Thu, 17 Mar 2016 08:43:51 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8D7FA8C986; Wed, 16 Mar 2016 21:43:50 +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 glW2FZD4aVN3; Wed, 16 Mar 2016 21:43:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id EA5A791EE0; Wed, 16 Mar 2016 21:43:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 5BC761CEE60 for ; Wed, 16 Mar 2016 21:43:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 583C389E45 for ; Wed, 16 Mar 2016 21:43:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PAJBCz7IW1qr for ; Wed, 16 Mar 2016 21:43:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by fraxinus.osuosl.org (Postfix) with ESMTP id E05978968A for ; Wed, 16 Mar 2016 21:43:30 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 0BCA9B5; Wed, 16 Mar 2016 22:43:30 +0100 (CET) Received: from localhost (AToulouse-657-1-12-168.w83-193.abo.wanadoo.fr [83.193.199.168]) by mail.free-electrons.com (Postfix) with ESMTPSA id CABD4227; Wed, 16 Mar 2016 22:43:29 +0100 (CET) From: Thomas Petazzoni To: Buildroot List Date: Wed, 16 Mar 2016 22:43:11 +0100 Message-Id: <1458164602-16983-6-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1458164602-16983-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1458164602-16983-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni , Lee Jones Subject: [Buildroot] [PATCH 05/16] uclibc: disable DOPIC on ARM noMMU 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" As explained by Waldemar, enabling DOPIC in uClibc will lead to the creation of a Position Independent library. In turn, this will cause elf2flt to generate a "Has-PIC-GOT" flat binary, which doesn't work on ARM. In fact, elf2flt on ARM really except to have non-PIC code as input, so we must disable DOPIC in the uClibc configuration. Signed-off-by: Thomas Petazzoni --- package/uclibc/uclibc.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk index ce706e0..d11c103 100644 --- a/package/uclibc/uclibc.mk +++ b/package/uclibc/uclibc.mk @@ -94,6 +94,14 @@ define UCLIBC_ARM_THUMB_CONFIG endef endif +ifeq ($(UCLIBC_TARGET_ARCH),arm) +ifeq ($(BR2_USE_MMU),) +define UCLIBC_ARM_NOMMU + $(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config) +endef +endif +endif + ifeq ($(BR2_UCLIBC_ARM_BX),y) define UCLIBC_ARM_BX_CONFIG $(call KCONFIG_ENABLE_OPT,USE_BX,$(@D)/.config) @@ -378,6 +386,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS $(UCLIBC_ARM_ABI_CONFIG) $(UCLIBC_ARM_THUMB_CONFIG) $(UCLIBC_ARM_BX_CONFIG) + $(UCLIBC_ARM_NOMMU) $(UCLIBC_MIPS_ABI_CONFIG) $(UCLIBC_MIPS_ISA_CONFIG) $(UCLIBC_SH_TYPE_CONFIG)