Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
docbook: make cleandocs
kbuild: fix spurious initramfs rebuild
Documentation: explain the difference between __bitwise and __bitwise__
kbuild: make it possible for the linker to discard local symbols from vmlinux
kbuild: remove pointless strdup() on arguments passed to new_module() in modpost
kbuild: fix a few typos in top-level Makefile
kbuild: introduce destination-y for exported headers
kbuild: use git svn instead of git-svn in setlocalversion
kconfig: fix update-po-config to accect backslash in input
kbuild: fix option processing for -I in headerdep

+116 -18
+8 -3
Documentation/DocBook/Makefile
··· 31 32 ### 33 # The targets that may be used. 34 - PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs 35 36 BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) 37 xmldocs: $(BOOKS) ··· 213 dochelp: 214 @echo ' Linux kernel internal documentation in different formats:' 215 @echo ' htmldocs - HTML' 216 - @echo ' installmandocs - install man pages generated by mandocs' 217 - @echo ' mandocs - man pages' 218 @echo ' pdfdocs - PDF' 219 @echo ' psdocs - Postscript' 220 @echo ' xmldocs - XML DocBook' 221 222 ### 223 # Temporary files left by various tools ··· 235 $(C-procfs-example) 236 237 clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man 238 239 # Declare the contents of the .PHONY variable as phony. We keep that 240 # information in a variable se we can use it in if_changed and friends.
··· 31 32 ### 33 # The targets that may be used. 34 + PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs 35 36 BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) 37 xmldocs: $(BOOKS) ··· 213 dochelp: 214 @echo ' Linux kernel internal documentation in different formats:' 215 @echo ' htmldocs - HTML' 216 @echo ' pdfdocs - PDF' 217 @echo ' psdocs - Postscript' 218 @echo ' xmldocs - XML DocBook' 219 + @echo ' mandocs - man pages' 220 + @echo ' installmandocs - install man pages generated by mandocs' 221 + @echo ' cleandocs - clean all generated DocBook files' 222 223 ### 224 # Temporary files left by various tools ··· 234 $(C-procfs-example) 235 236 clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man 237 + 238 + cleandocs: 239 + $(Q)rm -f $(call objectify, $(clean-files)) 240 + $(Q)rm -rf $(call objectify, $(clean-dirs)) 241 242 # Declare the contents of the .PHONY variable as phony. We keep that 243 # information in a variable se we can use it in if_changed and friends.
+75 -8
Documentation/kbuild/makefiles.txt
··· 40 --- 6.7 Custom kbuild commands 41 --- 6.8 Preprocessing linker scripts 42 43 - === 7 Kbuild Variables 44 - === 8 Makefile language 45 - === 9 Credits 46 - === 10 TODO 47 48 === 1 Overview 49 ··· 1149 The kbuild infrastructure for *lds file are used in several 1150 architecture-specific files. 1151 1152 1153 - === 7 Kbuild Variables 1154 1155 The top Makefile exports the following variables: 1156 ··· 1273 INSTALL_MOD_STRIP will used as the option(s) to the strip command. 1274 1275 1276 - === 8 Makefile language 1277 1278 The kernel Makefiles are designed to be run with GNU Make. The Makefiles 1279 use only the documented features of GNU Make, but they do use many ··· 1292 There are some cases where "=" is appropriate. Usually, though, ":=" 1293 is the right choice. 1294 1295 - === 9 Credits 1296 1297 Original version made by Michael Elizabeth Chastain, <mailto:mec@shout.net> 1298 Updates by Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> 1299 Updates by Sam Ravnborg <sam@ravnborg.org> 1300 Language QA by Jan Engelhardt <jengelh@gmx.de> 1301 1302 - === 10 TODO 1303 1304 - Describe how kbuild supports shipped files with _shipped. 1305 - Generating offset header files.
··· 40 --- 6.7 Custom kbuild commands 41 --- 6.8 Preprocessing linker scripts 42 43 + === 7 Kbuild syntax for exported headers 44 + --- 7.1 header-y 45 + --- 7.2 objhdr-y 46 + --- 7.3 destination-y 47 + --- 7.4 unifdef-y (deprecated) 48 + 49 + === 8 Kbuild Variables 50 + === 9 Makefile language 51 + === 10 Credits 52 + === 11 TODO 53 54 === 1 Overview 55 ··· 1143 The kbuild infrastructure for *lds file are used in several 1144 architecture-specific files. 1145 1146 + === 7 Kbuild syntax for exported headers 1147 1148 + The kernel include a set of headers that is exported to userspace. 1149 + Many headers can be exported as-is but other headers requires a 1150 + minimal pre-processing before they are ready for user-space. 1151 + The pre-processing does: 1152 + - drop kernel specific annotations 1153 + - drop include of compiler.h 1154 + - drop all sections that is kernel internat (guarded by ifdef __KERNEL__) 1155 + 1156 + Each relevant directory contain a file name "Kbuild" which specify the 1157 + headers to be exported. 1158 + See subsequent chapter for the syntax of the Kbuild file. 1159 + 1160 + --- 7.1 header-y 1161 + 1162 + header-y specify header files to be exported. 1163 + 1164 + Example: 1165 + #include/linux/Kbuild 1166 + header-y += usb/ 1167 + header-y += aio_abi.h 1168 + 1169 + The convention is to list one file per line and 1170 + preferably in alphabetic order. 1171 + 1172 + header-y also specify which subdirectories to visit. 1173 + A subdirectory is identified by a trailing '/' which 1174 + can be seen in the example above for the usb subdirectory. 1175 + 1176 + Subdirectories are visited before their parent directories. 1177 + 1178 + --- 7.2 objhdr-y 1179 + 1180 + objhdr-y specifies generated files to be exported. 1181 + Generated files are special as they need to be looked 1182 + up in another directory when doing 'make O=...' builds. 1183 + 1184 + Example: 1185 + #include/linux/Kbuild 1186 + objhdr-y += version.h 1187 + 1188 + --- 7.3 destination-y 1189 + 1190 + When an architecture have a set of exported headers that needs to be 1191 + exported to a different directory destination-y is used. 1192 + destination-y specify the destination directory for all exported 1193 + headers in the file where it is present. 1194 + 1195 + Example: 1196 + #arch/xtensa/platforms/s6105/include/platform/Kbuild 1197 + destination-y := include/linux 1198 + 1199 + In the example above all exported headers in the Kbuild file 1200 + will be located in the directory "include/linux" when exported. 1201 + 1202 + 1203 + --- 7.4 unifdef-y (deprecated) 1204 + 1205 + unifdef-y is deprecated. A direct replacement is header-y. 1206 + 1207 + 1208 + === 8 Kbuild Variables 1209 1210 The top Makefile exports the following variables: 1211 ··· 1206 INSTALL_MOD_STRIP will used as the option(s) to the strip command. 1207 1208 1209 + === 9 Makefile language 1210 1211 The kernel Makefiles are designed to be run with GNU Make. The Makefiles 1212 use only the documented features of GNU Make, but they do use many ··· 1225 There are some cases where "=" is appropriate. Usually, though, ":=" 1226 is the right choice. 1227 1228 + === 10 Credits 1229 1230 Original version made by Michael Elizabeth Chastain, <mailto:mec@shout.net> 1231 Updates by Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> 1232 Updates by Sam Ravnborg <sam@ravnborg.org> 1233 Language QA by Jan Engelhardt <jengelh@gmx.de> 1234 1235 + === 11 TODO 1236 1237 - Describe how kbuild supports shipped files with _shipped. 1238 - Generating offset header files.
+8
Documentation/sparse.txt
··· 42 vs cpu-endian vs whatever), and there the constant "0" really _is_ 43 special. 44 45 Getting sparse 46 ~~~~~~~~~~~~~~ 47
··· 42 vs cpu-endian vs whatever), and there the constant "0" really _is_ 43 special. 44 45 + __bitwise__ - to be used for relatively compact stuff (gfp_t, etc.) that 46 + is mostly warning-free and is supposed to stay that way. Warnings will 47 + be generated without __CHECK_ENDIAN__. 48 + 49 + __bitwise - noisy stuff; in particular, __le*/__be* are that. We really 50 + don't want to drown in noise unless we'd explicitly asked for it. 51 + 52 + 53 Getting sparse 54 ~~~~~~~~~~~~~~ 55
+6 -2
Makefile
··· 567 # disable pointer signed / unsigned warnings in gcc 4.0 568 KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) 569 570 - # disable invalid "can't wrap" optimzations for signed / pointers 571 KBUILD_CFLAGS += $(call cc-option,-fwrapv) 572 573 # revert to pre-gcc-4.4 behaviour of .eh_frame ··· 596 $(call ld-option, -Wl$(comma)--build-id,)) 597 LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) 598 LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) 599 600 # Default kernel image to build when no specific target is given. 601 # KBUILD_IMAGE may be overruled on the command line or ··· 1591 FORCE: 1592 1593 # Declare the contents of the .PHONY variable as phony. We keep that 1594 - # information in a variable se we can use it in if_changed and friends. 1595 .PHONY: $(PHONY)
··· 567 # disable pointer signed / unsigned warnings in gcc 4.0 568 KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) 569 570 + # disable invalid "can't wrap" optimizations for signed / pointers 571 KBUILD_CFLAGS += $(call cc-option,-fwrapv) 572 573 # revert to pre-gcc-4.4 behaviour of .eh_frame ··· 596 $(call ld-option, -Wl$(comma)--build-id,)) 597 LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) 598 LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) 599 + 600 + ifeq ($(CONFIG_STRIP_ASM_SYMS),y) 601 + LDFLAGS_vmlinux += -X 602 + endif 603 604 # Default kernel image to build when no specific target is given. 605 # KBUILD_IMAGE may be overruled on the command line or ··· 1587 FORCE: 1588 1589 # Declare the contents of the .PHONY variable as phony. We keep that 1590 + # information in a variable so we can use it in if_changed and friends. 1591 .PHONY: $(PHONY)
+8
init/Kconfig
··· 808 you wait for kallsyms to be fixed. 809 810 811 config HOTPLUG 812 bool "Support for hot-pluggable devices" if EMBEDDED 813 default y
··· 808 you wait for kallsyms to be fixed. 809 810 811 + config STRIP_ASM_SYMS 812 + bool "Strip assembler-generated symbols during link" 813 + default n 814 + help 815 + Strip internal assembler-generated symbols during a link (symbols 816 + that look like '.Lxxx') so they don't pollute the output of 817 + get_wchan() and suchlike. 818 + 819 config HOTPLUG 820 bool "Support for hot-pluggable devices" if EMBEDDED 821 default y
+2
scripts/Makefile.headersinst
··· 14 kbuild-file := $(srctree)/$(obj)/Kbuild 15 include $(kbuild-file) 16 17 include scripts/Kbuild.include 18 19 install := $(INSTALL_HDR_PATH)/$(_dst)
··· 14 kbuild-file := $(srctree)/$(obj)/Kbuild 15 include $(kbuild-file) 16 17 + _dst := $(if $(destination-y),$(destination-y),$(_dst)) 18 + 19 include scripts/Kbuild.include 20 21 install := $(INSTALL_HDR_PATH)/$(_dst)
+1 -1
scripts/gen_initramfs_list.sh
··· 97 } 98 99 list_parse() { 100 - echo "$1 \\" 101 } 102 103 # for each file print a line in following format
··· 97 } 98 99 list_parse() { 100 + [ ! -L "$1" ] && echo "$1 \\" || : 101 } 102 103 # for each file print a line in following format
+1 -1
scripts/headerdep.pl
··· 19 version => \&version, 20 21 all => \$opt_all, 22 - I => \@opt_include, 23 graph => \$opt_graph, 24 ); 25
··· 19 version => \&version, 20 21 all => \$opt_all, 22 + "I=s" => \@opt_include, 23 graph => \$opt_graph, 24 ); 25
+4
scripts/kconfig/kxgettext.c
··· 43 ++text; 44 goto next; 45 } 46 *bfp++ = *text++; 47 next: 48 --len;
··· 43 ++text; 44 goto next; 45 } 46 + else if (*text == '\\') { 47 + *bfp++ = '\\'; 48 + len--; 49 + } 50 *bfp++ = *text++; 51 next: 52 --len;
+2 -2
scripts/mod/modpost.c
··· 1913 if (!mod) { 1914 if (is_vmlinux(modname)) 1915 have_vmlinux = 1; 1916 - mod = new_module(NOFAIL(strdup(modname))); 1917 mod->skip = 1; 1918 } 1919 s = sym_add_exported(symname, mod, export_no(export)); ··· 1997 1998 mod = find_module(modname); 1999 if (!mod) { 2000 - mod = new_module(NOFAIL(strdup(modname))); 2001 mod->skip = 1; 2002 } 2003 if (is_vmlinux(modname)) {
··· 1913 if (!mod) { 1914 if (is_vmlinux(modname)) 1915 have_vmlinux = 1; 1916 + mod = new_module(modname); 1917 mod->skip = 1; 1918 } 1919 s = sym_add_exported(symname, mod, export_no(export)); ··· 1997 1998 mod = find_module(modname); 1999 if (!mod) { 2000 + mod = new_module(modname); 2001 mod->skip = 1; 2002 } 2003 if (is_vmlinux(modname)) {
+1 -1
scripts/setlocalversion
··· 21 22 # Is this git on svn? 23 if git config --get svn-remote.svn.url >/dev/null; then 24 - printf -- '-svn%s' "`git-svn find-rev $head`" 25 fi 26 27 # Are there uncommitted changes?
··· 21 22 # Is this git on svn? 23 if git config --get svn-remote.svn.url >/dev/null; then 24 + printf -- '-svn%s' "`git svn find-rev $head`" 25 fi 26 27 # Are there uncommitted changes?