From patchwork Tue Jul 3 01:22:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10502761 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 D1E0160362 for ; Tue, 3 Jul 2018 01:24:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF6F528A7D for ; Tue, 3 Jul 2018 01:24:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B372628A94; Tue, 3 Jul 2018 01:24:34 +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 678C528A7D for ; Tue, 3 Jul 2018 01:24:34 +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=CECZwaC3gxKGbvjngc0ElPoQC8bcAJxr30uZb2GRrQQ=; b=MLiOd3FxHP0biWy5Ss3QQDjBRc 4fH1ARFmm2yjYEn+Q08aAcxjdHQlxiY0vje55ZKDgmUNZT1M5n8UR2tnDR1lKVx5cuEwM2ab/6jEj x+SA61c0kSzRbckj+sVN2SqC0En0vnX3KvZ25zLxYMXw3BxiMR+wWLnKQBWEtED4AeZvgqOLOaU+2 kEkRdIxafGNs/MfBbkJ2IAbwc5paSPyFD9Z1oWHhCc5ZmO5hf2JHGk4RMVfwldkuf1i94lzkn63XC jiSMzc75Y8BVO7FDHgwRGlEH5GwqF6wRbWR7FkX74LW4dB/cs+xyFhafOChwyX3curlWK7hoTT1+U L9Crh3Pg==; 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 1faA3R-0000pz-CV; Tue, 03 Jul 2018 01:24:29 +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 1faA2W-0008SF-Gt for linux-arm-kernel@lists.infradead.org; Tue, 03 Jul 2018 01:23:38 +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 w631MU1p030863; Tue, 3 Jul 2018 10:22:33 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w631MU1p030863 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1530580953; bh=i6hsHB97N2f1b/yfSArAmxRGkQft5dXH4u1KshjXY7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q3+6FY44XdwqpWZheIdtLgvAk8jpKGmpfoYjAyd5JM2BQbxpaiJpGrpf4OfsbaIny diReV7RZzrg3knOHP95YgPelsHd66P/qfzW6+h0nByVksSvTU6oECqdkWXKmQSrLUI iLZnrammspqlgsYFXEju16/EDhTWKJV4ODgOqLhJlKh3a1RYJhKH1U5i1CCIyQuwZZ 20BjC8tz+0v8kdl1w5eInFqngv5Dhe8iR4T983vv7JVs0ljhnGVpFczMlwVUxm8irh kuPZq81j82mGlFMlWT5xzP3KlKZT4StXZ61lv9uYLrWkUFHpXPVzaoUZlpj04rG+J2 zuBWQRFTD3kgA== 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 2/3] arm64: add endianness option to LDFLAGS instead of LD Date: Tue, 3 Jul 2018 10:22:00 +0900 Message-Id: <1530580921-23340-3-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_182333_872837_093F46C2 X-CRM114-Status: UNSURE ( 9.54 ) X-CRM114-Notice: Please train this message. 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 , linux-kernel@vger.kernel.org, Nicholas Piggin 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 Acked-by: Will Deacon --- arch/arm64/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 4527226..8f73da3 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -60,15 +60,13 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN), y) KBUILD_CPPFLAGS += -mbig-endian CHECKFLAGS += -D__AARCH64EB__ AS += -EB -LD += -EB -LDFLAGS += -maarch64linuxb +LDFLAGS += -EB -maarch64linuxb UTS_MACHINE := aarch64_be else KBUILD_CPPFLAGS += -mlittle-endian CHECKFLAGS += -D__AARCH64EL__ AS += -EL -LD += -EL -LDFLAGS += -maarch64linux +LDFLAGS += -EL -maarch64linux UTS_MACHINE := aarch64 endif