diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 16:47:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 16:47:38 -0400 |
commit | 4800be295c34268fd3211d49828bfaa6bf62867f (patch) | |
tree | 10f9b9094a749f26b524ec6ba601284d54f9476c /scripts | |
parent | c4ec20717313daafba59225f812db89595952b83 (diff) | |
parent | 7bb9d092de0b21f8f3f0a20dc2ec84395549fb62 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
kbuild: fix first module build
kconfig: update kconfig-language text
kbuild: introduce cc-cross-prefix
kbuild: disable depmod in cross-compile kernel build
kbuild: make deb-pkg - add 'Provides:' line
kconfig: comment typo in scripts/kconfig/Makefile.
kbuild: stop docproc segfaulting when SRCTREE isn't set.
kbuild: modpost problem when symbols move from one module to another
kbuild: cscope - filter out .tmp_* in find_sources
kbuild: mailing list has moved
kbuild: check asm symlink when building a kernel
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Kbuild.include | 11 | ||||
-rw-r--r-- | scripts/basic/docproc.c | 11 | ||||
-rw-r--r-- | scripts/kconfig/Makefile | 2 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 3 | ||||
-rw-r--r-- | scripts/package/builddeb | 2 |
5 files changed, 26 insertions, 3 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index de7bb284c611..b96ea8d6a5ed 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -56,6 +56,17 @@ endef | |||
56 | # gcc support functions | 56 | # gcc support functions |
57 | # See documentation in Documentation/kbuild/makefiles.txt | 57 | # See documentation in Documentation/kbuild/makefiles.txt |
58 | 58 | ||
59 | # cc-cross-prefix | ||
60 | # Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) | ||
61 | # Return first prefix where a prefix$(CC) is found in PATH. | ||
62 | # If no $(CC) found in PATH with listed prefixes return nothing | ||
63 | cc-cross-prefix = \ | ||
64 | $(word 1, $(foreach c,$(1), \ | ||
65 | $(shell set -e; \ | ||
66 | if (which $(strip $(c))$(CC)) > /dev/null 2>&1 ; then \ | ||
67 | echo $(c); \ | ||
68 | fi))) | ||
69 | |||
59 | # output directory for tests below | 70 | # output directory for tests below |
60 | TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) | 71 | TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) |
61 | 72 | ||
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index e5c6ac7bde9b..0e4bd5459df4 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c | |||
@@ -66,12 +66,15 @@ FILELINE * entity_system; | |||
66 | #define FUNCTION "-function" | 66 | #define FUNCTION "-function" |
67 | #define NOFUNCTION "-nofunction" | 67 | #define NOFUNCTION "-nofunction" |
68 | 68 | ||
69 | char *srctree; | ||
70 | |||
69 | void usage (void) | 71 | void usage (void) |
70 | { | 72 | { |
71 | fprintf(stderr, "Usage: docproc {doc|depend} file\n"); | 73 | fprintf(stderr, "Usage: docproc {doc|depend} file\n"); |
72 | fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n"); | 74 | fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n"); |
73 | fprintf(stderr, "doc: frontend when generating kernel documentation\n"); | 75 | fprintf(stderr, "doc: frontend when generating kernel documentation\n"); |
74 | fprintf(stderr, "depend: generate list of files referenced within file\n"); | 76 | fprintf(stderr, "depend: generate list of files referenced within file\n"); |
77 | fprintf(stderr, "Environment variable SRCTREE: absolute path to kernel source tree.\n"); | ||
75 | } | 78 | } |
76 | 79 | ||
77 | /* | 80 | /* |
@@ -90,7 +93,7 @@ void exec_kernel_doc(char **svec) | |||
90 | exit(1); | 93 | exit(1); |
91 | case 0: | 94 | case 0: |
92 | memset(real_filename, 0, sizeof(real_filename)); | 95 | memset(real_filename, 0, sizeof(real_filename)); |
93 | strncat(real_filename, getenv("SRCTREE"), PATH_MAX); | 96 | strncat(real_filename, srctree, PATH_MAX); |
94 | strncat(real_filename, KERNELDOCPATH KERNELDOC, | 97 | strncat(real_filename, KERNELDOCPATH KERNELDOC, |
95 | PATH_MAX - strlen(real_filename)); | 98 | PATH_MAX - strlen(real_filename)); |
96 | execvp(real_filename, svec); | 99 | execvp(real_filename, svec); |
@@ -171,7 +174,7 @@ void find_export_symbols(char * filename) | |||
171 | if (filename_exist(filename) == NULL) { | 174 | if (filename_exist(filename) == NULL) { |
172 | char real_filename[PATH_MAX + 1]; | 175 | char real_filename[PATH_MAX + 1]; |
173 | memset(real_filename, 0, sizeof(real_filename)); | 176 | memset(real_filename, 0, sizeof(real_filename)); |
174 | strncat(real_filename, getenv("SRCTREE"), PATH_MAX); | 177 | strncat(real_filename, srctree, PATH_MAX); |
175 | strncat(real_filename, filename, | 178 | strncat(real_filename, filename, |
176 | PATH_MAX - strlen(real_filename)); | 179 | PATH_MAX - strlen(real_filename)); |
177 | sym = add_new_file(filename); | 180 | sym = add_new_file(filename); |
@@ -338,6 +341,10 @@ void parse_file(FILE *infile) | |||
338 | int main(int argc, char *argv[]) | 341 | int main(int argc, char *argv[]) |
339 | { | 342 | { |
340 | FILE * infile; | 343 | FILE * infile; |
344 | |||
345 | srctree = getenv("SRCTREE"); | ||
346 | if (!srctree) | ||
347 | srctree = getcwd(NULL, 0); | ||
341 | if (argc != 3) { | 348 | if (argc != 3) { |
342 | usage(); | 349 | usage(); |
343 | exit(1); | 350 | exit(1); |
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index bb08069b04af..83c5e76414ce 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -84,7 +84,7 @@ help: | |||
84 | # lxdialog stuff | 84 | # lxdialog stuff |
85 | check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh | 85 | check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh |
86 | 86 | ||
87 | # Use reursively expanded variables so we do not call gcc unless | 87 | # Use recursively expanded variables so we do not call gcc unless |
88 | # we really need to do so. (Do not call gcc as part of make mrproper) | 88 | # we really need to do so. (Do not call gcc as part of make mrproper) |
89 | HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) | 89 | HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) |
90 | HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) | 90 | HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 2ef9a193fcae..93ac52adb498 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -268,6 +268,9 @@ static struct symbol *sym_add_exported(const char *name, struct module *mod, | |||
268 | "was in %s%s\n", mod->name, name, | 268 | "was in %s%s\n", mod->name, name, |
269 | s->module->name, | 269 | s->module->name, |
270 | is_vmlinux(s->module->name) ?"":".ko"); | 270 | is_vmlinux(s->module->name) ?"":".ko"); |
271 | } else { | ||
272 | /* In case Modules.symvers was out of date */ | ||
273 | s->module = mod; | ||
271 | } | 274 | } |
272 | } | 275 | } |
273 | s->preloaded = 0; | 276 | s->preloaded = 0; |
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 6edb29f2b4a6..0f657b5f3bc8 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb | |||
@@ -83,6 +83,7 @@ Maintainer: $name | |||
83 | Standards-Version: 3.6.1 | 83 | Standards-Version: 3.6.1 |
84 | 84 | ||
85 | Package: $packagename | 85 | Package: $packagename |
86 | Provides: kernel-image-$version, linux-image-$version | ||
86 | Architecture: any | 87 | Architecture: any |
87 | Description: User Mode Linux kernel, version $version | 88 | Description: User Mode Linux kernel, version $version |
88 | User-mode Linux is a port of the Linux kernel to its own system call | 89 | User-mode Linux is a port of the Linux kernel to its own system call |
@@ -104,6 +105,7 @@ Maintainer: $name | |||
104 | Standards-Version: 3.6.1 | 105 | Standards-Version: 3.6.1 |
105 | 106 | ||
106 | Package: $packagename | 107 | Package: $packagename |
108 | Provides: kernel-image-$version, linux-image-$version | ||
107 | Architecture: any | 109 | Architecture: any |
108 | Description: Linux kernel, version $version | 110 | Description: Linux kernel, version $version |
109 | This package contains the Linux kernel, modules and corresponding other | 111 | This package contains the Linux kernel, modules and corresponding other |