From patchwork Wed Feb 20 03:38:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 158753 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp4440032jaa; Tue, 19 Feb 2019 19:38:43 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib0p91RvXBiZK9NAr+TfI3t+/kSL2r90LYP+ObThA5ETetM3bWh/DC85Y8mobBYycC/z5Tr X-Received: by 2002:a63:8441:: with SMTP id k62mr25707236pgd.219.1550633923170; Tue, 19 Feb 2019 19:38:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550633923; cv=none; d=google.com; s=arc-20160816; b=QecjWnIN0GkFdy/DiE4NLbkJBvR8Qn9GfwPLDoU+/0/UmZbGFN+88y8xx3z1INH9eQ ISPby1sIcvB/fcS6dHXQJm9grIeIRnnzMHbwSPEa+TP7Js7e79qvhMeta7fRGQNdIkU9 rfm3i4qt3h8ma//HUWP6OKPacyiCcraKC3HCpB8RwrGFWuHV5TzPgm7TDevQtsKnJ751 u21AngslbLmZvNqcECG4+gQBUX2CbZsZcOaMIKn77JX78OSVqB6KooYQhpCa/CWXzOm+ QMZup40rBJz3X6zvNwFizpqZ9oiA9Q+tM3Wj0L+OIkXcdXMAVV8WQxgB1IUMYd4GDe+d cGeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=UxMuinGDS1/f2cFuVBBDQD0EBncNX2Vm4RGjqVgQHqw=; b=h2326JGnZlCiJHHUR51ucVU5+P1Bn6NwHynz63bHbAG65eYlrnbxdh7l4n+XdGynSH bdzIK2XMabgdCf4XxxEpWii1ElKavpgb9A4WRFR3F/vyITdpxYWVTMoQ3qW+dcDdlD1d f3qHW5ra4S4aZ3+5sIFpzdDe0kr/lDZWmLoeRHBDFssTMtarAj/d7hDVi2b/kBRpqBe2 /o1rBfU+Wy5wYvHe4bik7wO6yJnRq2v4qPtdzOxCjeBCEPmLBp5svRKfnk5W2NO6Igfb 4m7BIe4zr7WM+tmAbVSEyWt6GeGvgeNAx49yH9L70EyM2VjtJAESIW92dOBy+axNTo3l P3kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=tDkykB5N; 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 l2si17536226pfc.287.2019.02.19.19.38.42; Tue, 19 Feb 2019 19:38:43 -0800 (PST) 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=tDkykB5N; 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 S1730360AbfBTDil (ORCPT + 32 others); Tue, 19 Feb 2019 22:38:41 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:41817 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726312AbfBTDil (ORCPT ); Tue, 19 Feb 2019 22:38:41 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x1K3cX4H029864; Wed, 20 Feb 2019 12:38:33 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x1K3cX4H029864 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1550633914; bh=UxMuinGDS1/f2cFuVBBDQD0EBncNX2Vm4RGjqVgQHqw=; h=From:To:Cc:Subject:Date:From; b=tDkykB5NIEXP2G8pyMrf7/8bSQWGuQQQUHjbLIILdf/jcjt4T+nrvr+7MT9zct3yd b8QyjS5hZ2C9xsh03WFItSNJMBJSmb07C30PTeMTAHaLDjzzdT4NWk9xOioSIKobXk jC6CbCWLyrkgnlLBloavadPLuAB35ZFeoWhnlIvy8fCfiTQ1fxcsTi16heOlgZEb+P RcUZB2qUV3ZHuxolDqoUYFK3KdTjaO2uCy3Sgpao7nw4YSUWjc8jaGBx+b9VB0deEs RXzGF9El58K/khqLjN9LlAT3osXrBarJ1t1n9OxjXF5HNRWXyQe1C6yPzMyA29LwmJ 3TcHLavbTGdxw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: hardcode genksyms path and remove GENKSYMS variable Date: Wed, 20 Feb 2019 12:38:31 +0900 Message-Id: <1550633911-11741-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The genksyms source was integrated into the kernel tree in 2003. I do not expect anybody still using the external /sbin/genksyms. Kbuild does not need to provide the ability to override GENKSYMS. Let's remove the GENKSYMS variable, and use the hardcoded path. Since it occurred in the pre-git era, I attached the commit message in case somebody is interested in the historical background. | Author: Kai Germaschewski | Date: Wed Feb 19 04:17:28 2003 -0600 | | kbuild: [PATCH] put genksyms in scripts dir | | This puts genksyms into scripts/genksyms/. | | genksyms used to be maintained externally, though the only possible user | was the kernel build. Moving it into the kernel sources makes it easier to | keep it uptodate, like for example updating it to generate linker scripts | directly instead of postprocessing the generated header file fragments | with sed, as we do currently. | | Also, genksyms does not handle __typeof__, which needs to be fixed since | some of the exported symbol in the kernel are defined using __typeof__. | | (Rusty Russell/me) Signed-off-by: Masahiro Yamada --- Makefile | 3 +-- scripts/Makefile.build | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index def7c79..e19a3e3 100644 --- a/Makefile +++ b/Makefile @@ -390,7 +390,6 @@ OBJDUMP = $(CROSS_COMPILE)objdump LEX = flex YACC = bison AWK = awk -GENKSYMS = scripts/genksyms/genksyms INSTALLKERNEL := installkernel DEPMOD = /sbin/depmod PERL = perl @@ -443,7 +442,7 @@ GCC_PLUGINS_CFLAGS := export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS -export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE +export MAKE LEX YACC AWK INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 89debbe..f013182 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -120,7 +120,7 @@ $(obj)/%.i: $(src)/%.c FORCE # These mirror gensymtypes_S and co below, keep them in synch. cmd_gensymtypes_c = \ $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ - $(GENKSYMS) $(if $(1), -T $(2)) \ + scripts/genksyms/genksyms $(if $(1), -T $(2)) \ $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \ $(if $(KBUILD_PRESERVE),-p) \ -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) @@ -320,7 +320,7 @@ cmd_gensymtypes_S = \ grep "\<___EXPORT_SYMBOL\>" | \ sed 's/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/' ; } | \ $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | \ - $(GENKSYMS) $(if $(1), -T $(2)) \ + scripts/genksyms/genksyms $(if $(1), -T $(2)) \ $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \ $(if $(KBUILD_PRESERVE),-p) \ -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null))