Mercurial > hg > aboriginal
comparison sources/patches/linux-noperl-headers.patch @ 1598:3cbf1abde44a
Update to linux 3.9.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 29 Apr 2013 22:03:14 -0500 |
parents | 75e291fafacc |
children |
comparison
equal
deleted
inserted
replaced
1597:15b4fc37d5f7 | 1598:3cbf1abde44a |
---|---|
1 Subject: [PATCH] Replace scripts/headers_install.pl with a shell script. | 1 Subject: [PATCH 3/3] convert headers_install.pl to headers_install.sh |
2 To: linux-kbuild@vger.kernel.org | |
3 Cc: linux-kernel@vger.kernel.org | |
4 Cc: Thomas Gleixner <tglx@linutronix.de> | |
5 Cc: Josh Boyer <jwboyer@redhat.com> | |
6 Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> | |
7 Cc: Andrew Morton <akpm@linux-foundation.org> | |
8 Cc: David Howells <dhowell@redhat.com> | |
9 Cc: Michal Marek <mmarek@suse.cz> | |
10 Cc: Sam Ravnborg <sam@ravnborg.org> | |
2 | 11 |
3 From: Rob Landley <rob@landley.net> | 12 From: Rob Landley <rob@landley.net> |
4 | 13 |
5 Remove perl from make headers_install by replacing a perl script (doing | 14 Remove perl from make headers_install by replacing a perl script (doing |
6 a simple regex search and replace) with a smaller, faster, simpler, | 15 a simple regex search and replace) with a smaller, faster, simpler, |
7 POSIX-2008 shell script implementation. The new shell script is a single | 16 POSIX-2008 shell script implementation. The new shell script is a single |
8 for loop calling sed and piping its output through unifdef to produce the | 17 for loop calling sed and piping its output through unifdef to produce the |
9 target file. | 18 target file. |
10 | 19 |
11 Previous submission: Tuesday Jan 18, 2011 | 20 Same as last time except for minor tweak to deal with code review from here: |
12 Message-ID: <4D359E5C.1070002@parallels.com> | 21 http://lkml.indiana.edu/hypermail/linux/kernel/1302.3/00078.html |
22 | |
23 (Note that this drops the "arch" argument, which isn't used. Kbuild | |
24 already points to the right input files on the command line.) | |
13 | 25 |
14 Signed-off-by: Rob Landley <rob@landley.net> | 26 Signed-off-by: Rob Landley <rob@landley.net> |
15 --- | 27 --- |
16 | 28 |
17 scripts/Makefile.headersinst | 6 +-- | 29 scripts/Makefile.headersinst | 4 +- |
18 scripts/headers_install.pl | 58 --------------------------------- | 30 scripts/headers_install.pl | 63 --------------------------------- |
19 scripts/headers_install.sh | 43 ++++++++++++++++++++++++ | 31 scripts/headers_install.sh | 43 ++++++++++++++++++++++ |
20 3 files changed, 46 insertions(+), 61 deletions(-) | 32 3 files changed, 45 insertions(+), 65 deletions(-) |
21 | 33 |
22 diff -ruN linux-3.1/scripts/headers_install.sh linux-2.6.30/scripts/headers_install.sh | 34 diff -ruN linux-3.1/scripts/headers_install.sh linux-2.6.30/scripts/headers_install.sh |
23 --- linux-3.1/scripts/headers_install.sh | 35 --- linux-3.1/scripts/headers_install.sh |
24 +++ linux/scripts/headers_install.sh | 36 +++ linux/scripts/headers_install.sh |
25 @@ -0,0 +1,43 @@ | 37 @@ -0,0 +1,43 @@ |
55 + sed -r \ | 67 + sed -r \ |
56 + -e 's/([ \t(])(__user|__force|__iomem)[ \t]/\1/g' \ | 68 + -e 's/([ \t(])(__user|__force|__iomem)[ \t]/\1/g' \ |
57 + -e 's/__attribute_const__([ \t]|$)/\1/g' \ | 69 + -e 's/__attribute_const__([ \t]|$)/\1/g' \ |
58 + -e 's@^#include <linux/compiler.h>@@' \ | 70 + -e 's@^#include <linux/compiler.h>@@' \ |
59 + -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \ | 71 + -e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \ |
60 + -e 's/(^|[ \t])(inline|asm|volatile)([ \t(]|$)/\1__\2__\3/g' \ | 72 + -e 's/(^|[ \t(])(inline|asm|volatile)([ \t(]|$)/\1__\2__\3/g' \ |
61 + -e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' \ | 73 + -e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' \ |
62 + "$i" > "$OUTDIR/$FILE.sed" || exit 1 | 74 + "$i" > "$OUTDIR/$FILE.sed" || exit 1 |
63 + scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ "$OUTDIR/$FILE.sed" \ | 75 + scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ "$OUTDIR/$FILE.sed" \ |
64 + > "$OUTDIR/$FILE" | 76 + > "$OUTDIR/$FILE" |
65 + [ $? -gt 1 ] && exit 1 | 77 + [ $? -gt 1 ] && exit 1 |
67 +done | 79 +done |
68 +trap - EXIT | 80 +trap - EXIT |
69 diff -ruN linux-3.1/scripts/Makefile.headersinst | 81 diff -ruN linux-3.1/scripts/Makefile.headersinst |
70 --- linux-3.1/scripts/Makefile.headersinst | 82 --- linux-3.1/scripts/Makefile.headersinst |
71 +++ linux/scripts/Makefile.headersinst | 83 +++ linux/scripts/Makefile.headersinst |
72 @@ -55,7 +55,7 @@ | 84 @@ -71,7 +71,7 @@ |
73 quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ | 85 quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ |
74 file$(if $(word 2, $(all-files)),s)) | 86 file$(if $(word 2, $(all-files)),s)) |
75 cmd_install = \ | 87 cmd_install = \ |
76 - $(PERL) $< $(installdir) $(SRCARCH) $(input-files); \ | 88 - $(PERL) $< $(installdir) $(SRCARCH) $(input-files); \ |
77 + $(CONFIG_SHELL) $< $(installdir) $(input-files); \ | 89 + $(CONFIG_SHELL) $< $(installdir) $(input-files); \ |
78 for F in $(wrapper-files); do \ | 90 for F in $(wrapper-files); do \ |
79 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \ | 91 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F; \ |
80 done; \ | 92 done; \ |
81 @@ -83,7 +83,7 @@ | 93 @@ -97,7 +97,7 @@ |
82 @: | 94 @: |
83 | 95 |
84 targets += $(install-file) | 96 targets += $(install-file) |
85 -$(install-file): scripts/headers_install.pl $(input-files) FORCE | 97 -$(install-file): scripts/headers_install.pl $(input-files) FORCE |
86 +$(install-file): scripts/headers_install.sh $(input-files) FORCE | 98 +$(install-file): scripts/headers_install.sh $(input-files) FORCE |