diff options
| author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-02-19 22:38:31 -0500 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-02-27 07:41:26 -0500 |
| commit | 88110713ca9dfbb0b6cb8bbb46ef6ecb313d6681 (patch) | |
| tree | dcc9bb1f28fc626e093112180ab548b48451e72e | |
| parent | b513adf45c9bca9222a0533e0c412b66350a8ab5 (diff) | |
kbuild: hardcode genksyms path and remove GENKSYMS variable
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 <kai@tp1.ruhr-uni-bochum.de>
| 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 <yamada.masahiro@socionext.com>
| -rw-r--r-- | Makefile | 3 | ||||
| -rw-r--r-- | scripts/Makefile.build | 4 |
2 files changed, 3 insertions, 4 deletions
| @@ -390,7 +390,6 @@ OBJDUMP = $(CROSS_COMPILE)objdump | |||
| 390 | LEX = flex | 390 | LEX = flex |
| 391 | YACC = bison | 391 | YACC = bison |
| 392 | AWK = awk | 392 | AWK = awk |
| 393 | GENKSYMS = scripts/genksyms/genksyms | ||
| 394 | INSTALLKERNEL := installkernel | 393 | INSTALLKERNEL := installkernel |
| 395 | DEPMOD = /sbin/depmod | 394 | DEPMOD = /sbin/depmod |
| 396 | PERL = perl | 395 | PERL = perl |
| @@ -443,7 +442,7 @@ GCC_PLUGINS_CFLAGS := | |||
| 443 | 442 | ||
| 444 | export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC | 443 | export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC |
| 445 | export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS | 444 | export CPP AR NM STRIP OBJCOPY OBJDUMP KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS |
| 446 | export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE | 445 | export MAKE LEX YACC AWK INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE |
| 447 | export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | 446 | export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS |
| 448 | 447 | ||
| 449 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS | 448 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS |
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index b803233327d0..850b611f4aba 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
| @@ -120,7 +120,7 @@ $(obj)/%.i: $(src)/%.c FORCE | |||
| 120 | # These mirror gensymtypes_S and co below, keep them in synch. | 120 | # These mirror gensymtypes_S and co below, keep them in synch. |
| 121 | cmd_gensymtypes_c = \ | 121 | cmd_gensymtypes_c = \ |
| 122 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ | 122 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ |
| 123 | $(GENKSYMS) $(if $(1), -T $(2)) \ | 123 | scripts/genksyms/genksyms $(if $(1), -T $(2)) \ |
| 124 | $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \ | 124 | $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \ |
| 125 | $(if $(KBUILD_PRESERVE),-p) \ | 125 | $(if $(KBUILD_PRESERVE),-p) \ |
| 126 | -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) | 126 | -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) |
| @@ -320,7 +320,7 @@ cmd_gensymtypes_S = \ | |||
| 320 | grep "\<___EXPORT_SYMBOL\>" | \ | 320 | grep "\<___EXPORT_SYMBOL\>" | \ |
| 321 | sed 's/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/' ; } | \ | 321 | sed 's/.*___EXPORT_SYMBOL[[:space:]]*\([a-zA-Z0-9_]*\)[[:space:]]*,.*/EXPORT_SYMBOL(\1);/' ; } | \ |
| 322 | $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | \ | 322 | $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | \ |
| 323 | $(GENKSYMS) $(if $(1), -T $(2)) \ | 323 | scripts/genksyms/genksyms $(if $(1), -T $(2)) \ |
| 324 | $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \ | 324 | $(patsubst y,-R,$(CONFIG_MODULE_REL_CRCS)) \ |
| 325 | $(if $(KBUILD_PRESERVE),-p) \ | 325 | $(if $(KBUILD_PRESERVE),-p) \ |
| 326 | -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) | 326 | -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) |
