From cb97914b04e7b587cf555ec5b1c69d61014f3378 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 11 Nov 2011 15:20:34 -0800 Subject: kbuild: Add support for installing generated asm headers Generated asm headers are supposed to live in arch/*/include/generated/asm, but objhdr-y expect them to live in the same directory they are generated in. Instead of trying to cut that particular Gordian knot, introduce genhdr-y that takes this into account; the sole user of objhdr-y, linux/version.h, should be migrated over at some later date. Suggested-by: David Woodhouse Acked-by: David Woodhouse Cc: Sam Ravnborg Cc: Michal Marek Signed-off-by: H. Peter Anvin --- scripts/Makefile.headersinst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index a57f5bd5a13d..d3bae5e7b601 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -4,12 +4,16 @@ # header-y - list files to be installed. They are preprocessed # to remove __KERNEL__ section of the file # objhdr-y - Same as header-y but for generated files +# genhdr-y - Same as objhdr-y but in a generated/ directory # # ========================================================================== # called may set destination dir (when installing to asm/) _dst := $(if $(dst),$(dst),$(obj)) +# generated header directory +gen := $(if $(gen),$(gen),$(subst include/,include/generated/,$(obj))) + kbuild-file := $(srctree)/$(obj)/Kbuild include $(kbuild-file) @@ -33,9 +37,10 @@ wrapper-files := $(filter $(header-y), $(generic-y)) # all headers files for this dir header-y := $(filter-out $(generic-y), $(header-y)) -all-files := $(header-y) $(objhdr-y) $(wrapper-files) +all-files := $(header-y) $(objhdr-y) $(genhdr-y) $(wrapper-files) input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \ - $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) + $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) \ + $(addprefix $(objtree)/$(gen)/,$(genhdr-y)) output-files := $(addprefix $(install)/, $(all-files)) # Work out what needs to be removed @@ -52,6 +57,7 @@ quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ cmd_install = \ $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \ $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ + $(PERL) $< $(objtree)/$(gen) $(install) $(SRCARCH) $(genhdr-y); \ for F in $(wrapper-files); do \ echo "\#include " > $(install)/$$F; \ done; \ -- cgit v1.2.1 From 052ad274964e613a12bf8ce7c5631f70d0bc82cc Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 17 Nov 2011 13:17:35 -0800 Subject: kbuild: Add support for an "archheaders" target Add support for an "archheaders" target. This target can generate files that need to be installed for user space by "make headers_install" or "make headers_install_all". In order to support "make headers_install_all", it must be able to run without the tree having to be configured first. Cc: David Woodhouse Cc: Sam Ravnborg Cc: Michal Marek Signed-off-by: H. Peter Anvin --- scripts/headers.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/headers.sh b/scripts/headers.sh index 978b42b3acd7..af1ed8810087 100755 --- a/scripts/headers.sh +++ b/scripts/headers.sh @@ -7,6 +7,7 @@ set -e do_command() { if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then + make ARCH=$2 KBUILD_HEADERS=$1 archheaders make ARCH=$2 KBUILD_HEADERS=$1 headers_$1 else printf "Ignoring arch: %s\n" ${arch} -- cgit v1.2.1 From 29dc54c673ea2531d589400badb4ada5f5f60dae Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 11 Nov 2011 15:57:53 -0800 Subject: checksyscalls: Use arch/x86/syscalls/syscall_32.tbl as source Use the new arch/x86/syscalls/syscall_32.tbl file as source instead of arch/x86/include/asm/unistd_32.h. Cc: Michal Marek Cc: Geert Uytterhoeven Cc: Sam Ravnborg Signed-off-by: H. Peter Anvin --- scripts/checksyscalls.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh index 3ab316e52313..d24810fc6af6 100755 --- a/scripts/checksyscalls.sh +++ b/scripts/checksyscalls.sh @@ -198,11 +198,16 @@ EOF } syscall_list() { -sed -n -e '/^\#define/ s/[^_]*__NR_\([^[:space:]]*\).*/\ -\#if !defined \(__NR_\1\) \&\& !defined \(__IGNORE_\1\)\ -\#warning syscall \1 not implemented\ -\#endif/p' $1 + grep '^[0-9]' "$1" | sort -n | ( + while read nr abi name entry ; do + echo < /dev/null -- cgit v1.2.1 From 9147621c771c8b6a5c8985373af3a8200e8b4a41 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 22 Nov 2011 14:47:50 -0800 Subject: kbuild, headers.sh: Don't make archheaders explicitly We don't need to explicitly invoke the archheaders target because of the dependency on __headers in the Makefile. Reported-and-tested-by: Michal Marek Link: http://lkml.kernel.org/r/4ECA8991.20302@suse.cz Signed-off-by: H. Peter Anvin --- scripts/headers.sh | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts') diff --git a/scripts/headers.sh b/scripts/headers.sh index af1ed8810087..978b42b3acd7 100755 --- a/scripts/headers.sh +++ b/scripts/headers.sh @@ -7,7 +7,6 @@ set -e do_command() { if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then - make ARCH=$2 KBUILD_HEADERS=$1 archheaders make ARCH=$2 KBUILD_HEADERS=$1 headers_$1 else printf "Ignoring arch: %s\n" ${arch} -- cgit v1.2.1