From patchwork Thu Jul 12 08:01:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 942840 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HpJHFj3Q"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="aEPqihC3"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41R7jJ4Zfvz9s1R for ; Thu, 12 Jul 2018 18:03:16 +1000 (AEST) 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=tooK5EKieyvUGsm4vESTjbzUfd3FGbuOoQ+pqsBnWHQ=; b=HpJHFj3Q3ZrXAQJACRhQzdblCH +qXTgpypewlg/lrhdqdFQinaNb8q1mY10tVwA99piEbs9D7G9nO0b7ZZfRXniOyZJgJeT1Ud49Vk1 Vs90FtIwznte9MS0bedlRmr4BkDMD8oDbtWclhXiHL7NK/2V9bUveTR+BG9thtyhZYRJsXQexxUAH FhR02zvpCIUJxoF4nj5Cl+egRgTxyOfVt1bBbPIdD0/UuFbt2wsWd26sMtIhOeOI62eyxMqvnRlp5 HlwHC1uIOE5n7yk4Lv0rx078hf+KWXYOKrr05X8ZoNnMdXvZcbuKc5yOrppMKiPrmjwFSHqc1UH0h HAnKS1VA==; 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 1fdWZ7-0001VB-4p; Thu, 12 Jul 2018 08:03:05 +0000 Received: from conuserg-12.nifty.com ([210.131.2.79]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdWYQ-0000c1-3U; Thu, 12 Jul 2018 08:02:25 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id w6C81cQg012716; Thu, 12 Jul 2018 17:01:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w6C81cQg012716 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1531382501; bh=2GPOkadRziKxw03k7uWwGARi/4AY/9BJBdsFxAPPIXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aEPqihC3Wb8hLO9MPxzPOg4+ijqdYJHmjC17dj9ONRAJcm9AkGxnI1YaaQ6nCCKgk JKpZ/Ea19kAVn5ZmQvIHIecHRIfVhvUbzim2MjQU6KmTd7dj1dXRy7VjTRtfPsTnmk S2QqGVPEvS8hJ/V1dLMuTwHajOm0a/KJauGSqxLUOKiHjVWpxpUHOF+l8xxeo1L8I/ NjtdKhMRvMx1jKZh6XLzS+ryQwOI4HSqU7vWJ/WqkeeDtFiQezz6CaPrKb/1RIdMn/ iIr67XmIyuv6zIoq3pbgq6xStL7gdra54RBMOpuIusb2A6qtcip+SrdOtQ5nErLGGD qxqoOEbVglrtw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH 1/6] um: remove redundant 'export LDFLAGS' in arch/x86/Makefile.um Date: Thu, 12 Jul 2018 17:01:31 +0900 Message-Id: <1531382496-3719-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> References: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180712_010222_528407_004DBBF5 X-CRM114-Status: UNSURE ( 6.30 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.79 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Weinberger , Jeff Dike , x86@kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Russell King , openrisc@lists.librecores.org, "Kirill A . Shutemov" , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This is already exported by the top-level Makefile. Signed-off-by: Masahiro Yamada --- arch/x86/Makefile.um | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um index 45af199..5296f8c 100644 --- a/arch/x86/Makefile.um +++ b/arch/x86/Makefile.um @@ -13,8 +13,6 @@ KBUILD_CFLAGS += $(call cc-option,-m32) KBUILD_AFLAGS += $(call cc-option,-m32) LINK-y += $(call cc-option,-m32) -export LDFLAGS - LDS_EXTRA := -Ui386 export LDS_EXTRA From patchwork Thu Jul 12 08:01:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 942839 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="P1Iy7XZF"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="uAQoZIXA"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41R7hs1n2pz9s1R for ; Thu, 12 Jul 2018 18:02:53 +1000 (AEST) 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=FA5ln9veOslWgnz5taCCR2WCTBIWzS2lVeB8E4Gd4YM=; b=P1Iy7XZF9FroRckbjwANk8L7Vm kO/e4hahFynlC87OyicHeu3iuD61mb7HijSm1wvrAGnT4DK4I8hv3Utc7ZJ07BeJj+VirUuDYDEgz EWDKIb04j2Z6SWDXeLs7NtKQ3MLbaCp/bJ9HiqNn1KyPr+thYSQ4WPhFQ7ZUQZyYECfZo52y/Senp iwVE7CbYNbxtFtHqYiQjoPHxmhERRfgTGHAZd2T9WqBQesuE2EGYElCrT2WhSeWUYLk+FbP6Dk8/t 6ypIP7qEM3kzcpTiWqGDO62mg6yETXHj1PaQYwl5yta8EEhMcsDcP98+X8w81SJYaQxvnUvzqsoR+ bu3qJ4QA==; 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 1fdWYf-0000zN-R6; Thu, 12 Jul 2018 08:02:37 +0000 Received: from conuserg-12.nifty.com ([210.131.2.79]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdWYQ-0000c3-3V; Thu, 12 Jul 2018 08:02:24 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id w6C81cQh012716; Thu, 12 Jul 2018 17:01:41 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w6C81cQh012716 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1531382502; bh=EG0KJF1GpFZUkaiy9xjSIY+ixmP/0UjyRpBm3mH+Qm0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uAQoZIXAmyr4leAyZZA4N6MLG1D830VjkOeumcOl10FHCTBx9LhN/nG1StGpgTkem j/OhcHtQkFFOw+ZEJHYZxU8Z2FcUnW4J9H76AjNjrNZHsPmGzSETYeWz4M3JaMRNNE AoUXVVERud74oEO4HdnLhpC9NGRB20s0FMqLIHjllNIay6BWzdgcjYE3WE+3GN6qVG QVOeOuxb2qvIQVzydshCHgxrqmnfA8VCKafuy03pNovcy9JOiNoTmltLJttMcXMAdp C4Nivy31D5/8W7o8g6ct8dgtI2f0xk4wfjqWQu9g3UBJkBUPnPVGcmcTVsHeNEpPSM T4dePa+1PnJEw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH 2/6] ARM: vfp: clean-up arch/arm/vfp/Makefile Date: Thu, 12 Jul 2018 17:01:32 +0900 Message-Id: <1531382496-3719-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> References: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180712_010222_530478_0645FE5B X-CRM114-Status: UNSURE ( 7.57 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.79 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Weinberger , Jeff Dike , x86@kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Russell King , openrisc@lists.librecores.org, "Kirill A . Shutemov" , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Since commit 799c43415442 ("kbuild: thin archives make default for all archs"), $(AR) is used instead of $(LD) to combine object files. LDFLAGS +=--no-warn-mismatch ... is unused code now. arch/arm/Makefile already guards arch/arm/vfp/ by a boolean symbol, CONFIG_VFP, like this: core-$(CONFIG_VFP) += arch/arm/vfp/ ..., so $(CONFIG_VFP) is always evaluated to y in arch/arm/vfp/Makefile. Also, there is no point to use pseudo object, vfp.o, which never becomes a module. Add all objects directly to obj-y. Signed-off-by: Masahiro Yamada --- arch/arm/vfp/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm/vfp/Makefile b/arch/arm/vfp/Makefile index a81404c..94516c4 100644 --- a/arch/arm/vfp/Makefile +++ b/arch/arm/vfp/Makefile @@ -8,8 +8,5 @@ # asflags-y := -DDEBUG KBUILD_AFLAGS :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp -mfloat-abi=soft) -LDFLAGS +=--no-warn-mismatch -obj-y += vfp.o - -vfp-$(CONFIG_VFP) += vfpmodule.o entry.o vfphw.o vfpsingle.o vfpdouble.o +obj-y += vfpmodule.o entry.o vfphw.o vfpsingle.o vfpdouble.o From patchwork Thu Jul 12 08:01:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 942842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IhAWQSvz"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="Z8rwWKqh"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41R7js4CFGz9s2L for ; Thu, 12 Jul 2018 18:03:45 +1000 (AEST) 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=K7tVZ/3Axa9fYq22S4Ahc+pdcH+KxiZcVy6vo9iFiwU=; b=IhAWQSvzYKd8I9qDKZ9PBb6ihZ K6W8MQeWyNObFh/kBxPYIFa+1fx7MxmAHwtvL1NBg1/sDbh7BPXmdxuR3J5F1WotFHMwbVW3sGKhB 4m4JDksq1wRmTSaGPLg47y76zMfPd6UwKQsqDyfvKZDnRO6peQ9DySQcL/mdMeLgKnL9fVpHvuZVJ qiMaihwN/mstQU1HqFZQBd4sBpI9XNRKt9rklHbqsEEXE4tiiUt4NU092CADEFqtRHAbcmUqRro93 iV9gM7T9JxeUMbMpTIhy/7VpYNc11bwCZUJEizB+Vm9/0HB8WvspEvss2AQhRVW8v9Cwzpa7E+RDC WrBektcw==; 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 1fdWZb-00028v-EY; Thu, 12 Jul 2018 08:03:35 +0000 Received: from conuserg-12.nifty.com ([210.131.2.79]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdWYQ-0000c0-3x; Thu, 12 Jul 2018 08:02:27 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id w6C81cQi012716; Thu, 12 Jul 2018 17:01:42 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w6C81cQi012716 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1531382503; bh=xh77N21cq8p0dbTYcvt3+FJe0KgbUffxhLCzpU9y6ak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z8rwWKqhSGSawIXHARLwPA0P4ud6nBlM4NlLIGlQqFDlb7nKte6tIj6aFwg8Kc0SU GX9yGXCsvOHpVm5/Q4Dm8btptn/p8WDgb6GPpFSEexSr3II22eilNtC6UB2WHqV3MK UiEIr0Unx7shhHkedRclR+nTus8FN6+HdVWQTkJL1axweHK3eSUpuiIKPhss2Sx4Ve cMCnzvRrnGGAZVnw4e1OF6MuW/sSm2mtGv6F/LutHf5WVAUr+aSqt6aeXMZhSl5CCF gtwabutoyTyfxeB1fV68WEofZU4GHomIDdXQpLPTL0wusXuObSfuqcp/fPmnlGlUMg AW0hkYLZqRe2g== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH 3/6] kbuild: remove redundant LDFLAGS clearing in arch/*/Makefile Date: Thu, 12 Jul 2018 17:01:33 +0900 Message-Id: <1531382496-3719-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> References: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180712_010222_541748_1B6089BE X-CRM114-Status: UNSURE ( 6.53 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.79 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Weinberger , Jeff Dike , x86@kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Russell King , openrisc@lists.librecores.org, "Kirill A . Shutemov" , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Since commit ce99d0bf312d ("kbuild: clear LDFLAGS in the top Makefile"), the top-level Makefile caters to this. Signed-off-by: Masahiro Yamada --- arch/arm/Makefile | 3 --- arch/openrisc/Makefile | 1 - arch/riscv/Makefile | 1 - 3 files changed, 5 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 62ebeae..e7d703d 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -10,9 +10,6 @@ # # Copyright (C) 1995-2001 by Russell King -# Ensure linker flags are correct -LDFLAGS := - LDFLAGS_vmlinux :=-p --no-undefined -X --pic-veneer ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) LDFLAGS_vmlinux += --be8 diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile index 89076a6..70e06d3 100644 --- a/arch/openrisc/Makefile +++ b/arch/openrisc/Makefile @@ -19,7 +19,6 @@ KBUILD_DEFCONFIG := or1ksim_defconfig -LDFLAGS := OBJCOPYFLAGS := -O binary -R .note -R .comment -S LDFLAGS_vmlinux := LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 6d4a5f6c..2627e48 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -8,7 +8,6 @@ # for more details. # -LDFLAGS := OBJCOPYFLAGS := -O binary LDFLAGS_vmlinux := ifeq ($(CONFIG_DYNAMIC_FTRACE),y) From patchwork Thu Jul 12 08:01:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 942845 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ACSZ4/Jq"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="oX++y4sY"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41R80L22vsz9s19 for ; Thu, 12 Jul 2018 18:16:18 +1000 (AEST) 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=MfPkPH3rlZk05U6nVAAf7/bQeEBQtfRmcPMWMS39u0s=; b=ACSZ4/JqDP0QaSln3foHn9kfAQ M/cCWpnNsND3oer5pAtulqDi+qp47/8OoIMsljrQWn7u5L3hP1OTUxq8jJbHyUdCiZ6zMxxu6pRCg mWJ1PkMMBDc+wWxJp2TTnlRIcamBsvbD/rulS7HovJRBLI5hJHOptsfs9nPvf3ps1Yh2NtQaZHE/2 h/xR4ZujfpV6xLKFy3m2TDHNUJg9ck9o7sL7JncbvVrtMe0c68REkx2zIMYuogBSR6FU/l0VyYEjt iaHdu7NubkLyH+OdxYF/EAqN0HedPKc8lBxp3bHsnATgAiI/H3F4Ovoyf4enJU2X4uNe/9c3T148G VicaP0Lw==; 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 1fdWlr-0001ub-NH; Thu, 12 Jul 2018 08:16:15 +0000 Received: from conuserg-12.nifty.com ([210.131.2.79]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdWYQ-0000cL-3V; Thu, 12 Jul 2018 08:02:25 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id w6C81cQj012716; Thu, 12 Jul 2018 17:01:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w6C81cQj012716 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1531382504; bh=PR1zPWKBmHPFKOICGRPcOVP5bxb/1PLJfA29JpKbpzs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oX++y4sYzpmRliDuKa0z0KZr7X0/v0VoEh3/WBVUUxo5ptYBNGoWmuu2L8C+8Mr8J XI5nkK3kn0ASFhPIcfkTAHcBhS1jPe8ONmAEjrHsWvskx+Vf5ESiS0T4B5xS26NV5b tJaUHMdJOg4PpHySQEr9MPTXICN2YL+gY1nI7wGTD8ltJFK93NAvPmFbjzaCY9X/db m+C1JhoKDXP0zGSjylJcI5m67AMkgQ0BjbnDZh5H8vggf7zsaWWDfB3a10BhUH5s8W 6puTM++YXvdtevxPMTlRkgI9eMP4dlZ08lkfGCngLM9SEj/h0Dx7J/IYazLcvHd2si kRBENwpOPehYA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH 4/6] kbuild: replace $(LDFLAGS) $(ldflags-y) with $(ld_flags) Date: Thu, 12 Jul 2018 17:01:34 +0900 Message-Id: <1531382496-3719-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> References: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180712_010222_534427_3CC0846A X-CRM114-Status: UNSURE ( 7.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.79 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Weinberger , Jeff Dike , x86@kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Russell King , openrisc@lists.librecores.org, "Kirill A . Shutemov" , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org $(LDFLAGS) $(ldflags-y) is equivalent to $(ld_flags). Signed-off-by: Masahiro Yamada --- scripts/Makefile.lib | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 1bb594f..1915574 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -225,8 +225,7 @@ $(obj)/%: $(src)/%_shipped # --------------------------------------------------------------------------- quiet_cmd_ld = LD $@ -cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \ - $(filter-out FORCE,$^) -o $@ +cmd_ld = $(LD) $(ld_flags) $(LDFLAGS_$(@F)) $(filter-out FORCE,$^) -o $@ # Objcopy # --------------------------------------------------------------------------- From patchwork Thu Jul 12 08:01:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 942846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ashagxqH"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="UJY34Hho"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41R80P2mdZz9s1R for ; Thu, 12 Jul 2018 18:16:21 +1000 (AEST) 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=yB/C5ku2DtVrK6qogGPHRxb3y01n0rWcFNQT/I2zKDg=; b=ashagxqHF3vmrZu2eU1rVj4YI1 0Y0MGzPeyl8VPipUUMphmvPygHuZAUUjV2oSfNXv9OtBNv0xNBFgN4aV/N+OMv5U6bRyvMRdpxAkj 1B4hNJikneq3+9AhBC9lRdmeNSwhYHJC//IuoRh1Hm8gzKV7dbWpzboM2F1FtPjHl7lcUaaC6bWG2 YJqkXSgfGakyvW0awbzL3NrWGg53wvj1iNvGItnuiPnTNQGt4NWefksi9gcb23A0qgipLmYVIgURo A8pR/R8zb9cp8fWFUyi1M6lXeFqiv9vRETl1Hjf52Z0krG3r8puK6+MsiuvyNcac2AFUYIJF1n23z IxGWRSRQ==; 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 1fdWlr-0001v0-VX; Thu, 12 Jul 2018 08:16:16 +0000 Received: from conuserg-12.nifty.com ([210.131.2.79]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdWYQ-0000cN-72; Thu, 12 Jul 2018 08:02:26 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id w6C81cQk012716; Thu, 12 Jul 2018 17:01:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w6C81cQk012716 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1531382506; bh=OW/iguCGS3P8sUTd5gG6WZtTqvjg0ShWICCDmC9kjMA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UJY34Hho3d+vt8X7T/YvXP0dG3s7hQR+gvlyuFdVhFZRVTGnt/5nAoDTkIXbqcPPw XmKaOsWItfgLnSw0fF06MjFvq2RDXNNqvcQ8KcwsGjki6Wm4VxvjElrtdvz2R0ntrJ EfFW3faGY8uIPabGLCQYJt6gYkFda2D2vAoZey1KIOoRg7+eAjrRhmnZKk6RNiLeoW IFdafgpoFVt4pJOFAox1nKmjqAbzRve4NbRLpAVp1HXZsVWNTGXdoYAEkKV3VWXld1 nibTIrZwZQ2tyJPQuRpLChTjSO2NwaxMRvqme4tpphdwpVrIj0sorp7ua9b47ucqp2 hS35leQOsOsfg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH 5/6] kbuild: change ld_flags to contain LDFLAGS_$(@F) Date: Thu, 12 Jul 2018 17:01:35 +0900 Message-Id: <1531382496-3719-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> References: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180712_010222_538045_2638862D X-CRM114-Status: UNSURE ( 7.07 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.79 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Weinberger , Jeff Dike , x86@kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Russell King , openrisc@lists.librecores.org, "Kirill A . Shutemov" , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Put $(LDFLAGS_$(@F)) into ld_flags so that $(LDFLAGS_pcap.o) and $(LDFLAGS_vde.o) in arch/um/drivers/Makefile are absorbed. Signed-off-by: Masahiro Yamada --- arch/um/drivers/Makefile | 4 ++-- scripts/Makefile.lib | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile index 16b3ceb..69331983 100644 --- a/arch/um/drivers/Makefile +++ b/arch/um/drivers/Makefile @@ -25,10 +25,10 @@ LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a) targets := pcap_kern.o pcap_user.o vde_kern.o vde_user.o $(obj)/pcap.o: $(obj)/pcap_kern.o $(obj)/pcap_user.o - $(LD) -r -dp -o $@ $^ $(LDFLAGS) $(LDFLAGS_pcap.o) + $(LD) -r -dp -o $@ $^ $(ld_flags) $(obj)/vde.o: $(obj)/vde_kern.o $(obj)/vde_user.o - $(LD) -r -dp -o $@ $^ $(LDFLAGS) $(LDFLAGS_vde.o) + $(LD) -r -dp -o $@ $^ $(ld_flags) #XXX: The call below does not work because the flags are added before the # object name, so nothing from the library gets linked. diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 1915574..f56bb4b 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -162,7 +162,7 @@ a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ $(__cpp_flags) -ld_flags = $(LDFLAGS) $(ldflags-y) +ld_flags = $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) DTC_INCLUDE := $(srctree)/scripts/dtc/include-prefixes @@ -225,7 +225,7 @@ $(obj)/%: $(src)/%_shipped # --------------------------------------------------------------------------- quiet_cmd_ld = LD $@ -cmd_ld = $(LD) $(ld_flags) $(LDFLAGS_$(@F)) $(filter-out FORCE,$^) -o $@ +cmd_ld = $(LD) $(ld_flags) $(filter-out FORCE,$^) -o $@ # Objcopy # --------------------------------------------------------------------------- From patchwork Thu Jul 12 08:01:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 942844 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TPdlSJzb"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="2kHlYOek"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="ZZTYVEI2"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41R7kN0Zvzz9s2L for ; Thu, 12 Jul 2018 18:04:12 +1000 (AEST) 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=tirrqracBo3eeiKtKhu2LnlC+zj51zjvQpkHDclvWN0=; b=TPdlSJzbzlSm3JKFemq7zqnm+d DdAYvmMaIGR8l6DvRxkKpBUwp/uRedmoSy+d89XSxuT3nvQtqT7wWT7tqyxZYTxxEm0mOTQOjp7qG BzIKtRiVHl3iyrLdiZuyucp7AuCm8nsCMWndOSCExPWx+BFqEfa+XSfnGYJ9+V0SpQrGTI/xbftLO TylIIL7KBDr/MWbe0bq5nPFa+R4191ZRHQYASuKkvhpRNaCNzX7v6yterd5ZylcddFd/ZldjFhbxj s7EJ7ni06CGdk3QJNV1ar4iexOAalOJQTfsHFe2g6TufnVYn3+IT5Vl/8keYLjk5bnHiTglohjBct V0JMh+Gg==; 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 1fdWa3-0002gk-AL; Thu, 12 Jul 2018 08:04:03 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdWYl-00014R-Qj; Thu, 12 Jul 2018 08:02:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=473LzbsZMJ8t99qQtYBmyWMkY2Oh8AIrVtmsosDlUbc=; b=2kHlYOekdZRDzCiFF1x4mUMl/ M6CQ56tRTpBbeY/YkL4SGn1dUtVzmf7iX10sUZzdRf2k3tJd2I/gvpJD3Po3Ui8v0wDi6eGtgZi4O AMhMx0ImxGgvw9XWwW+2dvXWa9IujRRX8m2rNCN5u1osWKiFRE6VmRT/BLaSlmCXULdaMKDxQQWpI sadXo9HCRfh64fJ2tLBCKB7r2PUf7z2Kcw5oKmL7Otx2SSd2vBpaN7U/4tApprMwsb1qBaCWecnKc zykMCBmdJuDfJ/K2w3/Tmwt+f/712QEB8G+bHO/lfWKR83pl5da1v+5L2d4c6XUjgrwKtGl5zXQTQ +rl2lxr/A==; Received: from conuserg-12.nifty.com ([210.131.2.79]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdWYh-0001Qn-TN; Thu, 12 Jul 2018 08:02:41 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id w6C81cQl012716; Thu, 12 Jul 2018 17:01:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w6C81cQl012716 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1531382507; bh=473LzbsZMJ8t99qQtYBmyWMkY2Oh8AIrVtmsosDlUbc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZZTYVEI2832026xvPI1+p4r5eC8s1d+Ljru38EddRgsEttfNJ7ar20BRdEXmA/obR P/+IS+gmGl9SrsQ9OUbHbF09H1X3C5KztkeWx6txRWQ58I1z3Kdo6LVsLy/MIGZuqn 28bdqbVSJA4aqqAchyBus3Nf0SbXGE36IHz/UOwQHDEIMqZi91f2/8txvpNnIJjwF+ oPMCbH1p5beSIfYxWvYIjBB+P/DCNsYOy/QFzT74Q9Mphgam8u2RYwRqz7iIXn5/0i nC1ZKfC87JCE6GrHUUdJyP1BnMOhZM9svkLeG5nFIaT7z0K7XWWWJpg1yQNxezqNKU dfZqYvfpSZRvA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH 6/6] kbuild: rename LDFLAGS to KBUILD_LDFLAGS Date: Thu, 12 Jul 2018 17:01:36 +0900 Message-Id: <1531382496-3719-7-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> References: <1531382496-3719-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180712_040240_506428_0142CAF7 X-CRM114-Status: GOOD ( 15.66 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.79 listed in list.dnswl.org] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Weinberger , Jeff Dike , x86@kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Russell King , openrisc@lists.librecores.org, "Kirill A . Shutemov" , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Commit a0f97e06a43c ("kbuild: enable 'make CFLAGS=...' to add additional options to CC") renamed CFLAGS to KBUILD_CFLAGS. Commit 222d394d30e7 ("kbuild: enable 'make AFLAGS=...' to add additional options to AS") renamed AFLAGS to KBUILD_AFLAGS. Commit 06c5040cdb13 ("kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP") renamed CPPFLAGS to KBUILD_CPPFLAGS. For some reason, LDFLAGS was not renamed. Using a well-known variable like LDFLAGS may result in accidental override of the variable. Kbuild generally uses KBUILD_ prefixed variables for the internally appended options, so here is one more conversion to sanitize the naming convention. I did not touch Makefiles under tools/ since the tools build system is a different world. Signed-off-by: Masahiro Yamada --- Makefile | 6 +++--- arch/arc/Makefile | 2 +- arch/arm/Makefile | 4 ++-- arch/arm64/Makefile | 4 ++-- arch/c6x/Makefile | 3 +-- arch/h8300/Makefile | 2 +- arch/hexagon/Makefile | 4 +--- arch/m68k/Makefile | 2 +- arch/microblaze/Makefile | 4 ++-- arch/mips/Makefile | 2 +- arch/mips/boot/compressed/Makefile | 2 +- arch/mips/lasat/image/Makefile | 2 +- arch/nds32/Makefile | 4 ++-- arch/powerpc/Makefile | 6 +++--- arch/riscv/Makefile | 4 ++-- arch/s390/Makefile | 2 +- arch/sh/Makefile | 4 ++-- arch/sparc/Makefile | 4 ++-- arch/um/Makefile | 2 +- arch/x86/Makefile | 4 ++-- arch/x86/Makefile.um | 2 +- arch/x86/boot/compressed/Makefile | 6 +++--- arch/xtensa/Makefile | 2 +- arch/xtensa/boot/boot-elf/Makefile | 2 +- scripts/Kbuild.include | 4 ++-- scripts/Makefile.build | 4 ++-- scripts/Makefile.lib | 2 +- scripts/Makefile.modpost | 2 +- 28 files changed, 44 insertions(+), 47 deletions(-) diff --git a/Makefile b/Makefile index 925c55f..9eaa9b7 100644 --- a/Makefile +++ b/Makefile @@ -426,7 +426,7 @@ KBUILD_CFLAGS_KERNEL := KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds -LDFLAGS := +KBUILD_LDFLAGS := GCC_PLUGINS_CFLAGS := export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC @@ -434,7 +434,7 @@ export CPP AR NM STRIP OBJCOPY OBJDUMP HOSTLDFLAGS HOST_LOADLIBES export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS -export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS +export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE CFLAGS_UBSAN export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE @@ -997,7 +997,7 @@ ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink) # Final link of vmlinux with optional arch pass after final link cmd_link-vmlinux = \ - $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ; \ + $(CONFIG_SHELL) $< $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) ; \ $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE diff --git a/arch/arc/Makefile b/arch/arc/Makefile index d37f49d..5aecb8b 100644 --- a/arch/arc/Makefile +++ b/arch/arc/Makefile @@ -95,7 +95,7 @@ KBUILD_CFLAGS_MODULE += -mlong-calls -mno-millicode # Finally dump eveything into kernel build system KBUILD_CFLAGS += $(cflags-y) KBUILD_AFLAGS += $(KBUILD_CFLAGS) -LDFLAGS += $(ldflags-y) +KBUILD_LDFLAGS += $(ldflags-y) head-y := arch/arc/kernel/head.o diff --git a/arch/arm/Makefile b/arch/arm/Makefile index e7d703d..360f80a 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -43,12 +43,12 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) KBUILD_CPPFLAGS += -mbig-endian CHECKFLAGS += -D__ARMEB__ AS += -EB -LDFLAGS += -EB +KBUILD_LDFLAGS += -EB else KBUILD_CPPFLAGS += -mlittle-endian CHECKFLAGS += -D__ARMEL__ AS += -EL -LDFLAGS += -EL +KBUILD_LDFLAGS += -EL endif # diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 7976d2d..ae064d1 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -60,13 +60,13 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN), y) KBUILD_CPPFLAGS += -mbig-endian CHECKFLAGS += -D__AARCH64EB__ AS += -EB -LDFLAGS += -EB -maarch64elfb +KBUILD_LDFLAGS += -EB -maarch64elfb UTS_MACHINE := aarch64_be else KBUILD_CPPFLAGS += -mlittle-endian CHECKFLAGS += -D__AARCH64EL__ AS += -EL -LDFLAGS += -EL -maarch64elf +KBUILD_LDFLAGS += -EL -maarch64elf UTS_MACHINE := aarch64 endif diff --git a/arch/c6x/Makefile b/arch/c6x/Makefile index 6ab942e..3fe8a94 100644 --- a/arch/c6x/Makefile +++ b/arch/c6x/Makefile @@ -23,8 +23,7 @@ ifdef CONFIG_CPU_BIG_ENDIAN KBUILD_CFLAGS += -mbig-endian KBUILD_AFLAGS += -mbig-endian LINKFLAGS += -mbig-endian -KBUILD_LDFLAGS += -mbig-endian -LDFLAGS += -EB +KBUILD_LDFLAGS += -mbig-endian -EB CHECKFLAGS += -D_BIG_ENDIAN endif diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile index e1c02ca..f9cbbb1 100644 --- a/arch/h8300/Makefile +++ b/arch/h8300/Makefile @@ -20,7 +20,7 @@ KBUILD_CFLAGS += -mint32 -fno-builtin KBUILD_CFLAGS += -D__linux__ KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" KBUILD_AFLAGS += $(aflags-y) -LDFLAGS += $(ldflags-y) +KBUILD_LDFLAGS += $(ldflags-y) ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := h8300-unknown-linux- diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile index 2efaa18..4c5858b 100644 --- a/arch/hexagon/Makefile +++ b/arch/hexagon/Makefile @@ -22,9 +22,7 @@ ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) KBUILD_CFLAGS += $(cflags-y) KBUILD_AFLAGS += $(aflags-y) - -# no KBUILD_LDFLAGS? -LDFLAGS += $(ldflags-y) +KBUILD_LDFLAGS += $(ldflags-y) # Thread-info register will be r19. This value is not configureable; # it is hard-coded in several files. diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index f0dd9fc..997c9f2 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile @@ -69,7 +69,7 @@ KBUILD_CFLAGS += -D__uClinux__ KBUILD_AFLAGS += -D__uClinux__ endif -LDFLAGS := -m m68kelf +KBUILD_LDFLAGS := -m m68kelf KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds ifdef CONFIG_SUN3 diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 7333036..4f3ab57 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -40,11 +40,11 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare ifdef CONFIG_CPU_BIG_ENDIAN KBUILD_CFLAGS += -mbig-endian KBUILD_AFLAGS += -mbig-endian -LDFLAGS += -EB +KBUILD_LDFLAGS += -EB else KBUILD_CFLAGS += -mlittle-endian KBUILD_AFLAGS += -mlittle-endian -LDFLAGS += -EL +KBUILD_LDFLAGS += -EL endif CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index e2122cc..0d1b5e6 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -303,7 +303,7 @@ endif # instead of .eh_frame so we don't discard them. KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -LDFLAGS += -m $(ld-emul) +KBUILD_LDFLAGS += -m $(ld-emul) ifdef CONFIG_MIPS CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index abe77ad..3c453a1 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -92,7 +92,7 @@ UIMAGE_LOADADDR = $(VMLINUZ_LOAD_ADDRESS) vmlinuzobjs-y += $(obj)/piggy.o quiet_cmd_zld = LD $@ - cmd_zld = $(LD) $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@ + cmd_zld = $(LD) $(KBUILD_LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@ quiet_cmd_strip = STRIP $@ cmd_strip = $(STRIP) -s $@ vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr diff --git a/arch/mips/lasat/image/Makefile b/arch/mips/lasat/image/Makefile index 9ab1326..78ce4cf 100644 --- a/arch/mips/lasat/image/Makefile +++ b/arch/mips/lasat/image/Makefile @@ -38,7 +38,7 @@ $(obj)/rom.bin: $(obj)/rom # Rule to make the bootloader $(obj)/rom: $(addprefix $(obj)/,$(OBJECTS)) - $(LD) $(LDFLAGS) $(LDSCRIPT) -o $@ $^ + $(LD) $(KBUILD_LDFLAGS) $(LDSCRIPT) -o $@ $^ $(obj)/%.o: $(obj)/%.gz $(LD) -r -o $@ -b binary $< diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile index 513bb2e..b1321c4 100644 --- a/arch/nds32/Makefile +++ b/arch/nds32/Makefile @@ -33,11 +33,11 @@ endif ifdef CONFIG_CPU_LITTLE_ENDIAN KBUILD_CFLAGS += $(call cc-option, -EL) KBUILD_AFLAGS += $(call cc-option, -EL) -LDFLAGS += $(call cc-option, -EL) +KBUILD_LDFLAGS += $(call cc-option, -EL) else KBUILD_CFLAGS += $(call cc-option, -EB) KBUILD_AFLAGS += $(call cc-option, -EB) -LDFLAGS += $(call cc-option, -EB) +KBUILD_LDFLAGS += $(call cc-option, -EB) endif boot := arch/nds32/boot diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 2ea575c..3d157fc 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -76,14 +76,14 @@ endif ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y) KBUILD_CFLAGS += -mlittle-endian -LDFLAGS += -EL +KBUILD_LDFLAGS += -EL LDEMULATION := lppc GNUTARGET := powerpcle MULTIPLEWORD := -mno-multiple KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-save-toc-indirect) else KBUILD_CFLAGS += $(call cc-option,-mbig-endian) -LDFLAGS += -EB +KBUILD_LDFLAGS += -EB LDEMULATION := ppc GNUTARGET := powerpc MULTIPLEWORD := -mmultiple @@ -108,7 +108,7 @@ aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian ifeq ($(HAS_BIARCH),y) KBUILD_CFLAGS += -m$(BITS) KBUILD_AFLAGS += -m$(BITS) -Wl,-a$(BITS) -LDFLAGS += -m elf$(BITS)$(LDEMULATION) +KBUILD_LDFLAGS += -m elf$(BITS)$(LDEMULATION) KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET) endif diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 2627e48..71b5741 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -26,7 +26,7 @@ ifeq ($(CONFIG_ARCH_RV64I),y) KBUILD_CFLAGS += -mabi=lp64 KBUILD_AFLAGS += -mabi=lp64 KBUILD_MARCH = rv64im - LDFLAGS += -melf64lriscv + KBUILD_LDFLAGS += -melf64lriscv else BITS := 32 UTS_MACHINE := riscv32 @@ -34,7 +34,7 @@ else KBUILD_CFLAGS += -mabi=ilp32 KBUILD_AFLAGS += -mabi=ilp32 KBUILD_MARCH = rv32im - LDFLAGS += -melf32lriscv + KBUILD_LDFLAGS += -melf32lriscv endif KBUILD_CFLAGS += -Wall diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 68a6904..60120b6 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -11,7 +11,7 @@ # LD_BFD := elf64-s390 -LDFLAGS := -m elf64_s390 +KBUILD_LDFLAGS := -m elf64_s390 KBUILD_AFLAGS_MODULE += -fPIC KBUILD_CFLAGS_MODULE += -fPIC KBUILD_CFLAGS += -m64 diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 65300193..c521ade 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -122,11 +122,11 @@ endif ifdef CONFIG_CPU_LITTLE_ENDIAN ld-bfd := elf32-$(UTS_MACHINE)-linux LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld-bfd) -LDFLAGS += -EL +KBUILD_LDFLAGS += -EL else ld-bfd := elf32-$(UTS_MACHINE)big-linux LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld-bfd) -LDFLAGS += -EB +KBUILD_LDFLAGS += -EB endif export ld-bfd BITS diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index 966a13d..8ece494 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile @@ -21,7 +21,7 @@ ifeq ($(CONFIG_SPARC32),y) # CHECKFLAGS += -D__sparc__ -LDFLAGS := -m elf32_sparc +KBUILD_LDFLAGS := -m elf32_sparc export BITS := 32 UTS_MACHINE := sparc @@ -40,7 +40,7 @@ else # CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -LDFLAGS := -m elf64_sparc +KBUILD_LDFLAGS := -m elf64_sparc export BITS := 64 UTS_MACHINE := sparc64 diff --git a/arch/um/Makefile b/arch/um/Makefile index e54dda8..6c4aed1 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -142,7 +142,7 @@ export LDS_ELF_FORMAT := $(ELF_FORMAT) # The wrappers will select whether using "malloc" or the kernel allocator. LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc -LD_FLAGS_CMDLINE = $(foreach opt,$(LDFLAGS),-Wl,$(opt)) +LD_FLAGS_CMDLINE = $(foreach opt,$(KBUILD_LDFLAGS),-Wl,$(opt)) # Used by link-vmlinux.sh which has special support for um link export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index a08e828..9129a96 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -224,7 +224,7 @@ sha256_ni_instr :=$(call as-instr,sha256msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA2 KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) -LDFLAGS := -m elf_$(UTS_MACHINE) +KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) # # The 64-bit kernel must be aligned to 2MB. Pass -z max-page-size=0x200000 to @@ -232,7 +232,7 @@ LDFLAGS := -m elf_$(UTS_MACHINE) # by the linker. # ifdef CONFIG_X86_64 -LDFLAGS += $(call ld-option, -z max-page-size=0x200000) +KBUILD_LDFLAGS += $(call ld-option, -z max-page-size=0x200000) endif # Speed up the build diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um index 5296f8c..0d347ee 100644 --- a/arch/x86/Makefile.um +++ b/arch/x86/Makefile.um @@ -4,7 +4,7 @@ core-y += arch/x86/crypto/ ifeq ($(CONFIG_X86_32),y) START := 0x8048000 -LDFLAGS += -m elf_i386 +KBUILD_LDFLAGS += -m elf_i386 ELF_ARCH := i386 ELF_FORMAT := elf32-i386 CHECKFLAGS += -D__i386__ diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index fa42f89..e1dc356 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -42,16 +42,16 @@ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ GCOV_PROFILE := n UBSAN_SANITIZE :=n -LDFLAGS := -m elf_$(UTS_MACHINE) +KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) # Compressed kernel should be built as PIE since it may be loaded at any # address by the bootloader. ifeq ($(CONFIG_X86_32),y) -LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker) +KBUILD_LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker) else # To build 64-bit compressed kernel as PIE, we disable relocation # overflow check to avoid relocation overflow error with a new linker # command-line option, -z noreloc-overflow. -LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \ +KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \ && echo "-z noreloc-overflow -pie --no-dynamic-linker") endif LDFLAGS_vmlinux := -T diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 3a934b7..295c120 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile @@ -49,7 +49,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,) KBUILD_AFLAGS += -mlongcalls -mtext-section-literals ifneq ($(CONFIG_LD_NO_RELAX),) -LDFLAGS := --no-relax +KBUILD_LDFLAGS := --no-relax endif ifeq ($(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1) diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile index 5214719..12ae1e9 100644 --- a/arch/xtensa/boot/boot-elf/Makefile +++ b/arch/xtensa/boot/boot-elf/Makefile @@ -25,7 +25,7 @@ $(obj)/Image.o: vmlinux.bin $(OBJS) $(OBJS) $@ $(obj)/../Image.elf: $(obj)/Image.o $(obj)/boot.lds - $(Q)$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ + $(Q)$(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_vmlinux) \ -T $(obj)/boot.lds \ --build-id=none \ -o $@ $(obj)/Image.o diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index c8156d6..feb918f 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -163,8 +163,8 @@ cc-ldoption = $(call try-run,\ $(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) # ld-option -# Usage: LDFLAGS += $(call ld-option, -X) -ld-option = $(call try-run, $(LD) $(LDFLAGS) $(1) -v,$(1),$(2)) +# Usage: KBUILD_LDFLAGS += $(call ld-option, -X) +ld-option = $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2)) # ar-option # Usage: KBUILD_ARFLAGS := $(call ar-option,D) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index e7889f4..42d61c1 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -197,7 +197,7 @@ cmd_modversions_c = \ $(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ > $(@D)/.tmp_$(@F:.o=.ver); \ \ - $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ + $(LD) $(KBUILD_LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ -T $(@D)/.tmp_$(@F:.o=.ver); \ rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ else \ @@ -404,7 +404,7 @@ cmd_modversions_S = \ $(call cmd_gensymtypes_S,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ > $(@D)/.tmp_$(@F:.o=.ver); \ \ - $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ + $(LD) $(KBUILD_LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ -T $(@D)/.tmp_$(@F:.o=.ver); \ rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ else \ diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index f56bb4b..193c551 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -162,7 +162,7 @@ a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ $(__cpp_flags) -ld_flags = $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) +ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) DTC_INCLUDE := $(srctree)/scripts/dtc/include-prefixes diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index df41744..fa00c61 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -120,7 +120,7 @@ ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink) # Step 6), final link of the modules with optional arch pass after final link quiet_cmd_ld_ko_o = LD [M] $@ cmd_ld_ko_o = \ - $(LD) -r $(LDFLAGS) \ + $(LD) -r $(KBUILD_LDFLAGS) \ $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ -o $@ $(filter-out FORCE,$^) ; \ $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)