summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/make/make-3.82/expand_MAKEFLAGS.patch39
-rw-r--r--meta/recipes-devtools/make/make-3.82/intermediate-target-bugfix.patch23
-rw-r--r--meta/recipes-devtools/make/make-3.82/make-savannah-bug30612-fix_white_space.patch58
-rw-r--r--meta/recipes-devtools/make/make-3.82/make-savannah-bug30612-handling_of_archives.patch188
-rw-r--r--meta/recipes-devtools/make/make_3.82.bb16
-rw-r--r--meta/recipes-devtools/make/make_4.0.bb10
6 files changed, 10 insertions, 324 deletions
diff --git a/meta/recipes-devtools/make/make-3.82/expand_MAKEFLAGS.patch b/meta/recipes-devtools/make/make-3.82/expand_MAKEFLAGS.patch
deleted file mode 100644
index 941365fa2a..0000000000
--- a/meta/recipes-devtools/make/make-3.82/expand_MAKEFLAGS.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1Upstream-Status: Backport [The fix is already in upstream cvs repo, but not in the stable release]
2
3When working on the self-hosted-image work, I found in the target
4"bitbake eglibc-initial -c install" always failed:
5
6make[1]: Entering directory `/raid/pe2/build/tmp/work/i586-poky-linux/eglibc-initial-2.13-r18+svnr14157/eglibc-2_13/libc'
7/usr/bin/install -c -m 644 include/limits.h /usr/include/limits.h
8/usr/bin/install: cannot remove `/usr/include/limits.h': Permission denied
9make[1]: *** [/usr/include/limits.h] Error 1
10make[1]: Leaving directory `/raid/pe2/build/tmp/work/i586-poky-linux/eglibc-initial-2.13-r18+svnr14157/eglibc-2_13/libc'
11make: *** [install-headers] Error 2
12ERROR: oe_runmake faile
13
14Debugging shows the install_root variable in eglibc's makefiles is strangely
15reset at some place.
16
17Further investigation shows this is a bug of make-3.82:
18
19http://savannah.gnu.org/bugs/?30723
20http://cvs.savannah.gnu.org/viewvc/make/main.c?root=make&r1=1.243&r2=1.244
21http://old.nabble.com/-bug--30723--implicit-re-executing-of-subdirs-breaks-$(origin)-with-make-3.82-td29394353.html
22
23The patch was got from the second link above(the upstream cvs repo of make).
24
25Thu Dec 1 16:05:59 CST 2011
26Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
27
28diff -Nru make-3.82.orig//main.c make-3.82/main.c
29--- make-3.82.orig//main.c 2010-07-19 15:10:53.000000000 +0800
30+++ make-3.82/main.c 2011-12-01 16:04:11.818522186 +0800
31@@ -2093,7 +2093,7 @@
32 const char *pv = define_makeflags (1, 1);
33 char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
34 sprintf (p, "MAKEFLAGS=%s", pv);
35- putenv (p);
36+ putenv (allocated_variable_expand (p));
37 }
38
39 if (ISDB (DB_BASIC))
diff --git a/meta/recipes-devtools/make/make-3.82/intermediate-target-bugfix.patch b/meta/recipes-devtools/make/make-3.82/intermediate-target-bugfix.patch
deleted file mode 100644
index b416e64730..0000000000
--- a/meta/recipes-devtools/make/make-3.82/intermediate-target-bugfix.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Upstream-Status: Backport [The fix is already in upstream git repo, but not in the stable release]
2
3From fbe5b2c9cd612b962836b9391fa2b58c8baed6fc Mon Sep 17 00:00:00 2001
4From: Paul Smith <psmith@gnu.org>
5Date: Mon, 10 Sep 2012 02:36:05 +0000
6Subject: Force intermediate targets to be considered if their non-intermediate
7
8parent needs to be remade. Fixes Savannah bug #30653.
9---
10diff --git a/remake.c b/remake.c
11index c0bf709..b1ddd23 100644
12--- a/remake.c
13+++ b/remake.c
14@@ -612,6 +612,10 @@ update_file_1 (struct file *file, unsigned int depth)
15 d->file->dontcare = file->dontcare;
16 }
17
18+ /* We may have already considered this file, when we didn't know
19+ we'd need to update it. Force update_file() to consider it and
20+ not prune it. */
21+ d->file->considered = !considered;
22
23 dep_status |= update_file (d->file, depth);
diff --git a/meta/recipes-devtools/make/make-3.82/make-savannah-bug30612-fix_white_space.patch b/meta/recipes-devtools/make/make-3.82/make-savannah-bug30612-fix_white_space.patch
deleted file mode 100644
index 0ef501fb97..0000000000
--- a/meta/recipes-devtools/make/make-3.82/make-savannah-bug30612-fix_white_space.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1Fix another error related to whitespace handling in archives.
2
32011-06-12 Paul Smith <psmith@gnu.org>
4
5* read.c (parse_file_seq): Move the check for empty members out of
6the loop so we can go to the next member properly.
7Another fix for Savannah bug #30612.
8
9Upstream-Status: Backport
10
11---
12 read.c | 10 +++++-----
13 tests/scripts/features/archives | 5 +++++
14 5 files changed, 30 insertions(+), 5 deletions(-)
15
16diff --git a/read.c b/read.c
17index c87d4a7..b012094 100644
18--- a/read.c
19+++ b/read.c
20@@ -3044,16 +3044,16 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar,
21 nlen -= (n + 1) - tp;
22 tp = n + 1;
23
24- /* If we have just "lib(", part of something like
25- "lib( a b)", go to the next item. */
26- if (! nlen)
27- continue;
28-
29 /* We can stop looking now. */
30 break;
31 }
32 }
33 while (*e != '\0');
34+
35+ /* If we have just "lib(", part of something like "lib( a b)",
36+ go to the next item. */
37+ if (! nlen)
38+ continue;
39 }
40 }
41
42diff --git a/tests/scripts/features/archives b/tests/scripts/features/archives
43index 00aa1af..3fe46a0 100644
44--- a/tests/scripts/features/archives
45+++ b/tests/scripts/features/archives
46@@ -36,6 +36,11 @@ utouch(-50, 'a2.o');
47 run_make_test('all: libxx.a(a3.o *.o)', '',
48 "ar rv libxx.a a3.o\na - a3.o\nar rv libxx.a a2.o\nr - a2.o\n");
49
50+# Check whitespace handling
51+utouch(-40, 'a2.o');
52+run_make_test('all: libxx.a( a3.o *.o )', '',
53+ "ar rv libxx.a a2.o\nr - a2.o\n");
54+
55 rmfiles(qw(a1.o a2.o a3.o libxx.a));
56
57 # This tells the test driver that the perl test script executed properly.
58
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
deleted file mode 100644
index 2502ac705a..0000000000
--- a/meta/recipes-devtools/make/make-3.82/make-savannah-bug30612-handling_of_archives.patch
+++ /dev/null
@@ -1,188 +0,0 @@
1Upstream-Status: Backport
2
32010-08-13 Paul Smith <psmith@gnu.org>
4
5* NEWS: Accidentally forgot to back out the sorted wildcard
6enhancement in 3.82, so update NEWS.
7Also add NEWS about the error check for explicit and pattern
8targets in the same rule, added to 3.82.
9
10* main.c (main): Add "oneshell" to $(.FEATURES) (forgot to add
11this in 3.82!)
12
13* read.c (parse_file_seq): Fix various errors parsing archives
14with multiple objects in the parenthesis, as well as wildcards.
15Fixes Savannah bug #30612.
16
17
18Index: 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
59Index: 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
72Index: 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)
121Index: 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) {
142Index: 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
deleted file mode 100644
index 6cc467d547..0000000000
--- a/meta/recipes-devtools/make/make_3.82.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1PR = "r3"
2LICENSE = "GPLv3 & LGPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
4 file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
5 file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
6require make.inc
7
8SRC_URI += "file://expand_MAKEFLAGS.patch \
9 file://intermediate-target-bugfix.patch \
10 file://make-savannah-bug30612-handling_of_archives.patch;striplevel=0 \
11 file://make-savannah-bug30612-fix_white_space.patch"
12
13SRC_URI[md5sum] = "1a11100f3c63fcf5753818e59d63088f"
14SRC_URI[sha256sum] = "e2c1a73f179c40c71e2fe8abf8a8a0688b8499538512984da4a76958d0402966"
15
16BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/make/make_4.0.bb b/meta/recipes-devtools/make/make_4.0.bb
new file mode 100644
index 0000000000..bb2a7ed186
--- /dev/null
+++ b/meta/recipes-devtools/make/make_4.0.bb
@@ -0,0 +1,10 @@
1LICENSE = "GPLv3 & LGPLv2"
2LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
3 file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
4 file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
5require make.inc
6
7SRC_URI[md5sum] = "571d470a7647b455e3af3f92d79f1c18"
8SRC_URI[sha256sum] = "e60686c7afede62cc8c86ad3012cf081ea4887daf9d223ce7115703b2bb2dbdb"
9
10BBCLASSEXTEND = "native nativesdk"