diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-15 20:21:30 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-15 20:21:30 -0400 |
| commit | ca71b3ba4c78c2c05b44be9b257a4127223f0b0c (patch) | |
| tree | e2f6fb5d512bfbde346359307d135adfbd35a494 /tools | |
| parent | 9fb71c2f230df44bdd237e9a4457849a3909017d (diff) | |
| parent | 17baab68d337a0bf4654091e2b4cd67c3fdb44d8 (diff) | |
Merge tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull more Kbuild updates from Masahiro Yamada:
- pass HOSTLDFLAGS when compiling single .c host programs
- build genksyms lexer and parser files instead of using shipped
versions
- rename *-asn1.[ch] to *.asn1.[ch] for suffix consistency
- let the top .gitignore globally ignore artifacts generated by flex,
bison, and asn1_compiler
- let the top Makefile globally clean artifacts generated by flex,
bison, and asn1_compiler
- use safer .SECONDARY marker instead of .PRECIOUS to prevent
intermediate files from being removed
- support -fmacro-prefix-map option to make __FILE__ a relative path
- fix # escaping to prepare for the future GNU Make release
- clean up deb-pkg by using debian tools instead of handrolled
source/changes generation
- improve rpm-pkg portability by supporting kernel-install as a
fallback of new-kernel-pkg
- extend Kconfig listnewconfig target to provide more information
* tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kconfig: extend output of 'listnewconfig'
kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg
Kbuild: fix # escaping in .cmd files for future Make
kbuild: deb-pkg: split generating packaging and build
kbuild: use -fmacro-prefix-map to make __FILE__ a relative path
kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers
kbuild: rename *-asn1.[ch] to *.asn1.[ch]
kbuild: clean up *-asn1.[ch] patterns from top-level Makefile
.gitignore: move *-asn1.[ch] patterns to the top-level .gitignore
kbuild: add %.dtb.S and %.dtb to 'targets' automatically
kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically
genksyms: generate lexer and parser during build instead of shipping
kbuild: clean up *.lex.c and *.tab.[ch] patterns from top-level Makefile
.gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore
kbuild: use HOSTLDFLAGS for single .c executables
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/build/Build.include | 5 | ||||
| -rw-r--r-- | tools/objtool/Makefile | 2 | ||||
| -rw-r--r-- | tools/scripts/Makefile.include | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/tools/build/Build.include b/tools/build/Build.include index 418871d02ebf..a4bbb984941d 100644 --- a/tools/build/Build.include +++ b/tools/build/Build.include | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | # Convenient variables | 12 | # Convenient variables |
| 13 | comma := , | 13 | comma := , |
| 14 | squote := ' | 14 | squote := ' |
| 15 | pound := \# | ||
| 15 | 16 | ||
| 16 | ### | 17 | ### |
| 17 | # Name of target with a '.' as filename prefix. foo/bar.o => foo/.bar.o | 18 | # Name of target with a '.' as filename prefix. foo/bar.o => foo/.bar.o |
| @@ -43,11 +44,11 @@ echo-cmd = $(if $($(quiet)cmd_$(1)),\ | |||
| 43 | ### | 44 | ### |
| 44 | # Replace >$< with >$$< to preserve $ when reloading the .cmd file | 45 | # Replace >$< with >$$< to preserve $ when reloading the .cmd file |
| 45 | # (needed for make) | 46 | # (needed for make) |
| 46 | # Replace >#< with >\#< to avoid starting a comment in the .cmd file | 47 | # Replace >#< with >$(pound)< to avoid starting a comment in the .cmd file |
| 47 | # (needed for make) | 48 | # (needed for make) |
| 48 | # Replace >'< with >'\''< to be able to enclose the whole string in '...' | 49 | # Replace >'< with >'\''< to be able to enclose the whole string in '...' |
| 49 | # (needed for the shell) | 50 | # (needed for the shell) |
| 50 | make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,$$$$,$(cmd_$(1))))) | 51 | make-cmd = $(call escsq,$(subst $(pound),$$(pound),$(subst $$,$$$$,$(cmd_$(1))))) |
| 51 | 52 | ||
| 52 | ### | 53 | ### |
| 53 | # Find any prerequisites that is newer than target or that does not exist. | 54 | # Find any prerequisites that is newer than target or that does not exist. |
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index e6acc281dd37..8ae824dbfca3 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile | |||
| @@ -35,7 +35,7 @@ CFLAGS += -Wall -Werror $(WARNINGS) -fomit-frame-pointer -O2 -g $(INCLUDES) | |||
| 35 | LDFLAGS += -lelf $(LIBSUBCMD) | 35 | LDFLAGS += -lelf $(LIBSUBCMD) |
| 36 | 36 | ||
| 37 | # Allow old libelf to be used: | 37 | # Allow old libelf to be used: |
| 38 | elfshdr := $(shell echo '\#include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr) | 38 | elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr) |
| 39 | CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED) | 39 | CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED) |
| 40 | 40 | ||
| 41 | AWK = awk | 41 | AWK = awk |
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index dd614463d4d6..495066bafbe3 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include | |||
| @@ -120,3 +120,5 @@ ifneq ($(silent),1) | |||
| 120 | QUIET_UNINST = @printf ' UNINST %s\n' $1; | 120 | QUIET_UNINST = @printf ' UNINST %s\n' $1; |
| 121 | endif | 121 | endif |
| 122 | endif | 122 | endif |
| 123 | |||
| 124 | pound := \# | ||
