History

Merge tag 'kbuild-fixes-v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada: - update Kbuild and Kconfig documents - sanitize -I compiler option handling - update extract-vmlinux script to recognize LZ4 and ZSTD - fix tools Makefiles - update tags.sh to handle __ro_after_init - suppress warnings in case getconf does not recognize LFS_* parameters * tag 'kbuild-fixes-v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: suppress warnings from 'getconf LFS_*' scripts/tags.sh: add __ro_after_init tools: build: Use HOSTLDFLAGS with fixdep tools: build: Fixup host c flags tools build: fix # escaping in .cmd files for future Make scripts: teach extract-vmlinux about LZ4 and ZSTD kbuild: remove duplicated comments about PHONY kbuild: .PHONY is not a variable, but PHONY is kbuild: do not drop -I without parameter kbuild: document the KBUILD_KCONFIG env. variable kconfig: update user kconfig tools doc. kbuild: delete INSTALL_FW_PATH from kbuild documentation kbuild: update ARCH alias info for sparc kbuild: update ARCH alias info for sh

Linus Torvalds committed 8 years ago

Commit 79facf32 parents 9d2e348 6d79a7b15 files · +63 −50Browse files

Unified · Split

15 files
  1. Documentation/kbuild/kbuild.txt +7 −10
  2. Documentation/kbuild/kconfig.txt +43 −8
  3. Makefile +4 −4
  4. scripts/Kbuild.include +1 −1
  5. scripts/Makefile.build +0 −3
  6. scripts/Makefile.clean +0 −3
  7. scripts/Makefile.modbuiltin +0 −4
  8. scripts/Makefile.modinst +0 −4
  9. scripts/Makefile.modpost +0 −4
  10. scripts/Makefile.modsign +0 −3
  11. scripts/extract-vmlinux +2 −0
  12. scripts/tags.sh +1 −1
  13. tools/build/Build.include +3 −3
  14. tools/build/Makefile +1 −1
  15. tools/perf/pmu-events/Build +1 −1
Documentation/kbuild/kbuild.txt+7−10
@@ -50,6 +50,11 @@ LDFLAGS_MODULE · 49 unmodified lines
5050 --------------------------------------------------
5151 Additional options used for $(LD) when linking modules.
5252
53+KBUILD_KCONFIG
54+--------------------------------------------------
55+Set the top-level Kconfig file to the value of this environment
56+variable. The default name is "Kconfig".
57+
5358 KBUILD_VERBOSE
5459 --------------------------------------------------
5560 Set the kbuild verbosity. Can be assigned same values as "V=...".
@@ -88,7 +93,8 @@ In most cases the name of the architecture is the same as the · 32 unmodified lines
8893 directory name found in the arch/ directory.
8994 But some architectures such as x86 and sparc have aliases.
9095 x86: i386 for 32 bit, x86_64 for 64 bit
91−sparc: sparc for 32 bit, sparc64 for 64 bit
96+sh: sh for 32 bit, sh64 for 64 bit
97+sparc: sparc32 for 32 bit, sparc64 for 64 bit
9298
9399 CROSS_COMPILE
94100 --------------------------------------------------
@@ -148,15 +154,6 @@ stripped after they are installed. If INSTALL_MOD_STRIP is '1', then · 53 unmodified lines
148154 the default option --strip-debug will be used. Otherwise,
149155 INSTALL_MOD_STRIP value will be used as the options to the strip command.
150156
151−INSTALL_FW_PATH
152−--------------------------------------------------
153−INSTALL_FW_PATH specifies where to install the firmware blobs.
154−The default value is:
155−
156− $(INSTALL_MOD_PATH)/lib/firmware
157−
158−The value can be overridden in which case the default value is ignored.
159−
160157 INSTALL_HDR_PATH
161158 --------------------------------------------------
162159 INSTALL_HDR_PATH specifies where to install user space headers when
Documentation/kbuild/kconfig.txt+43−8
@@ -2,9 +2,9 @@ This file contains some assistance for using "make *config". · 1 unmodified line
22
33 Use "make help" to list all of the possible configuration targets.
44
5−The xconfig ('qconf') and menuconfig ('mconf') programs also
6−have embedded help text. Be sure to check it for navigation,
7−search, and other general help text.
5+The xconfig ('qconf'), menuconfig ('mconf'), and nconfig ('nconf')
6+programs also have embedded help text. Be sure to check that for
7+navigation, search, and other general help text.
88
99 ======================================================================
1010 General
@@ -17,13 +17,16 @@ this happens, using a previously working .config file and running · 6 unmodified lines
1717 for you, so you may find that you need to see what NEW kernel
1818 symbols have been introduced.
1919
20−To see a list of new config symbols when using "make oldconfig", use
20+To see a list of new config symbols, use
2121
2222 cp user/some/old.config .config
2323 make listnewconfig
2424
2525 and the config program will list any new symbols, one per line.
2626
27+Alternatively, you can use the brute force method:
28+
29+ make oldconfig
2730 scripts/diffconfig .config.old .config | less
2831
2932 ______________________________________________________________________
@@ -160,7 +163,7 @@ Searching in menuconfig: · 130 unmodified lines
160163 This lists all config symbols that contain "hotplug",
161164 e.g., HOTPLUG_CPU, MEMORY_HOTPLUG.
162165
163− For search help, enter / followed TAB-TAB-TAB (to highlight
166+ For search help, enter / followed by TAB-TAB (to highlight
164167 <Help>) and Enter. This will tell you that you can also use
165168 regular expressions (regexes) in the search string, so if you
166169 are not interested in MEMORY_HOTPLUG, you could try
@@ -202,6 +205,39 @@ Example: · 35 unmodified lines
202205 make MENUCONFIG_MODE=single_menu menuconfig
203206
204207
208+======================================================================
209+nconfig
210+--------------------------------------------------
211+
212+nconfig is an alternate text-based configurator. It lists function
213+keys across the bottom of the terminal (window) that execute commands.
214+You can also just use the corresponding numeric key to execute the
215+commands unless you are in a data entry window. E.g., instead of F6
216+for Save, you can just press 6.
217+
218+Use F1 for Global help or F3 for the Short help menu.
219+
220+Searching in nconfig:
221+
222+ You can search either in the menu entry "prompt" strings
223+ or in the configuration symbols.
224+
225+ Use / to begin a search through the menu entries. This does
226+ not support regular expressions. Use <Down> or <Up> for
227+ Next hit and Previous hit, respectively. Use <Esc> to
228+ terminate the search mode.
229+
230+ F8 (SymSearch) searches the configuration symbols for the
231+ given string or regular expression (regex).
232+
233+NCONFIG_MODE
234+--------------------------------------------------
235+This mode shows all sub-menus in one large tree.
236+
237+Example:
238+ make NCONFIG_MODE=single_menu nconfig
239+
240+
205241 ======================================================================
206242 xconfig
207243 --------------------------------------------------
@@ -230,8 +266,7 @@ gconfig · 22 unmodified lines
230266
231267 Searching in gconfig:
232268
233− None (gconfig isn't maintained as well as xconfig or menuconfig);
234− however, gconfig does have a few more viewing choices than
235− xconfig does.
269+ There is no search command in gconfig. However, gconfig does
270+ have several different viewing choices, modes, and options.
236271
237272 ###
Makefile+4−4
@@ -353,9 +353,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ · 352 unmodified lines
353353 else if [ -x /bin/bash ]; then echo /bin/bash; \
354354 else echo sh; fi ; fi)
355355
356−HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS)
357−HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS)
358−HOST_LFS_LIBS := $(shell getconf LFS_LIBS)
356+HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)
357+HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null)
358+HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
359359
360360 HOSTCC = gcc
361361 HOSTCXX = g++
@@ -1712,6 +1712,6 @@ endif # skip-makefile · 1350 unmodified lines
17121712 PHONY += FORCE
17131713 FORCE:
17141714
1715−# Declare the contents of the .PHONY variable as phony. We keep that
1715+# Declare the contents of the PHONY variable as phony. We keep that
17161716 # information in a variable so we can use it in if_changed and friends.
17171717 .PHONY: $(PHONY)
scripts/Kbuild.include+1−1
@@ -214,7 +214,7 @@ hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj · 213 unmodified lines
214214 # Prefix -I with $(srctree) if it is not an absolute path.
215215 # skip if -I has no parameter
216216 addtree = $(if $(patsubst -I%,%,$(1)), \
217−$(if $(filter-out -I/% -I./% -I../%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)))
217+$(if $(filter-out -I/% -I./% -I../%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)),$(1))
218218
219219 # Find all -I options and call addtree
220220 flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
scripts/Makefile.build+0−3
@@ -590,7 +590,4 @@ endif · 589 unmodified lines
590590 # We never want them to be removed automatically.
591591 .SECONDARY: $(targets)
592592
593−# Declare the contents of the .PHONY variable as phony. We keep that
594−# information in a variable se we can use it in if_changed and friends.
595−
596593 .PHONY: $(PHONY)
scripts/Makefile.clean+0−3
@@ -88,7 +88,4 @@ PHONY += $(subdir-ymn) · 87 unmodified lines
8888 $(subdir-ymn):
8989 $(Q)$(MAKE) $(clean)=$@
9090
91−# Declare the contents of the .PHONY variable as phony. We keep that
92−# information in a variable se we can use it in if_changed and friends.
93−
9491 .PHONY: $(PHONY)
scripts/Makefile.modbuiltin+0−4
@@ -54,8 +54,4 @@ PHONY += $(subdir-ym) · 53 unmodified lines
5454 $(subdir-ym):
5555 $(Q)$(MAKE) $(modbuiltin)=$@
5656
57−
58−# Declare the contents of the .PHONY variable as phony. We keep that
59−# information in a variable se we can use it in if_changed and friends.
60−
6157 .PHONY: $(PHONY)
scripts/Makefile.modinst+0−4
@@ -35,8 +35,4 @@ modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D)) · 34 unmodified lines
3535 $(modules):
3636 $(call cmd,modules_install,$(MODLIB)/$(modinst_dir))
3737
38−
39−# Declare the contents of the .PHONY variable as phony. We keep that
40−# information in a variable so we can use it in if_changed and friends.
41−
4238 .PHONY: $(PHONY)
scripts/Makefile.modpost+0−4
@@ -149,8 +149,4 @@ ifneq ($(cmd_files),) · 148 unmodified lines
149149 include $(cmd_files)
150150 endif
151151
152−
153−# Declare the contents of the .PHONY variable as phony. We keep that
154−# information in a variable se we can use it in if_changed and friends.
155−
156152 .PHONY: $(PHONY)
scripts/Makefile.modsign+0−3
@@ -27,7 +27,4 @@ modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D)) · 26 unmodified lines
2727 $(modules):
2828 $(call cmd,sign_ko,$(MODLIB)/$(modinst_dir))
2929
30−# Declare the contents of the .PHONY variable as phony. We keep that
31−# information in a variable se we can use it in if_changed and friends.
32−
3330 .PHONY: $(PHONY)
scripts/extract-vmlinux+2−0
@@ -57,6 +57,8 @@ try_decompress '\3757zXZ\000' abcde unxz · 56 unmodified lines
5757 try_decompress 'BZh' xy bunzip2
5858 try_decompress '\135\0\0\0' xxx unlzma
5959 try_decompress '\211\114\132' xy 'lzop -d'
60+try_decompress '\002!L\030' xxx 'lz4 -d'
61+try_decompress '(\265/\375' xxx unzstd
6062
6163 # Bail out:
6264 echo "$me: Cannot find vmlinux." >&2
scripts/tags.sh+1−1
@@ -245,7 +245,7 @@ exuberant() · 244 unmodified lines
245245 {
246246 setup_regex exuberant asm c
247247 all_target_sources | xargs $1 -a \
248− -I __initdata,__exitdata,__initconst, \
248+ -I __initdata,__exitdata,__initconst,__ro_after_init \
249249 -I __initdata_memblock \
250250 -I __refdata,__attribute,__maybe_unused,__always_unused \
251251 -I __acquires,__releases,__deprecated \
tools/build/Build.include+3−3
@@ -63,8 +63,8 @@ dep-cmd = $(if $(wildcard $(fixdep)), · 62 unmodified lines
6363 $(fixdep) $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp; \
6464 rm -f $(depfile); \
6565 mv -f $(dot-target).tmp $(dot-target).cmd, \
66− printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
67− printf '\# using basic dep data\n\n' >> $(dot-target).cmd; \
66+ printf '$(pound) cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
67+ printf '$(pound) using basic dep data\n\n' >> $(dot-target).cmd; \
6868 cat $(depfile) >> $(dot-target).cmd; \
6969 printf '\n%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)
7070
@@ -98,4 +98,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXX · 27 unmodified lines
9898 ###
9999 ## HOSTCC C flags
100100
101−host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
101+host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(HOSTCFLAGS) -D"BUILD_STR(s)=\#s" $(HOSTCFLAGS_$(basetarget).o) $(HOSTCFLAGS_$(obj))
tools/build/Makefile+1−1
@@ -43,7 +43,7 @@ $(OUTPUT)fixdep-in.o: FORCE · 42 unmodified lines
4343 $(Q)$(MAKE) $(build)=fixdep
4444
4545 $(OUTPUT)fixdep: $(OUTPUT)fixdep-in.o
46− $(QUIET_LINK)$(HOSTCC) $(LDFLAGS) -o $@ $<
46+ $(QUIET_LINK)$(HOSTCC) $(HOSTLDFLAGS) -o $@ $<
4747
4848 FORCE:
4949
tools/perf/pmu-events/Build+1−1
@@ -1,7 +1,7 @@
11 hostprogs := jevents
22
33 jevents-y += json.o jsmn.o jevents.o
4−CHOSTFLAGS_jevents.o = -I$(srctree)/tools/include
4+HOSTCFLAGS_jevents.o = -I$(srctree)/tools/include
55 pmu-events-y += pmu-events.o
66 JDIR = pmu-events/arch/$(SRCARCH)
77 JSON = $(shell [ -d $(JDIR) ] && \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t