From patchwork Mon Oct 9 14:35:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 115256 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2630240qgn; Mon, 9 Oct 2017 07:36:57 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDGgmMk1vhEdZPI0gJZZJRCSaVQvgYJqk1TQmBP31CCwGSiYu2AEFUisqOszarniDttVLEV X-Received: by 10.99.102.6 with SMTP id a6mr9123135pgc.298.1507559817594; Mon, 09 Oct 2017 07:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507559817; cv=none; d=google.com; s=arc-20160816; b=bxzCS9v5xPkb/QzF2lSIC7muCCyntZoAXjmm6k8TaQYc43Ak28hoe1ZcJ//o1+Rd1w 22lMIGlAPQ3kF1fLTrA2G6FiCvz5ZqIgWcbp3v208CXVYukdX1IjzyoamVmq1kXJ1VPT kCRJY3GsWVE2c1LbRo4o4lvTMYvGkcYRTQrJXflwMTlvehNl2pyFe5PJ41xNoW79o5Pu XsVGPaqnIAeh4jR7e+bRlXO5axuvuLQIJNEkQBJmJ4fP/JkIyIrUvDKs68+noEcwjgkF xROwQZlBxTTEOrX1Q9CfQNb/H6OrdQE95+GTkHRdBlIHV55I43bSoW42eEfjHmott30Y lpsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=vhZK8jdpmCMsB6s0pfqfXlqRIWFAzlmu1PRPxwQLrTY=; b=KZF+OjBcT8/LGOGkI37UwqkAHAmQeYNrW5ZYr3iwUdTIXSypEWBcL0JEWMG8JRSQNg d8fDHrE+ImwP8aXQWGLr1flWnPaIsmjGGTu+NtKkFani0VsTiPMY6kuneQVjjvzuH7eQ JJSfVUw2S2txbO0iY32K6IaYzIjBuE5sbdkskqoQoPGqaBJUqd/N8tjdyq9QceLWRPc1 nbjjGcranyo7gXHHAQqO2SXgKQHrvxlHWFEP34xi9X9TqTSSRhSCAx+a8wfxXqh066Pr TcMdAiYpAMhqCbd2laCJbmd5kVauwgDsarNe1qxMe7Kp3pSxl8S7SHdSDkf/MCrOwfnK tHGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=gSDGxejt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f186si6258968pgc.744.2017.10.09.07.36.57; Mon, 09 Oct 2017 07:36:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=gSDGxejt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754814AbdJIOgy (ORCPT + 26 others); Mon, 9 Oct 2017 10:36:54 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:33415 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbdJIOgx (ORCPT ); Mon, 9 Oct 2017 10:36:53 -0400 Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-11.nifty.com with ESMTP id v99EZVZE018442; Mon, 9 Oct 2017 23:35:32 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com v99EZVZE018442 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1507559733; bh=vhZK8jdpmCMsB6s0pfqfXlqRIWFAzlmu1PRPxwQLrTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gSDGxejtjJWQDXg5q+Kyw8jdqzMAwIFr+0St73spMmeenkZu3J7lauqnYZIYdZ5tC HDrmCF7L+tGetY6N4CsGixflCzG5ayAhCHjP9LUG+/SLCELEnLFIA+YCMAkTaTwCMM 4N/PZ9QNafaWaVcQ26d8higfbsTgESKIQH+4RNvRxcjyXOKTw4dhzQagfasSP/0V8b zMe7oKkLGl5Mm2u0Hi1Zbd3Irr82gbCuyGBGDjfu3Cv8hknPGJmJbElOC/qcb8is6e /QYDk3W2lnZVmy6MZoaKGOlRoMtACuB2hKRLzSt2BeNyOi1fYs/w7h0kZDNgOhoLyR 46lsr4bVRVFlA== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ARM: add KBUILD_ prefix to CFLAGS_MODULE, LDFLAGS_MODULE Date: Mon, 9 Oct 2017 23:35:13 +0900 Message-Id: <1507559715-30918-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507559715-30918-1-git-send-email-yamada.masahiro@socionext.com> References: <1507559715-30918-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org {CFLAGS,LDFLAGS}_MODULE are supposed to be set by users, not by in-kernel makefiles. Documentation/kbuild/makefiles.txt clearly explains the difference: KBUILD_CFLAGS_MODULE Options for $(CC) when building modules $(KBUILD_CFLAGS_MODULE) is used to add arch-specific options that are used for $(CC). From commandline CFLAGS_MODULE shall be used (see kbuild.txt). KBUILD_LDFLAGS_MODULE Options for $(LD) when linking modules $(KBUILD_LDFLAGS_MODULE) is used to add arch-specific options used when linking modules. This is often a linker script. From commandline LDFLAGS_MODULE shall be used (see kbuild.txt). Signed-off-by: Masahiro Yamada --- arch/arm/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 Acked-by: Russell King diff --git a/arch/arm/Makefile b/arch/arm/Makefile index cdb5b55..cafa4d4 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -16,11 +16,11 @@ LDFLAGS := LDFLAGS_vmlinux :=-p --no-undefined -X --pic-veneer ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 -LDFLAGS_MODULE += --be8 +KBUILD_LDFLAGS_MODULE += --be8 endif ifeq ($(CONFIG_ARM_MODULE_PLTS),y) -LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds +KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds endif GZFLAGS :=-9 @@ -120,7 +120,7 @@ CFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb # Work around buggy relocation from gas if requested: ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) -CFLAGS_MODULE +=-fno-optimize-sibling-calls +KBUILD_CFLAGS_MODULE +=-fno-optimize-sibling-calls endif else CFLAGS_ISA :=$(call cc-option,-marm,)