[PATCH 17/39] kbuild: fix header export when __ASSEMBLY__ is used

From: Sam Ravnborg
Date: Fri Jun 05 2009 - 19:43:50 EST


unifdef got confused by:

Because it does not know __ASSEMBLY__ it does not
detect that htis is not for userspace.
This caused too much code to be exported, and headers_check barfed
over this code.

For arm this fixes following "make headers_check" warning:
/usr/include/asm/hwcap.h:29: extern's make no sense in userspace

Russell King suggested to undefine __ASSEMBLY__ to fix this warning.

Cc: Russell King <rmk+lkml@xxxxxxxxxxxxxxxx>
Cc: Jaswinder Singh Rajput <jaswinder@xxxxxxxxxx>
Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
---
scripts/headers_install.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
index c6ae405..bc70ea6 100644
--- a/scripts/headers_install.pl
+++ b/scripts/headers_install.pl
@@ -20,7 +20,7 @@ use strict;

my ($readdir, $installdir, $arch, @files) = @ARGV;

-my $unifdef = "scripts/unifdef -U__KERNEL__";
+my $unifdef = "scripts/unifdef -U__KERNEL__ -U__ASSEMBLY__";

foreach my $file (@files) {
local *INFILE;
--
1.6.3.rc3.40.g75b44

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/