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
This commit is contained in:
@ -56,6 +56,17 @@ endef
|
||||
# gcc support functions
|
||||
# See documentation in Documentation/kbuild/makefiles.txt
|
||||
|
||||
# cc-cross-prefix
|
||||
# Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-)
|
||||
# Return first prefix where a prefix$(CC) is found in PATH.
|
||||
# If no $(CC) found in PATH with listed prefixes return nothing
|
||||
cc-cross-prefix = \
|
||||
$(word 1, $(foreach c,$(1), \
|
||||
$(shell set -e; \
|
||||
if (which $(strip $(c))$(CC)) > /dev/null 2>&1 ; then \
|
||||
echo $(c); \
|
||||
fi)))
|
||||
|
||||
# output directory for tests below
|
||||
TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
|
||||
|
||||
|
@ -66,12 +66,15 @@ FILELINE * entity_system;
|
||||
#define FUNCTION "-function"
|
||||
#define NOFUNCTION "-nofunction"
|
||||
|
||||
char *srctree;
|
||||
|
||||
void usage (void)
|
||||
{
|
||||
fprintf(stderr, "Usage: docproc {doc|depend} file\n");
|
||||
fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
|
||||
fprintf(stderr, "doc: frontend when generating kernel documentation\n");
|
||||
fprintf(stderr, "depend: generate list of files referenced within file\n");
|
||||
fprintf(stderr, "Environment variable SRCTREE: absolute path to kernel source tree.\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@ -90,7 +93,7 @@ void exec_kernel_doc(char **svec)
|
||||
exit(1);
|
||||
case 0:
|
||||
memset(real_filename, 0, sizeof(real_filename));
|
||||
strncat(real_filename, getenv("SRCTREE"), PATH_MAX);
|
||||
strncat(real_filename, srctree, PATH_MAX);
|
||||
strncat(real_filename, KERNELDOCPATH KERNELDOC,
|
||||
PATH_MAX - strlen(real_filename));
|
||||
execvp(real_filename, svec);
|
||||
@ -171,7 +174,7 @@ void find_export_symbols(char * filename)
|
||||
if (filename_exist(filename) == NULL) {
|
||||
char real_filename[PATH_MAX + 1];
|
||||
memset(real_filename, 0, sizeof(real_filename));
|
||||
strncat(real_filename, getenv("SRCTREE"), PATH_MAX);
|
||||
strncat(real_filename, srctree, PATH_MAX);
|
||||
strncat(real_filename, filename,
|
||||
PATH_MAX - strlen(real_filename));
|
||||
sym = add_new_file(filename);
|
||||
@ -338,6 +341,10 @@ void parse_file(FILE *infile)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
FILE * infile;
|
||||
|
||||
srctree = getenv("SRCTREE");
|
||||
if (!srctree)
|
||||
srctree = getcwd(NULL, 0);
|
||||
if (argc != 3) {
|
||||
usage();
|
||||
exit(1);
|
||||
|
@ -84,7 +84,7 @@ help:
|
||||
# lxdialog stuff
|
||||
check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
|
||||
|
||||
# Use reursively expanded variables so we do not call gcc unless
|
||||
# Use recursively expanded variables so we do not call gcc unless
|
||||
# we really need to do so. (Do not call gcc as part of make mrproper)
|
||||
HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
|
||||
HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
|
||||
|
@ -268,6 +268,9 @@ static struct symbol *sym_add_exported(const char *name, struct module *mod,
|
||||
"was in %s%s\n", mod->name, name,
|
||||
s->module->name,
|
||||
is_vmlinux(s->module->name) ?"":".ko");
|
||||
} else {
|
||||
/* In case Modules.symvers was out of date */
|
||||
s->module = mod;
|
||||
}
|
||||
}
|
||||
s->preloaded = 0;
|
||||
|
@ -83,6 +83,7 @@ Maintainer: $name
|
||||
Standards-Version: 3.6.1
|
||||
|
||||
Package: $packagename
|
||||
Provides: kernel-image-$version, linux-image-$version
|
||||
Architecture: any
|
||||
Description: User Mode Linux kernel, version $version
|
||||
User-mode Linux is a port of the Linux kernel to its own system call
|
||||
@ -104,6 +105,7 @@ Maintainer: $name
|
||||
Standards-Version: 3.6.1
|
||||
|
||||
Package: $packagename
|
||||
Provides: kernel-image-$version, linux-image-$version
|
||||
Architecture: any
|
||||
Description: Linux kernel, version $version
|
||||
This package contains the Linux kernel, modules and corresponding other
|
||||
|
Reference in New Issue
Block a user