diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-14 11:24:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-18 16:42:05 +0000 |
commit | 4d019c038c669db7795bff28223dcb6c7c1ae196 (patch) | |
tree | d2a1e9e950c4f4c61fdf1e091b2d32e0a0ca4e69 | |
parent | bd6c5ffaf53a9b5d6af2a21b72879a883fa5b55c (diff) | |
download | poky-4d019c038c669db7795bff28223dcb6c7c1ae196.tar.gz |
make-3.82: Add patch for archive expression expansion issues
bitbake make-native; MACHINE=qemuarm bitbake icu
would fail with:
*** No rule to make target `uconvmsg/libuconvmsg.a(uconvmsg/uconvmsg_dat.ao', needed by `uconvmsg/libuconvmsg.a'. Stop
which is caused by a bug in make 3.82 which the attached patch fixes.
(From OE-Core rev: 06e64233a3a00a3c60fab7d92cbb18cd9feadc8d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/make/make-3.82/make-savannah-bug30612-handling_of_archives.patch | 188 | ||||
-rw-r--r-- | meta/recipes-devtools/make/make_3.82.bb | 5 |
2 files changed, 191 insertions, 2 deletions
diff --git a/meta/recipes-devtools/make/make-3.82/make-savannah-bug30612-handling_of_archives.patch b/meta/recipes-devtools/make/make-3.82/make-savannah-bug30612-handling_of_archives.patch new file mode 100644 index 0000000000..2502ac705a --- /dev/null +++ b/meta/recipes-devtools/make/make-3.82/make-savannah-bug30612-handling_of_archives.patch | |||
@@ -0,0 +1,188 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | 2010-08-13 Paul Smith <psmith@gnu.org> | ||
4 | |||
5 | * NEWS: Accidentally forgot to back out the sorted wildcard | ||
6 | enhancement in 3.82, so update NEWS. | ||
7 | Also add NEWS about the error check for explicit and pattern | ||
8 | targets in the same rule, added to 3.82. | ||
9 | |||
10 | * main.c (main): Add "oneshell" to $(.FEATURES) (forgot to add | ||
11 | this in 3.82!) | ||
12 | |||
13 | * read.c (parse_file_seq): Fix various errors parsing archives | ||
14 | with multiple objects in the parenthesis, as well as wildcards. | ||
15 | Fixes Savannah bug #30612. | ||
16 | |||
17 | |||
18 | Index: NEWS | ||
19 | =================================================================== | ||
20 | --- NEWS.orig 2010-07-28 05:39:50.000000000 +0000 | ||
21 | +++ NEWS 2012-11-14 11:07:26.427456125 +0000 | ||
22 | @@ -18,14 +18,6 @@ | ||
23 | * Compiling GNU make now requires a conforming ISO C 1989 compiler and | ||
24 | standard runtime library. | ||
25 | |||
26 | -* WARNING: Future backward-incompatibility! | ||
27 | - Wildcards are not documented as returning sorted values, but up to and | ||
28 | - including this release the results have been sorted and some makefiles are | ||
29 | - apparently depending on that. In the next release of GNU make, for | ||
30 | - performance reasons, we may remove that sorting. If your makefiles | ||
31 | - require sorted results from wildcard expansions, use the $(sort ...) | ||
32 | - function to request it explicitly. | ||
33 | - | ||
34 | * WARNING: Backward-incompatibility! | ||
35 | The POSIX standard for make was changed in the 2008 version in a | ||
36 | fundamentally incompatible way: make is required to invoke the shell as if | ||
37 | @@ -42,6 +34,21 @@ | ||
38 | existing targets were provided in $?). | ||
39 | |||
40 | * WARNING: Backward-incompatibility! | ||
41 | + Wildcards were not documented as returning sorted values, but the results | ||
42 | + have been sorted up until this release.. If your makefiles require sorted | ||
43 | + results from wildcard expansions, use the $(sort ...) function to request | ||
44 | + it explicitly. | ||
45 | + | ||
46 | +* WARNING: Backward-incompatibility! | ||
47 | + In previous versions of make it was acceptable to list one or more explicit | ||
48 | + targets followed by one or more pattern targets in the same rule and it | ||
49 | + worked "as expected". However, this was not documented as acceptable and if | ||
50 | + you listed any explicit targets AFTER the pattern targets, the entire rule | ||
51 | + would be mis-parsed. This release removes this ability completely: make | ||
52 | + will generate an error message if you mix explicit and pattern targets in | ||
53 | + the same rule. | ||
54 | + | ||
55 | +* WARNING: Backward-incompatibility! | ||
56 | As a result of parser enhancements, three backward-compatibility issues | ||
57 | exist: first, a prerequisite containing an "=" cannot be escaped with a | ||
58 | backslash any longer. You must create a variable containing an "=" and | ||
59 | Index: main.c | ||
60 | =================================================================== | ||
61 | --- main.c.orig 2012-11-14 11:07:25.000000000 +0000 | ||
62 | +++ main.c 2012-11-14 11:07:26.427456125 +0000 | ||
63 | @@ -1138,7 +1138,7 @@ | ||
64 | a macro and some compilers (MSVC) don't like conditionals in macros. */ | ||
65 | { | ||
66 | const char *features = "target-specific order-only second-expansion" | ||
67 | - " else-if shortest-stem undefine" | ||
68 | + " else-if shortest-stem undefine oneshell" | ||
69 | #ifndef NO_ARCHIVES | ||
70 | " archives" | ||
71 | #endif | ||
72 | Index: read.c | ||
73 | =================================================================== | ||
74 | --- read.c.orig 2010-07-13 01:20:42.000000000 +0000 | ||
75 | +++ read.c 2012-11-14 11:07:26.431456125 +0000 | ||
76 | @@ -3028,7 +3028,7 @@ | ||
77 | { | ||
78 | /* This looks like the first element in an open archive group. | ||
79 | A valid group MUST have ')' as the last character. */ | ||
80 | - const char *e = p + nlen; | ||
81 | + const char *e = p; | ||
82 | do | ||
83 | { | ||
84 | e = next_token (e); | ||
85 | @@ -3084,19 +3084,19 @@ | ||
86 | Go to the next item in the string. */ | ||
87 | if (flags & PARSEFS_NOGLOB) | ||
88 | { | ||
89 | - NEWELT (concat (2, prefix, tp)); | ||
90 | + NEWELT (concat (2, prefix, tmpbuf)); | ||
91 | continue; | ||
92 | } | ||
93 | |||
94 | /* If we get here we know we're doing glob expansion. | ||
95 | TP is a string in tmpbuf. NLEN is no longer used. | ||
96 | We may need to do more work: after this NAME will be set. */ | ||
97 | - name = tp; | ||
98 | + name = tmpbuf; | ||
99 | |||
100 | /* Expand tilde if applicable. */ | ||
101 | - if (tp[0] == '~') | ||
102 | + if (tmpbuf[0] == '~') | ||
103 | { | ||
104 | - tildep = tilde_expand (tp); | ||
105 | + tildep = tilde_expand (tmpbuf); | ||
106 | if (tildep != 0) | ||
107 | name = tildep; | ||
108 | } | ||
109 | @@ -3152,7 +3152,10 @@ | ||
110 | else | ||
111 | { | ||
112 | /* We got a chain of items. Attach them. */ | ||
113 | - (*newp)->next = found; | ||
114 | + if (*newp) | ||
115 | + (*newp)->next = found; | ||
116 | + else | ||
117 | + *newp = found; | ||
118 | |||
119 | /* Find and set the new end. Massage names if necessary. */ | ||
120 | while (1) | ||
121 | Index: tests/run_make_tests.pl | ||
122 | =================================================================== | ||
123 | --- tests/run_make_tests.pl.orig 2010-07-13 01:20:43.000000000 +0000 | ||
124 | +++ tests/run_make_tests.pl 2012-11-14 11:07:26.431456125 +0000 | ||
125 | @@ -29,6 +29,7 @@ | ||
126 | # You should have received a copy of the GNU General Public License along with | ||
127 | # this program. If not, see <http://www.gnu.org/licenses/>. | ||
128 | |||
129 | +%FEATURES = (); | ||
130 | |||
131 | $valgrind = 0; # invoke make with valgrind | ||
132 | $valgrind_args = ''; | ||
133 | @@ -367,6 +368,8 @@ | ||
134 | $parallel_jobs = 1; | ||
135 | } | ||
136 | |||
137 | + %FEATURES = map { $_ => 1 } split /\s+/, `sh -c "echo '\\\$(info \\\$(.FEATURES))' | $make_path -f- 2>/dev/null"`; | ||
138 | + | ||
139 | # Set up for valgrind, if requested. | ||
140 | |||
141 | if ($valgrind) { | ||
142 | Index: tests/scripts/features/archives | ||
143 | =================================================================== | ||
144 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
145 | +++ tests/scripts/features/archives 2012-11-14 11:07:26.431456125 +0000 | ||
146 | @@ -0,0 +1,42 @@ | ||
147 | +# -*-mode: perl-*- | ||
148 | + | ||
149 | +$description = "Test GNU make's archive management features."; | ||
150 | + | ||
151 | +$details = "\ | ||
152 | +This only works on systems that support it."; | ||
153 | + | ||
154 | +# If this instance of make doesn't support archives, skip it | ||
155 | +exists $FEATURES{archives} or return -1; | ||
156 | + | ||
157 | +# Create some .o files to work with | ||
158 | +utouch(-60, qw(a1.o a2.o a3.o)); | ||
159 | + | ||
160 | +# Very simple | ||
161 | +run_make_test('all: libxx.a(a1.o)', | ||
162 | + '', "ar rv libxx.a a1.o\nar: creating libxx.a\na - a1.o\n"); | ||
163 | + | ||
164 | +# Multiple .o's. Add a new one to the existing library | ||
165 | +run_make_test('all: libxx.a(a1.o a2.o)', | ||
166 | + '', "ar rv libxx.a a2.o\na - a2.o\n"); | ||
167 | + | ||
168 | +# Touch one of the .o's so it's rebuilt | ||
169 | +utouch(-40, 'a1.o'); | ||
170 | +run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n"); | ||
171 | + | ||
172 | +# Use wildcards | ||
173 | +run_make_test('all: libxx.a(*.o)', | ||
174 | + '', "#MAKE#: Nothing to be done for `all'.\n"); | ||
175 | + | ||
176 | +# Touch one of the .o's so it's rebuilt | ||
177 | +utouch(-30, 'a1.o'); | ||
178 | +run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n"); | ||
179 | + | ||
180 | +# Use both wildcards and simple names | ||
181 | +utouch(-50, 'a2.o'); | ||
182 | +run_make_test('all: libxx.a(a3.o *.o)', '', | ||
183 | + "ar rv libxx.a a3.o\na - a3.o\nar rv libxx.a a2.o\nr - a2.o\n"); | ||
184 | + | ||
185 | +rmfiles(qw(a1.o a2.o a3.o libxx.a)); | ||
186 | + | ||
187 | +# This tells the test driver that the perl test script executed properly. | ||
188 | +1; | ||
diff --git a/meta/recipes-devtools/make/make_3.82.bb b/meta/recipes-devtools/make/make_3.82.bb index 8167c01f37..65b044b446 100644 --- a/meta/recipes-devtools/make/make_3.82.bb +++ b/meta/recipes-devtools/make/make_3.82.bb | |||
@@ -1,11 +1,12 @@ | |||
1 | PR = "r2" | 1 | PR = "r3" |
2 | LICENSE = "GPLv3 & LGPLv2" | 2 | LICENSE = "GPLv3 & LGPLv2" |
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ |
4 | file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | 4 | file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \ |
5 | file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4" | 5 | file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4" |
6 | require make.inc | 6 | require make.inc |
7 | 7 | ||
8 | SRC_URI += "file://expand_MAKEFLAGS.patch" | 8 | SRC_URI += "file://expand_MAKEFLAGS.patch \ |
9 | file://make-savannah-bug30612-handling_of_archives.patch;striplevel=0" | ||
9 | 10 | ||
10 | SRC_URI[md5sum] = "1a11100f3c63fcf5753818e59d63088f" | 11 | SRC_URI[md5sum] = "1a11100f3c63fcf5753818e59d63088f" |
11 | SRC_URI[sha256sum] = "e2c1a73f179c40c71e2fe8abf8a8a0688b8499538512984da4a76958d0402966" | 12 | SRC_URI[sha256sum] = "e2c1a73f179c40c71e2fe8abf8a8a0688b8499538512984da4a76958d0402966" |