From patchwork Mon Jul 9 02:09:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10513425 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 4A6D560318 for ; Mon, 9 Jul 2018 02:11:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D39528A8E for ; Mon, 9 Jul 2018 02:11:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F9E928A92; Mon, 9 Jul 2018 02:11:11 +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 8C5A028A8E for ; Mon, 9 Jul 2018 02:11:10 +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: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:In-Reply-To: References:List-Owner; bh=pwstqRE21a7Njw9okizkn+wNPb5r5t6D1IjNHtlgXIc=; b=b3R U4WfxjLSas4vgBkhRAYRhqx/M+UOa1f+95GoW/jWjQBJ+qiYGRqb92aMWofUjFnnp16ULPAGRPIdt qbRFxg38tZlCZBw+1GHhZU9MD+Nw9Y1DPl06PXuMU1gRA4JmvVuNxDnBgpdbohCbNPoA5h/JYoVAs 7BYV1IF/2wrW4YSTUeq613jcoDPNxEfu0yV0mO3EiswTZOaXTanL6YwucSCdpB8mI4Wh8Nq1dqt++ Hsz8BBzGSQxUUGi9ggJRZRKsIu38nulxyjFme1ooQ670Et3W5BCvVK08OWvcGehVpDSm5WHrbLeTT 4aAchljzQ4hJAXxvMf5AN/Zn2OtO1vQ==; 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 1fcLdq-0002Uo-7u; Mon, 09 Jul 2018 02:11:06 +0000 Received: from conuserg-10.nifty.com ([210.131.2.77]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcLdn-0002Sd-0K for linux-arm-kernel@lists.infradead.org; Mon, 09 Jul 2018 02:11:04 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w692AH9i012706; Mon, 9 Jul 2018 11:10:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w692AH9i012706 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1531102217; bh=dYh/4wtKHhRNjXRlpl3UoxE9D8lYgF/ZT3lJrgvASdE=; h=From:To:Cc:Subject:Date:From; b=uE8CdkbwqvfXnq3+V5Y6Oei3pv39nd3eMZlI9GRG/NsaCyyCyzI91boibUCa29Pcq vsHZiDL5JGiC4SWjgfW/N3MQX7iXYwQC1kn6SFUS7HlUzM3d4bj4AQqTO+2MDB3mtQ PHfEPe+lOLY0+serL1MW7bJuZq8YsgezKvo8UZmABzwLpiWsyRO0RDiylVmhVtsIQY XQCq0IE5sDsFbKa9GrWC17R8qTx14ImuBz7EwhQe6lZLT1RE7Ss+YTMzaGqqeZnFOX 7XRotakQeMO5fy5Lu/b3cScF8y8rHT1DfsLJWnYN4BI/aDjcdnlkPjnEljycU9GHyH E+EqaeVOeH83g== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: patches@arm.linux.org.uk Subject: [PATCH] ARM: add endianness option to LDFLAGS instead of LD Date: Mon, 9 Jul 2018 11:09:42 +0900 Message-Id: <1531102182-13699-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180708_191103_420074_85411A98 X-CRM114-Status: UNSURE ( 9.38 ) 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 , Russell King , linux-arm-kernel@lists.infradead.org, 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 --- KernelVersion: v4.18-rc4 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 #