diff options
-rw-r--r-- | Documentation/DocBook/Makefile | 11 | ||||
-rw-r--r-- | Documentation/kbuild/makefiles.txt | 83 | ||||
-rw-r--r-- | Documentation/sparse.txt | 8 | ||||
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | init/Kconfig | 8 | ||||
-rw-r--r-- | scripts/Makefile.headersinst | 2 | ||||
-rw-r--r-- | scripts/gen_initramfs_list.sh | 2 | ||||
-rwxr-xr-x | scripts/headerdep.pl | 2 | ||||
-rw-r--r-- | scripts/kconfig/kxgettext.c | 4 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 4 | ||||
-rwxr-xr-x | scripts/setlocalversion | 2 |
11 files changed, 116 insertions, 18 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index a3a83d38f96f..8918a32c6b3a 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -31,7 +31,7 @@ PS_METHOD = $(prefer-db2x) | |||
31 | 31 | ||
32 | ### | 32 | ### |
33 | # The targets that may be used. | 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 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) | 36 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) |
37 | xmldocs: $(BOOKS) | 37 | xmldocs: $(BOOKS) |
@@ -213,11 +213,12 @@ silent_gen_xml = : | |||
213 | dochelp: | 213 | dochelp: |
214 | @echo ' Linux kernel internal documentation in different formats:' | 214 | @echo ' Linux kernel internal documentation in different formats:' |
215 | @echo ' htmldocs - HTML' | 215 | @echo ' htmldocs - HTML' |
216 | @echo ' installmandocs - install man pages generated by mandocs' | ||
217 | @echo ' mandocs - man pages' | ||
218 | @echo ' pdfdocs - PDF' | 216 | @echo ' pdfdocs - PDF' |
219 | @echo ' psdocs - Postscript' | 217 | @echo ' psdocs - Postscript' |
220 | @echo ' xmldocs - XML DocBook' | 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 | # Temporary files left by various tools | 224 | # Temporary files left by various tools |
@@ -235,6 +236,10 @@ clean-files := $(DOCBOOKS) \ | |||
235 | 236 | ||
236 | clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man | 237 | clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man |
237 | 238 | ||
239 | cleandocs: | ||
240 | $(Q)rm -f $(call objectify, $(clean-files)) | ||
241 | $(Q)rm -rf $(call objectify, $(clean-dirs)) | ||
242 | |||
238 | # Declare the contents of the .PHONY variable as phony. We keep that | 243 | # Declare the contents of the .PHONY variable as phony. We keep that |
239 | # information in a variable se we can use it in if_changed and friends. | 244 | # information in a variable se we can use it in if_changed and friends. |
240 | 245 | ||
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 51104f9194a5..d4b05672f9f7 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -40,10 +40,16 @@ This document describes the Linux kernel Makefiles. | |||
40 | --- 6.7 Custom kbuild commands | 40 | --- 6.7 Custom kbuild commands |
41 | --- 6.8 Preprocessing linker scripts | 41 | --- 6.8 Preprocessing linker scripts |
42 | 42 | ||
43 | === 7 Kbuild Variables | 43 | === 7 Kbuild syntax for exported headers |
44 | === 8 Makefile language | 44 | --- 7.1 header-y |
45 | === 9 Credits | 45 | --- 7.2 objhdr-y |
46 | === 10 TODO | 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 | === 1 Overview | 54 | === 1 Overview |
49 | 55 | ||
@@ -1143,8 +1149,69 @@ When kbuild executes, the following steps are followed (roughly): | |||
1143 | The kbuild infrastructure for *lds file are used in several | 1149 | The kbuild infrastructure for *lds file are used in several |
1144 | architecture-specific files. | 1150 | architecture-specific files. |
1145 | 1151 | ||
1152 | === 7 Kbuild syntax for exported headers | ||
1153 | |||
1154 | The kernel include a set of headers that is exported to userspace. | ||
1155 | Many headers can be exported as-is but other headers requires a | ||
1156 | minimal pre-processing before they are ready for user-space. | ||
1157 | The pre-processing does: | ||
1158 | - drop kernel specific annotations | ||
1159 | - drop include of compiler.h | ||
1160 | - drop all sections that is kernel internat (guarded by ifdef __KERNEL__) | ||
1161 | |||
1162 | Each relevant directory contain a file name "Kbuild" which specify the | ||
1163 | headers to be exported. | ||
1164 | See subsequent chapter for the syntax of the Kbuild file. | ||
1165 | |||
1166 | --- 7.1 header-y | ||
1167 | |||
1168 | header-y specify header files to be exported. | ||
1169 | |||
1170 | Example: | ||
1171 | #include/linux/Kbuild | ||
1172 | header-y += usb/ | ||
1173 | header-y += aio_abi.h | ||
1174 | |||
1175 | The convention is to list one file per line and | ||
1176 | preferably in alphabetic order. | ||
1177 | |||
1178 | header-y also specify which subdirectories to visit. | ||
1179 | A subdirectory is identified by a trailing '/' which | ||
1180 | can be seen in the example above for the usb subdirectory. | ||
1181 | |||
1182 | Subdirectories are visited before their parent directories. | ||
1183 | |||
1184 | --- 7.2 objhdr-y | ||
1185 | |||
1186 | objhdr-y specifies generated files to be exported. | ||
1187 | Generated files are special as they need to be looked | ||
1188 | up in another directory when doing 'make O=...' builds. | ||
1189 | |||
1190 | Example: | ||
1191 | #include/linux/Kbuild | ||
1192 | objhdr-y += version.h | ||
1193 | |||
1194 | --- 7.3 destination-y | ||
1195 | |||
1196 | When an architecture have a set of exported headers that needs to be | ||
1197 | exported to a different directory destination-y is used. | ||
1198 | destination-y specify the destination directory for all exported | ||
1199 | headers in the file where it is present. | ||
1200 | |||
1201 | Example: | ||
1202 | #arch/xtensa/platforms/s6105/include/platform/Kbuild | ||
1203 | destination-y := include/linux | ||
1204 | |||
1205 | In the example above all exported headers in the Kbuild file | ||
1206 | will be located in the directory "include/linux" when exported. | ||
1207 | |||
1208 | |||
1209 | --- 7.4 unifdef-y (deprecated) | ||
1210 | |||
1211 | unifdef-y is deprecated. A direct replacement is header-y. | ||
1212 | |||
1146 | 1213 | ||
1147 | === 7 Kbuild Variables | 1214 | === 8 Kbuild Variables |
1148 | 1215 | ||
1149 | The top Makefile exports the following variables: | 1216 | The top Makefile exports the following variables: |
1150 | 1217 | ||
@@ -1206,7 +1273,7 @@ The top Makefile exports the following variables: | |||
1206 | INSTALL_MOD_STRIP will used as the option(s) to the strip command. | 1273 | INSTALL_MOD_STRIP will used as the option(s) to the strip command. |
1207 | 1274 | ||
1208 | 1275 | ||
1209 | === 8 Makefile language | 1276 | === 9 Makefile language |
1210 | 1277 | ||
1211 | The kernel Makefiles are designed to be run with GNU Make. The Makefiles | 1278 | 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 | 1279 | use only the documented features of GNU Make, but they do use many |
@@ -1225,14 +1292,14 @@ time the left-hand side is used. | |||
1225 | There are some cases where "=" is appropriate. Usually, though, ":=" | 1292 | There are some cases where "=" is appropriate. Usually, though, ":=" |
1226 | is the right choice. | 1293 | is the right choice. |
1227 | 1294 | ||
1228 | === 9 Credits | 1295 | === 10 Credits |
1229 | 1296 | ||
1230 | Original version made by Michael Elizabeth Chastain, <mailto:mec@shout.net> | 1297 | Original version made by Michael Elizabeth Chastain, <mailto:mec@shout.net> |
1231 | Updates by Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 1298 | Updates by Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> |
1232 | Updates by Sam Ravnborg <sam@ravnborg.org> | 1299 | Updates by Sam Ravnborg <sam@ravnborg.org> |
1233 | Language QA by Jan Engelhardt <jengelh@gmx.de> | 1300 | Language QA by Jan Engelhardt <jengelh@gmx.de> |
1234 | 1301 | ||
1235 | === 10 TODO | 1302 | === 11 TODO |
1236 | 1303 | ||
1237 | - Describe how kbuild supports shipped files with _shipped. | 1304 | - Describe how kbuild supports shipped files with _shipped. |
1238 | - Generating offset header files. | 1305 | - Generating offset header files. |
diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt index 42f43fa59f24..34c76a55bc04 100644 --- a/Documentation/sparse.txt +++ b/Documentation/sparse.txt | |||
@@ -42,6 +42,14 @@ sure that bitwise types don't get mixed up (little-endian vs big-endian | |||
42 | vs cpu-endian vs whatever), and there the constant "0" really _is_ | 42 | vs cpu-endian vs whatever), and there the constant "0" really _is_ |
43 | special. | 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 | Getting sparse | 53 | Getting sparse |
46 | ~~~~~~~~~~~~~~ | 54 | ~~~~~~~~~~~~~~ |
47 | 55 | ||
@@ -567,7 +567,7 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) | |||
567 | # disable pointer signed / unsigned warnings in gcc 4.0 | 567 | # disable pointer signed / unsigned warnings in gcc 4.0 |
568 | KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) | 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 | KBUILD_CFLAGS += $(call cc-option,-fwrapv) | 571 | KBUILD_CFLAGS += $(call cc-option,-fwrapv) |
572 | 572 | ||
573 | # revert to pre-gcc-4.4 behaviour of .eh_frame | 573 | # revert to pre-gcc-4.4 behaviour of .eh_frame |
@@ -597,6 +597,10 @@ LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ | |||
597 | LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) | 597 | LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) |
598 | LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) | 598 | LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) |
599 | 599 | ||
600 | ifeq ($(CONFIG_STRIP_ASM_SYMS),y) | ||
601 | LDFLAGS_vmlinux += -X | ||
602 | endif | ||
603 | |||
600 | # Default kernel image to build when no specific target is given. | 604 | # Default kernel image to build when no specific target is given. |
601 | # KBUILD_IMAGE may be overruled on the command line or | 605 | # KBUILD_IMAGE may be overruled on the command line or |
602 | # set in the environment | 606 | # set in the environment |
@@ -1587,5 +1591,5 @@ PHONY += FORCE | |||
1587 | FORCE: | 1591 | FORCE: |
1588 | 1592 | ||
1589 | # Declare the contents of the .PHONY variable as phony. We keep that | 1593 | # Declare the contents of the .PHONY variable as phony. We keep that |
1590 | # information in a variable se we can use it in if_changed and friends. | 1594 | # information in a variable so we can use it in if_changed and friends. |
1591 | .PHONY: $(PHONY) | 1595 | .PHONY: $(PHONY) |
diff --git a/init/Kconfig b/init/Kconfig index f2f9b5362b48..7be4d3836745 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -808,6 +808,14 @@ config KALLSYMS_EXTRA_PASS | |||
808 | you wait for kallsyms to be fixed. | 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 | config HOTPLUG | 819 | config HOTPLUG |
812 | bool "Support for hot-pluggable devices" if EMBEDDED | 820 | bool "Support for hot-pluggable devices" if EMBEDDED |
813 | default y | 821 | default y |
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 612dc13ddd85..095cfc8b9dbf 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst | |||
@@ -14,6 +14,8 @@ _dst := $(if $(dst),$(dst),$(obj)) | |||
14 | kbuild-file := $(srctree)/$(obj)/Kbuild | 14 | kbuild-file := $(srctree)/$(obj)/Kbuild |
15 | include $(kbuild-file) | 15 | include $(kbuild-file) |
16 | 16 | ||
17 | _dst := $(if $(destination-y),$(destination-y),$(_dst)) | ||
18 | |||
17 | include scripts/Kbuild.include | 19 | include scripts/Kbuild.include |
18 | 20 | ||
19 | install := $(INSTALL_HDR_PATH)/$(_dst) | 21 | install := $(INSTALL_HDR_PATH)/$(_dst) |
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh index 3eea8f15131b..76af5f9623e3 100644 --- a/scripts/gen_initramfs_list.sh +++ b/scripts/gen_initramfs_list.sh | |||
@@ -97,7 +97,7 @@ print_mtime() { | |||
97 | } | 97 | } |
98 | 98 | ||
99 | list_parse() { | 99 | list_parse() { |
100 | echo "$1 \\" | 100 | [ ! -L "$1" ] && echo "$1 \\" || : |
101 | } | 101 | } |
102 | 102 | ||
103 | # for each file print a line in following format | 103 | # for each file print a line in following format |
diff --git a/scripts/headerdep.pl b/scripts/headerdep.pl index 97399da89ef2..b7f6c560e24d 100755 --- a/scripts/headerdep.pl +++ b/scripts/headerdep.pl | |||
@@ -19,7 +19,7 @@ my $opt_graph; | |||
19 | version => \&version, | 19 | version => \&version, |
20 | 20 | ||
21 | all => \$opt_all, | 21 | all => \$opt_all, |
22 | I => \@opt_include, | 22 | "I=s" => \@opt_include, |
23 | graph => \$opt_graph, | 23 | graph => \$opt_graph, |
24 | ); | 24 | ); |
25 | 25 | ||
diff --git a/scripts/kconfig/kxgettext.c b/scripts/kconfig/kxgettext.c index 6eb72a7f2562..8d9ce22b0fc5 100644 --- a/scripts/kconfig/kxgettext.c +++ b/scripts/kconfig/kxgettext.c | |||
@@ -43,6 +43,10 @@ static char *escape(const char* text, char *bf, int len) | |||
43 | ++text; | 43 | ++text; |
44 | goto next; | 44 | goto next; |
45 | } | 45 | } |
46 | else if (*text == '\\') { | ||
47 | *bfp++ = '\\'; | ||
48 | len--; | ||
49 | } | ||
46 | *bfp++ = *text++; | 50 | *bfp++ = *text++; |
47 | next: | 51 | next: |
48 | --len; | 52 | --len; |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 8cc70612984c..df6e6286a065 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1913,7 +1913,7 @@ static void read_dump(const char *fname, unsigned int kernel) | |||
1913 | if (!mod) { | 1913 | if (!mod) { |
1914 | if (is_vmlinux(modname)) | 1914 | if (is_vmlinux(modname)) |
1915 | have_vmlinux = 1; | 1915 | have_vmlinux = 1; |
1916 | mod = new_module(NOFAIL(strdup(modname))); | 1916 | mod = new_module(modname); |
1917 | mod->skip = 1; | 1917 | mod->skip = 1; |
1918 | } | 1918 | } |
1919 | s = sym_add_exported(symname, mod, export_no(export)); | 1919 | s = sym_add_exported(symname, mod, export_no(export)); |
@@ -1997,7 +1997,7 @@ static void read_markers(const char *fname) | |||
1997 | 1997 | ||
1998 | mod = find_module(modname); | 1998 | mod = find_module(modname); |
1999 | if (!mod) { | 1999 | if (!mod) { |
2000 | mod = new_module(NOFAIL(strdup(modname))); | 2000 | mod = new_module(modname); |
2001 | mod->skip = 1; | 2001 | mod->skip = 1; |
2002 | } | 2002 | } |
2003 | if (is_vmlinux(modname)) { | 2003 | if (is_vmlinux(modname)) { |
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index f1c4b35bc324..47e75b69a2e9 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion | |||
@@ -21,7 +21,7 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then | |||
21 | 21 | ||
22 | # Is this git on svn? | 22 | # Is this git on svn? |
23 | if git config --get svn-remote.svn.url >/dev/null; then | 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 | fi | 25 | fi |
26 | 26 | ||
27 | # Are there uncommitted changes? | 27 | # Are there uncommitted changes? |