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 31 32 32 ### 33 33 # The targets that may be used. 34 - PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs 34 + PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs 35 35 36 36 BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) 37 37 xmldocs: $(BOOKS) ··· 213 213 dochelp: 214 214 @echo ' Linux kernel internal documentation in different formats:' 215 215 @echo ' htmldocs - HTML' 216 - @echo ' installmandocs - install man pages generated by mandocs' 217 - @echo ' mandocs - man pages' 218 216 @echo ' pdfdocs - PDF' 219 217 @echo ' psdocs - Postscript' 220 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' 221 222 222 223 ### 223 224 # Temporary files left by various tools ··· 235 234 $(C-procfs-example) 236 235 237 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)) 238 241 239 242 # Declare the contents of the .PHONY variable as phony. We keep that 240 243 # information in a variable se we can use it in if_changed and friends.
+75 -8
Documentation/kbuild/makefiles.txt
··· 40 40 --- 6.7 Custom kbuild commands 41 41 --- 6.8 Preprocessing linker scripts 42 42 43 - === 7 Kbuild Variables 44 - === 8 Makefile language 45 - === 9 Credits 46 - === 10 TODO 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 47 53 48 54 === 1 Overview 49 55 ··· 1149 1143 The kbuild infrastructure for *lds file are used in several 1150 1144 architecture-specific files. 1151 1145 1146 + === 7 Kbuild syntax for exported headers 1152 1147 1153 - === 7 Kbuild Variables 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 1154 1209 1155 1210 The top Makefile exports the following variables: 1156 1211 ··· 1273 1206 INSTALL_MOD_STRIP will used as the option(s) to the strip command. 1274 1207 1275 1208 1276 - === 8 Makefile language 1209 + === 9 Makefile language 1277 1210 1278 1211 The kernel Makefiles are designed to be run with GNU Make. The Makefiles 1279 1212 use only the documented features of GNU Make, but they do use many ··· 1292 1225 There are some cases where "=" is appropriate. Usually, though, ":=" 1293 1226 is the right choice. 1294 1227 1295 - === 9 Credits 1228 + === 10 Credits 1296 1229 1297 1230 Original version made by Michael Elizabeth Chastain, <mailto:mec@shout.net> 1298 1231 Updates by Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> 1299 1232 Updates by Sam Ravnborg <sam@ravnborg.org> 1300 1233 Language QA by Jan Engelhardt <jengelh@gmx.de> 1301 1234 1302 - === 10 TODO 1235 + === 11 TODO 1303 1236 1304 1237 - Describe how kbuild supports shipped files with _shipped. 1305 1238 - Generating offset header files.
+8
Documentation/sparse.txt
··· 42 42 vs cpu-endian vs whatever), and there the constant "0" really _is_ 43 43 special. 44 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 + 45 53 Getting sparse 46 54 ~~~~~~~~~~~~~~ 47 55
+6 -2
Makefile
··· 567 567 # disable pointer signed / unsigned warnings in gcc 4.0 568 568 KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) 569 569 570 - # disable invalid "can't wrap" optimzations for signed / pointers 570 + # disable invalid "can't wrap" optimizations for signed / pointers 571 571 KBUILD_CFLAGS += $(call cc-option,-fwrapv) 572 572 573 573 # revert to pre-gcc-4.4 behaviour of .eh_frame ··· 596 596 $(call ld-option, -Wl$(comma)--build-id,)) 597 597 LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) 598 598 LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) 599 + 600 + ifeq ($(CONFIG_STRIP_ASM_SYMS),y) 601 + LDFLAGS_vmlinux += -X 602 + endif 599 603 600 604 # Default kernel image to build when no specific target is given. 601 605 # KBUILD_IMAGE may be overruled on the command line or ··· 1591 1587 FORCE: 1592 1588 1593 1589 # 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. 1590 + # information in a variable so we can use it in if_changed and friends. 1595 1591 .PHONY: $(PHONY)
+8
init/Kconfig
··· 808 808 you wait for kallsyms to be fixed. 809 809 810 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 + 811 819 config HOTPLUG 812 820 bool "Support for hot-pluggable devices" if EMBEDDED 813 821 default y
+2
scripts/Makefile.headersinst
··· 14 14 kbuild-file := $(srctree)/$(obj)/Kbuild 15 15 include $(kbuild-file) 16 16 17 + _dst := $(if $(destination-y),$(destination-y),$(_dst)) 18 + 17 19 include scripts/Kbuild.include 18 20 19 21 install := $(INSTALL_HDR_PATH)/$(_dst)
+1 -1
scripts/gen_initramfs_list.sh
··· 97 97 } 98 98 99 99 list_parse() { 100 - echo "$1 \\" 100 + [ ! -L "$1" ] && echo "$1 \\" || : 101 101 } 102 102 103 103 # for each file print a line in following format
+1 -1
scripts/headerdep.pl
··· 19 19 version => \&version, 20 20 21 21 all => \$opt_all, 22 - I => \@opt_include, 22 + "I=s" => \@opt_include, 23 23 graph => \$opt_graph, 24 24 ); 25 25
+4
scripts/kconfig/kxgettext.c
··· 43 43 ++text; 44 44 goto next; 45 45 } 46 + else if (*text == '\\') { 47 + *bfp++ = '\\'; 48 + len--; 49 + } 46 50 *bfp++ = *text++; 47 51 next: 48 52 --len;
+2 -2
scripts/mod/modpost.c
··· 1913 1913 if (!mod) { 1914 1914 if (is_vmlinux(modname)) 1915 1915 have_vmlinux = 1; 1916 - mod = new_module(NOFAIL(strdup(modname))); 1916 + mod = new_module(modname); 1917 1917 mod->skip = 1; 1918 1918 } 1919 1919 s = sym_add_exported(symname, mod, export_no(export)); ··· 1997 1997 1998 1998 mod = find_module(modname); 1999 1999 if (!mod) { 2000 - mod = new_module(NOFAIL(strdup(modname))); 2000 + mod = new_module(modname); 2001 2001 mod->skip = 1; 2002 2002 } 2003 2003 if (is_vmlinux(modname)) {
+1 -1
scripts/setlocalversion
··· 21 21 22 22 # Is this git on svn? 23 23 if git config --get svn-remote.svn.url >/dev/null; then 24 - printf -- '-svn%s' "`git-svn find-rev $head`" 24 + printf -- '-svn%s' "`git svn find-rev $head`" 25 25 fi 26 26 27 27 # Are there uncommitted changes?