diff options
author | Steve French <sfrench@us.ibm.com> | 2008-04-25 16:20:10 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-04-25 16:20:10 -0400 |
commit | 404e86e1550cc2c84bb57a372af784585c732f9a (patch) | |
tree | c0e8e2d61c1b1c79705c0dc9f0f16e35267286e4 /scripts | |
parent | 0206e61b467fde4d7b50f1a64355182a4fd9576b (diff) | |
parent | b9fa38f75ea7e1f64bc29653ca9758303ce698e4 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.build | 6 | ||||
-rw-r--r-- | scripts/Makefile.clean | 2 | ||||
-rw-r--r-- | scripts/Makefile.host | 12 | ||||
-rw-r--r-- | scripts/Makefile.modpost | 8 | ||||
-rwxr-xr-x | scripts/checkpatch.pl | 7 | ||||
-rw-r--r-- | scripts/kconfig/Makefile | 4 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 27 |
7 files changed, 53 insertions, 13 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 67fb4530a6ff..277cfe0b7100 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -27,12 +27,12 @@ ccflags-y := | |||
27 | cppflags-y := | 27 | cppflags-y := |
28 | ldflags-y := | 28 | ldflags-y := |
29 | 29 | ||
30 | # Read .config if it exist, otherwise ignore | 30 | # Read auto.conf if it exists, otherwise ignore |
31 | -include include/config/auto.conf | 31 | -include include/config/auto.conf |
32 | 32 | ||
33 | include scripts/Kbuild.include | 33 | include scripts/Kbuild.include |
34 | 34 | ||
35 | # For backward compatibility check that these variables does not change | 35 | # For backward compatibility check that these variables do not change |
36 | save-cflags := $(CFLAGS) | 36 | save-cflags := $(CFLAGS) |
37 | 37 | ||
38 | # The filename Kbuild has precedence over Makefile | 38 | # The filename Kbuild has precedence over Makefile |
@@ -55,7 +55,7 @@ hostprogs-y += $(host-progs) | |||
55 | endif | 55 | endif |
56 | endif | 56 | endif |
57 | 57 | ||
58 | # Do not include host rules unles needed | 58 | # Do not include host rules unless needed |
59 | ifneq ($(hostprogs-y)$(hostprogs-m),) | 59 | ifneq ($(hostprogs-y)$(hostprogs-m),) |
60 | include scripts/Makefile.host | 60 | include scripts/Makefile.host |
61 | endif | 61 | endif |
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 2c647107c9cc..6f89fbb56256 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean | |||
@@ -37,7 +37,7 @@ subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-)) | |||
37 | 37 | ||
38 | subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn)) | 38 | subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn)) |
39 | 39 | ||
40 | # build a list of files to remove, usually releative to the current | 40 | # build a list of files to remove, usually relative to the current |
41 | # directory | 41 | # directory |
42 | 42 | ||
43 | __clean-files := $(extra-y) $(always) \ | 43 | __clean-files := $(extra-y) $(always) \ |
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 6943a7a5bb98..1ac414fd5030 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host | |||
@@ -3,9 +3,9 @@ | |||
3 | # Binaries are used during the compilation of the kernel, for example | 3 | # Binaries are used during the compilation of the kernel, for example |
4 | # to preprocess a data file. | 4 | # to preprocess a data file. |
5 | # | 5 | # |
6 | # Both C and C++ is supported, but preferred language is C for such utilities. | 6 | # Both C and C++ are supported, but preferred language is C for such utilities. |
7 | # | 7 | # |
8 | # Samle syntax (see Documentation/kbuild/makefile.txt for reference) | 8 | # Sample syntax (see Documentation/kbuild/makefiles.txt for reference) |
9 | # hostprogs-y := bin2hex | 9 | # hostprogs-y := bin2hex |
10 | # Will compile bin2hex.c and create an executable named bin2hex | 10 | # Will compile bin2hex.c and create an executable named bin2hex |
11 | # | 11 | # |
@@ -23,10 +23,10 @@ | |||
23 | # hostprogs-y := conf | 23 | # hostprogs-y := conf |
24 | # conf-objs := conf.o libkconfig.so | 24 | # conf-objs := conf.o libkconfig.so |
25 | # libkconfig-objs := expr.o type.o | 25 | # libkconfig-objs := expr.o type.o |
26 | # Will create a shared library named libkconfig.so that consist of | 26 | # Will create a shared library named libkconfig.so that consists of |
27 | # expr.o and type.o (they are both compiled as C code and the object file | 27 | # expr.o and type.o (they are both compiled as C code and the object files |
28 | # are made as position independent code). | 28 | # are made as position independent code). |
29 | # conf.c is compiled as a c program, and conf.o is linked together with | 29 | # conf.c is compiled as a C program, and conf.o is linked together with |
30 | # libkconfig.so as the executable conf. | 30 | # libkconfig.so as the executable conf. |
31 | # Note: Shared libraries consisting of C++ files are not supported | 31 | # Note: Shared libraries consisting of C++ files are not supported |
32 | 32 | ||
@@ -61,7 +61,7 @@ host-cobjs := $(filter-out %.so,$(host-cobjs)) | |||
61 | host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs)))) | 61 | host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs)))) |
62 | 62 | ||
63 | # output directory for programs/.o files | 63 | # output directory for programs/.o files |
64 | # hostprogs-y := tools/build may have been specified. Retreive directory | 64 | # hostprogs-y := tools/build may have been specified. Retrieve directory |
65 | host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) | 65 | host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) |
66 | # directory of .o files from prog-objs notation | 66 | # directory of .o files from prog-objs notation |
67 | host-objdirs += $(foreach f,$(host-cmulti), \ | 67 | host-objdirs += $(foreach f,$(host-cmulti), \ |
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 2d20640854b7..24b3c8fe6bca 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
@@ -42,6 +42,13 @@ _modpost: __modpost | |||
42 | 42 | ||
43 | include include/config/auto.conf | 43 | include include/config/auto.conf |
44 | include scripts/Kbuild.include | 44 | include scripts/Kbuild.include |
45 | |||
46 | ifneq ($(KBUILD_EXTMOD),) | ||
47 | # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS | ||
48 | include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ | ||
49 | $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) | ||
50 | endif | ||
51 | |||
45 | include scripts/Makefile.lib | 52 | include scripts/Makefile.lib |
46 | 53 | ||
47 | kernelsymfile := $(objtree)/Module.symvers | 54 | kernelsymfile := $(objtree)/Module.symvers |
@@ -69,6 +76,7 @@ modpost = scripts/mod/modpost \ | |||
69 | $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \ | 76 | $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \ |
70 | $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ | 77 | $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ |
71 | $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ | 78 | $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ |
79 | $(if $(iKBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(EXTRA_SYMBOLS))) \ | ||
72 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ | 80 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ |
73 | $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ | 81 | $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ |
74 | $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \ | 82 | $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \ |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 58a94947d655..64ec4b8a51b5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1889,6 +1889,13 @@ sub process { | |||
1889 | WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev); | 1889 | WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev); |
1890 | } | 1890 | } |
1891 | } | 1891 | } |
1892 | # check for needless usb_free_urb() checks | ||
1893 | if ($prevline =~ /\bif\s*\(([^\)]*)\)/) { | ||
1894 | my $expr = $1; | ||
1895 | if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) { | ||
1896 | WARN("usb_free_urb(NULL) is safe this check is probabally not required\n" . $hereprev); | ||
1897 | } | ||
1898 | } | ||
1892 | 1899 | ||
1893 | # warn about #ifdefs in C files | 1900 | # warn about #ifdefs in C files |
1894 | # if ($line =~ /^.#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { | 1901 | # if ($line =~ /^.#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { |
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 32e8c5a227c3..fa1a7d565903 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -36,10 +36,10 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h | |||
36 | --output $(obj)/config.pot | 36 | --output $(obj)/config.pot |
37 | $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot | 37 | $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot |
38 | $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch | 38 | $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch |
39 | $(Q)(for i in `ls arch/`; \ | 39 | $(Q)(for i in `ls arch/*/Kconfig`; \ |
40 | do \ | 40 | do \ |
41 | echo " GEN $$i"; \ | 41 | echo " GEN $$i"; \ |
42 | $(obj)/kxgettext arch/$$i/Kconfig \ | 42 | $(obj)/kxgettext $$i \ |
43 | >> $(obj)/config.pot; \ | 43 | >> $(obj)/config.pot; \ |
44 | done ) | 44 | done ) |
45 | $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ | 45 | $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 110cf243fa4e..f8b42ab0724b 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1552,6 +1552,10 @@ static void read_symbols(char *modname) | |||
1552 | } | 1552 | } |
1553 | 1553 | ||
1554 | license = get_modinfo(info.modinfo, info.modinfo_len, "license"); | 1554 | license = get_modinfo(info.modinfo, info.modinfo_len, "license"); |
1555 | if (!license && !is_vmlinux(modname)) | ||
1556 | fatal("modpost: missing MODULE_LICENSE() in %s\n" | ||
1557 | "see include/linux/module.h for " | ||
1558 | "more information\n", modname); | ||
1555 | while (license) { | 1559 | while (license) { |
1556 | if (license_is_gpl_compatible(license)) | 1560 | if (license_is_gpl_compatible(license)) |
1557 | mod->gpl_compatible = 1; | 1561 | mod->gpl_compatible = 1; |
@@ -2015,6 +2019,11 @@ static void write_markers(const char *fname) | |||
2015 | write_if_changed(&buf, fname); | 2019 | write_if_changed(&buf, fname); |
2016 | } | 2020 | } |
2017 | 2021 | ||
2022 | struct ext_sym_list { | ||
2023 | struct ext_sym_list *next; | ||
2024 | const char *file; | ||
2025 | }; | ||
2026 | |||
2018 | int main(int argc, char **argv) | 2027 | int main(int argc, char **argv) |
2019 | { | 2028 | { |
2020 | struct module *mod; | 2029 | struct module *mod; |
@@ -2025,8 +2034,10 @@ int main(int argc, char **argv) | |||
2025 | char *markers_write = NULL; | 2034 | char *markers_write = NULL; |
2026 | int opt; | 2035 | int opt; |
2027 | int err; | 2036 | int err; |
2037 | struct ext_sym_list *extsym_iter; | ||
2038 | struct ext_sym_list *extsym_start = NULL; | ||
2028 | 2039 | ||
2029 | while ((opt = getopt(argc, argv, "i:I:cmsSo:awM:K:")) != -1) { | 2040 | while ((opt = getopt(argc, argv, "i:I:e:cmsSo:awM:K:")) != -1) { |
2030 | switch (opt) { | 2041 | switch (opt) { |
2031 | case 'i': | 2042 | case 'i': |
2032 | kernel_read = optarg; | 2043 | kernel_read = optarg; |
@@ -2038,6 +2049,14 @@ int main(int argc, char **argv) | |||
2038 | case 'c': | 2049 | case 'c': |
2039 | cross_build = 1; | 2050 | cross_build = 1; |
2040 | break; | 2051 | break; |
2052 | case 'e': | ||
2053 | external_module = 1; | ||
2054 | extsym_iter = | ||
2055 | NOFAIL(malloc(sizeof(*extsym_iter))); | ||
2056 | extsym_iter->next = extsym_start; | ||
2057 | extsym_iter->file = optarg; | ||
2058 | extsym_start = extsym_iter; | ||
2059 | break; | ||
2041 | case 'm': | 2060 | case 'm': |
2042 | modversions = 1; | 2061 | modversions = 1; |
2043 | break; | 2062 | break; |
@@ -2071,6 +2090,12 @@ int main(int argc, char **argv) | |||
2071 | read_dump(kernel_read, 1); | 2090 | read_dump(kernel_read, 1); |
2072 | if (module_read) | 2091 | if (module_read) |
2073 | read_dump(module_read, 0); | 2092 | read_dump(module_read, 0); |
2093 | while (extsym_start) { | ||
2094 | read_dump(extsym_start->file, 0); | ||
2095 | extsym_iter = extsym_start->next; | ||
2096 | free(extsym_start); | ||
2097 | extsym_start = extsym_iter; | ||
2098 | } | ||
2074 | 2099 | ||
2075 | while (optind < argc) | 2100 | while (optind < argc) |
2076 | read_symbols(argv[optind++]); | 2101 | read_symbols(argv[optind++]); |