aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-15 20:21:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-15 20:21:30 -0400
commitca71b3ba4c78c2c05b44be9b257a4127223f0b0c (patch)
treee2f6fb5d512bfbde346359307d135adfbd35a494 /tools
parent9fb71c2f230df44bdd237e9a4457849a3909017d (diff)
parent17baab68d337a0bf4654091e2b4cd67c3fdb44d8 (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.include5
-rw-r--r--tools/objtool/Makefile2
-rw-r--r--tools/scripts/Makefile.include2
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
13comma := , 13comma := ,
14squote := ' 14squote := '
15pound := \#
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)
50make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,$$$$,$(cmd_$(1))))) 51make-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)
35LDFLAGS += -lelf $(LIBSUBCMD) 35LDFLAGS += -lelf $(LIBSUBCMD)
36 36
37# Allow old libelf to be used: 37# Allow old libelf to be used:
38elfshdr := $(shell echo '\#include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr) 38elfshdr := $(shell echo '$(pound)include <libelf.h>' | $(CC) $(CFLAGS) -x c -E - | grep elf_getshdr)
39CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED) 39CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
40 40
41AWK = awk 41AWK = 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
122endif 122endif
123
124pound := \#