Mercurial > hg > aboriginal
annotate sources/patches/linux-2.6.28-perl3.patch @ 743:5e745e03408a
Commit 729 broke canadian cross to fix ppc440 build, so try again to hopefully fix _both_ issues.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 11 Jun 2009 00:26:15 -0500 |
parents | 9b36b9dbfc4c |
children | 79baef2e88cc |
rev | line source |
---|---|
561
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
1 From: Rob Landley <rob@landley.net> |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
2 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
3 Convert kernel/cpu/mkcapflags.pl to kernel/cpu/mkcapflags.sh. |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
4 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
5 This script generates kernel/cpu/capflags.c from include/asm/cpufeature.h. |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
6 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
7 Changes from last time: changed shebang to #!/bin/sh and tested under bash |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
8 and dash. |
558 | 9 |
561
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
10 Signed-off-by: Rob Landley <rob@landley.net> |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
11 --- |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
12 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
13 arch/x86/kernel/cpu/Makefile | 4 +-- |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
14 arch/x86/kernel/cpu/mkcapflags.pl | 32 ---------------------------- |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
15 arch/x86/kernel/cpu/mkcapflags.sh | 28 ++++++++++++++++++++++++ |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
16 3 files changed, 30 insertions(+), 34 deletions(-) |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
17 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
18 diff -ruN linux-2.6.28/arch/x86/kernel/cpu/Makefile linux-2.6.28-new/arch/x86/kernel/cpu/Makefile |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
19 --- linux-2.6.28/arch/x86/kernel/cpu/Makefile 2008-12-24 17:26:37.000000000 -0600 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
20 +++ linux-2.6.28-new/arch/x86/kernel/cpu/Makefile 2009-01-02 01:10:00.000000000 -0600 |
558 | 21 @@ -23,10 +23,10 @@ |
22 obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o | |
23 | |
24 quiet_cmd_mkcapflags = MKCAP $@ | |
25 - cmd_mkcapflags = $(PERL) $(srctree)/$(src)/mkcapflags.pl $< $@ | |
26 + cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@ | |
27 | |
28 cpufeature = $(src)/../../include/asm/cpufeature.h | |
29 | |
30 targets += capflags.c | |
31 -$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.pl FORCE | |
32 +$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE | |
33 $(call if_changed,mkcapflags) | |
561
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
34 diff -ruN linux-2.6.28/arch/x86/kernel/cpu/mkcapflags.pl linux-2.6.28-new/arch/x86/kernel/cpu/mkcapflags.pl |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
35 --- linux-2.6.28/arch/x86/kernel/cpu/mkcapflags.pl 2008-12-24 17:26:37.000000000 -0600 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
36 +++ linux-2.6.28-new/arch/x86/kernel/cpu/mkcapflags.pl 1969-12-31 18:00:00.000000000 -0600 |
558 | 37 @@ -1,32 +0,0 @@ |
38 -#!/usr/bin/perl | |
39 -# | |
40 -# Generate the x86_cap_flags[] array from include/asm-x86/cpufeature.h | |
41 -# | |
42 - | |
43 -($in, $out) = @ARGV; | |
44 - | |
45 -open(IN, "< $in\0") or die "$0: cannot open: $in: $!\n"; | |
46 -open(OUT, "> $out\0") or die "$0: cannot create: $out: $!\n"; | |
47 - | |
48 -print OUT "#include <asm/cpufeature.h>\n\n"; | |
49 -print OUT "const char * const x86_cap_flags[NCAPINTS*32] = {\n"; | |
50 - | |
51 -while (defined($line = <IN>)) { | |
52 - if ($line =~ /^\s*\#\s*define\s+(X86_FEATURE_(\S+))\s+(.*)$/) { | |
53 - $macro = $1; | |
54 - $feature = $2; | |
55 - $tail = $3; | |
56 - if ($tail =~ /\/\*\s*\"([^"]*)\".*\*\//) { | |
57 - $feature = $1; | |
58 - } | |
59 - | |
60 - if ($feature ne '') { | |
61 - printf OUT "\t%-32s = \"%s\",\n", | |
62 - "[$macro]", "\L$feature"; | |
63 - } | |
64 - } | |
65 -} | |
66 -print OUT "};\n"; | |
67 - | |
68 -close(IN); | |
69 -close(OUT); | |
561
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
70 diff -ruN linux-2.6.28/arch/x86/kernel/cpu/mkcapflags.sh linux-2.6.28-new/arch/x86/kernel/cpu/mkcapflags.sh |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
71 --- linux-2.6.28/arch/x86/kernel/cpu/mkcapflags.sh 1969-12-31 18:00:00.000000000 -0600 |
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
72 +++ linux-2.6.28-new/arch/x86/kernel/cpu/mkcapflags.sh 2009-01-02 01:10:00.000000000 -0600 |
558 | 73 @@ -0,0 +1,28 @@ |
74 +#!/bin/sh | |
75 +# | |
76 +# Generate the x86_cap_flags[] array from include/asm/cpufeature.h | |
77 +# | |
78 + | |
79 +IN=$1 | |
80 +OUT=$2 | |
81 + | |
82 +( | |
83 + echo "#include <asm/cpufeature.h>" | |
84 + echo "" | |
85 + echo "const char * const x86_cap_flags[NCAPINTS*32] = {" | |
86 + | |
87 + # Iterate through any input lines starting with #define X86_FEATURE_ | |
88 + sed -n -e 's/\t/ /g' -e 's/^ *# *define *X86_FEATURE_//p' $IN | | |
89 + while read i | |
90 + do | |
91 + # Name is everything up to the first whitespace | |
92 + NAME="$(echo "$i" | sed 's/ .*//')" | |
93 + | |
561
8dc7e099309e
Update the perl removal patches for 2.6.28 to the versions I'm submitting to the linux-kernel list.
Rob Landley <rob@landley.net>
parents:
558
diff
changeset
|
94 + # If the /* comment */ starts with a quote string, grab that. |
558 | 95 + VALUE="$(echo "$i" | sed -n 's@.*/\* *\("[^"]*"\).*\*/@\1@p')" |
96 + [ -z "$VALUE" ] && VALUE="\"$(echo "$NAME" | tr A-Z a-z)\"" | |
97 + | |
98 + [ "$VALUE" != '""' ] && echo " [X86_FEATURE_$NAME] = $VALUE," | |
99 + done | |
100 + echo "};" | |
101 +) > $OUT |