From patchwork Tue Jul 3 01:21:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10502757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 408EF602BC for ; Tue, 3 Jul 2018 01:23:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EA0828A7D for ; Tue, 3 Jul 2018 01:23:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22BD228A94; Tue, 3 Jul 2018 01:23:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C101228A7D for ; Tue, 3 Jul 2018 01:23:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=6rQOewVvUkgn8KwN3gbrVe46subDvwu5uDrfaA6k0cA=; b=WI6jcxQm0kbx3pSEXadVHmW+oV XxQ7KbK2O760aEYQshpZeZl/XItJNEwLxELqlZh6t7QZyV6yKMeJP/a3f10wm1aR0MIXgj8Xk65mT WwYytro8iyUqVppaSXanjli3PU1T1XmbQPRmHCvzrObIKvhVOPEtHkhE0u3DYUWrFCwa7JeXtB5bJ ig3DzgN8fgQB9z4UwGLuGiwnKLYjeRT5KK1H0gLZEmsxIh3KNXiK3OC+RGTAjzNug7Xcxx7P4L824 c0IaXv76MI+abOF2D2bE6iEEfUeYp7Yqlvjxt4Pkv+t4a+4O7CxHvvji0is5D4fsbGvLgLa/ykmJg AEzAX8Lg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1faA2Y-000082-U6; Tue, 03 Jul 2018 01:23:34 +0000 Received: from conuserg-11.nifty.com ([210.131.2.78]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1faA2E-0008Ph-Rv for linux-arm-kernel@lists.infradead.org; Tue, 03 Jul 2018 01:23:17 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w631MU1o030863; Tue, 3 Jul 2018 10:22:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w631MU1o030863 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1530580952; bh=N9EXVCIJOLVxm2JVzHsecjGPLiJubDV/StdikSRFzdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rSN8E8tEUJWwBuH+4+H1SebS283QsLAeq8ZEYW4/0B7y8IH2dlsTeHX00wWqXGeYF VZgLg0J5iBck6aGrpmJheEO8e+cfIYudGZr0GtluYRXzMAE9L1h+4oop5vL3Q7uApR OErzBKW/MLvBDibcQ1dClfqh44qg6hZ2Jnki3+4ASsstnCpL1JBESm3sd7JVimdQ5T Z5tCVhsnj6bkA4iKi/0O8VR+Lca97CgKOnh4OMmonqaLJwYfYp2jRxNhE2vVvO9u/l a3dUOekqvv7mEhrxetnbANx23nmALTnGUAQrMWCbD9XPclmNY2hLKtnNzVkjkZRbj/ bZj9NT+jpAOQw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Michal Simek , Russell King , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-arch Subject: [PATCH 1/3] ARM: add endianness option to LDFLAGS instead of LD Date: Tue, 3 Jul 2018 10:21:59 +0900 Message-Id: <1530580921-23340-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530580921-23340-1-git-send-email-yamada.masahiro@socionext.com> References: <1530580921-23340-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180702_182315_159963_EADC8318 X-CRM114-Status: GOOD ( 10.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Masahiro Yamada , Sam Ravnborg , Russell King , Nicholas Piggin , linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP With the recent syntax extension, Kconfig is now able to evaluate the compiler / toolchain capability. However, accumulating flags to 'LD' is not compatible with the way it works; 'LD' must be passed to Kconfig to call $(ld-option,...) from Kconfig files. If you tweak 'LD' in arch Makefile depending on CONFIG_CPU_BIG_ENDIAN, this would end up with circular dependency between Makefile and Kconfig. Signed-off-by: Masahiro Yamada --- arch/arm/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index fc26c3d..62ebeae 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -46,12 +46,12 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) KBUILD_CPPFLAGS += -mbig-endian CHECKFLAGS += -D__ARMEB__ AS += -EB -LD += -EB +LDFLAGS += -EB else KBUILD_CPPFLAGS += -mlittle-endian CHECKFLAGS += -D__ARMEL__ AS += -EL -LD += -EL +LDFLAGS += -EL endif #