Skip to content

Commit db1bec4

Browse files
committed
kbuild: install all headers when arch is changed
We see some header files that are selected dependent on the actual architecture so force a reinstallation of all header files when the arch changes. This slows down "make headers_check_all" but then we better reflect reality. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent 6b36ab2 commit db1bec4

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

scripts/Makefile.headersinst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
4343

4444
quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
4545
file$(if $(word 2, $(all-files)),s))
46-
cmd_install = $(PERL) $< $(srctree)/$(obj) $(install) $(header-y); \
47-
$(PERL) $< $(objtree)/$(obj) $(install) $(objhdr-y); \
48-
touch $@
46+
cmd_install = \
47+
$(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \
48+
$(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \
49+
touch $@
4950

5051
quiet_cmd_remove = REMOVE $(unwanted)
5152
cmd_remove = rm -f $(unwanted-file)

scripts/headers_install.pl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
# headers_install prepare the listed header files for use in
44
# user space and copy the files to their destination.
55
#
6-
# Usage: headers_install.pl odir installdir [files...]
7-
# odir: dir to open files
8-
# install: dir to install the files
9-
# files: list of files to check
6+
# Usage: headers_install.pl readdir installdir arch [files...]
7+
# readdir: dir to open files
8+
# installdir: dir to install the files
9+
# arch: current architecture
10+
# arch is used to force a reinstallation when the arch
11+
# changes because kbuild then detect a command line change.
12+
# files: list of files to check
1013
#
1114
# Step in preparation for users space:
1215
# 1) Drop all use of compiler.h definitions
@@ -16,7 +19,7 @@
1619
use strict;
1720
use warnings;
1821

19-
my ($readdir, $installdir, @files) = @ARGV;
22+
my ($readdir, $installdir, $arch, @files) = @ARGV;
2023

2124
my $unifdef = "scripts/unifdef -U__KERNEL__";
2225

0 commit comments

Comments
 (0)