From 0f6ebe3101eb333d3a8a9a5e81764ae15352e1bb3a1063fdf4717dff218b2be0 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Wed, 25 Aug 2010 16:25:13 +0000 Subject: [PATCH 1/4] - Update to 3.82 - Bug fixes - Backwards Incompatibilities: - Makefiles with .POSIX target: shells called with -e - $? contains prerequisites even if not existent - Prerequisite with '=' cannot be backslash escaped any more (use variable with '=' instead) - Variable names may not contain whitespaces any more - Mixture of explicit and pattern targets didn't always fail - Pattern specific rules application order changed - Library search behavior now compatible with standard linker - New features - --eval=STRING: Evaluate makefile syntax string before makefile - Variable .RECIPEPREFIX: Exchange TAB character - Variable .SHELLFLAGS: Options passed to shells - Target .ONESHELL: Single instance of shell for recipe - Modifier private: Suppresses inheritance of variables - Directive undefine: Undefine variable - Changed features - Multiple modifiers for variables allowed now. - Directive define: Allow variable assignment operator. - Nuke memory-hog-2.diff which didn't apply since 3.81 - Addapt make-slowdown-parallelism.diff to new parallelization tests - Separate make checks into %checks section OBS-URL: https://build.opensuse.org/package/show/Base:System/make?expand=0&rev=10 --- make-3.81.tar.bz2 | 3 - make-3.82.tar.bz2 | 3 + make-fix-testcase.patch | 13 -- make-memory-hog-2.diff | 259 --------------------------------- make-slowdown-parallelism.diff | 106 ++++++++++++-- make.changes | 28 ++++ make.spec | 10 +- 7 files changed, 132 insertions(+), 290 deletions(-) delete mode 100644 make-3.81.tar.bz2 create mode 100644 make-3.82.tar.bz2 delete mode 100644 make-fix-testcase.patch delete mode 100644 make-memory-hog-2.diff diff --git a/make-3.81.tar.bz2 b/make-3.81.tar.bz2 deleted file mode 100644 index 2874e58..0000000 --- a/make-3.81.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f3e69023771e23908f5d5592954d8271d3d6af09693cecfd29cee6fde8550dc8 -size 1151445 diff --git a/make-3.82.tar.bz2 b/make-3.82.tar.bz2 new file mode 100644 index 0000000..e00d3bc --- /dev/null +++ b/make-3.82.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2c1a73f179c40c71e2fe8abf8a8a0688b8499538512984da4a76958d0402966 +size 1242186 diff --git a/make-fix-testcase.patch b/make-fix-testcase.patch deleted file mode 100644 index 8b5d7a5..0000000 --- a/make-fix-testcase.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: make-3.81/tests/scripts/features/recursion -=================================================================== ---- make-3.81.orig/tests/scripts/features/recursion 2005-02-10 01:10:58.000000000 +0100 -+++ make-3.81/tests/scripts/features/recursion 2010-05-24 19:08:50.647462945 +0200 -@@ -16,7 +16,7 @@ last: - @echo MAKELEVEL = $(MAKELEVEL) - @echo THE END - ', -- ('CFLAGS=-O -w' . ($parallel_jobs ? '-j 2' : '')), -+ ('CFLAGS=-O -w' . ($parallel_jobs ? ' -j 2' : '')), - ($vos - ? "#MAKE#: Entering directory `#PWD#' - make 'CFLAGS=-O' -f #MAKEFILE# foo diff --git a/make-memory-hog-2.diff b/make-memory-hog-2.diff deleted file mode 100644 index 20423ba..0000000 --- a/make-memory-hog-2.diff +++ /dev/null @@ -1,259 +0,0 @@ -GNU make 3.80 is a HUGE memory hog. It calls xstrdup to build -dependency list. gnu-src-gcc.deps in libjava has 3000+ targets depend -the same 3000+ files, whose filenames are more than 260K. For this -dependency alone, make takes 3000*260K == 761MB. - -This patch is a quick hack. It reduces the memory from 1.6GB to around -600MB for "make -f gnu-src-gcc.deps". I think make should use a better -memory management for strings. If my approach is OK, I can try to -use it through out make. - - -H.J. ----- - ---- make-3.80/file.c.memory 2002-10-03 19:13:42.000000000 -0700 -+++ make-3.80/file.c 2006-02-01 10:45:32.000000000 -0800 -@@ -434,7 +434,7 @@ snap_deps () - if (d->file == 0) - d->file = enter_file (d->name); - else -- free (d->name); -+ hash_strfree (d->name); - d->name = 0; - } - free (file_slot_0); ---- make-3.80/implicit.c.memory 2002-09-04 00:26:19.000000000 -0700 -+++ make-3.80/implicit.c 2006-02-01 10:45:32.000000000 -0800 -@@ -539,7 +539,7 @@ pattern_search (file, archive, depth, re - dep->file = enter_file (dep->name); - /* enter_file uses dep->name _if_ we created a new file. */ - if (dep->name != dep->file->name) -- free (dep->name); -+ hash_strfree (dep->name); - dep->name = 0; - dep->file->tried_implicit |= dep->changed; - } ---- make-3.80/main.c.memory 2002-08-09 18:27:17.000000000 -0700 -+++ make-3.80/main.c 2006-02-01 10:45:32.000000000 -0800 -@@ -501,6 +501,7 @@ initialize_global_hash_tables () - init_hash_files (); - hash_init_directories (); - hash_init_function_table (); -+ init_hash_strings (); - } - - static struct file * ---- make-3.80/make.h.memory 2002-09-11 09:55:44.000000000 -0700 -+++ make-3.80/make.h 2006-02-01 10:45:32.000000000 -0800 -@@ -427,6 +427,11 @@ extern char *find_char_unquote PARAMS (( - extern char *find_percent PARAMS ((char *)); - extern FILE *open_tmpfile PARAMS ((char **, const char *)); - -+extern void init_hash_strings PARAMS ((void)); -+extern char *hash_strdup PARAMS ((const char *)); -+extern char *hash_savestring PARAMS ((const char *, unsigned int)); -+extern void hash_strfree PARAMS ((char *)); -+ - #ifndef NO_ARCHIVES - extern int ar_name PARAMS ((char *)); - extern void ar_parse_name PARAMS ((char *, char **, char **)); ---- make-3.80/misc.c.memory 2002-09-12 15:15:58.000000000 -0700 -+++ make-3.80/misc.c 2006-02-01 11:05:44.000000000 -0800 -@@ -18,8 +18,10 @@ along with GNU Make; see the file COPYIN - the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -+#include - #include "make.h" - #include "dep.h" -+#include "hash.h" - #include "debug.h" - - /* Variadic functions. We go through contortions to allow proper function -@@ -564,7 +566,7 @@ copy_dep_chain (d) - c = (struct dep *) xmalloc (sizeof (struct dep)); - bcopy ((char *) d, (char *) c, sizeof (struct dep)); - if (c->name != 0) -- c->name = xstrdup (c->name); -+ c->name = hash_strdup (c->name); - c->next = 0; - if (firstnew == 0) - firstnew = lastnew = c; -@@ -891,3 +893,154 @@ atomic_readdir(dir) - } - - #endif /* HAVE_BROKEN_RESTART */ -+ -+/* Hash table of duplicated strings. */ -+ -+struct hash_string -+{ -+ char *string; -+ unsigned int count; -+}; -+ -+static unsigned long -+string_hash_1 (key) -+ const void *key; -+{ -+ return_ISTRING_HASH_1 (((const struct hash_string *) key)->string); -+} -+ -+static unsigned long -+string_hash_2 (key) -+ const void *key; -+{ -+ return_ISTRING_HASH_2 (((const struct hash_string *) key)->string); -+} -+ -+static int -+string_hash_cmp (x, y) -+ const void *x; -+ const void *y; -+{ -+ return_ISTRING_COMPARE (((const struct hash_string *) x)->string, -+ ((const struct hash_string *) y)->string); -+} -+ -+static struct hash_table strings; -+ -+void -+init_hash_strings () -+{ -+ hash_init (&strings, 1000, string_hash_1, string_hash_2, -+ string_hash_cmp); -+} -+ -+/* Keep track duplicated string and return the old one if exists. */ -+ -+char * -+hash_strdup (ptr) -+ const char *ptr; -+{ -+ struct hash_string *h, key; -+ -+ if (*ptr == '\0') -+ return ""; -+ -+ key.string = (char *) ptr; -+ key.count = 0; -+ h = (struct hash_string *) hash_find_item (&strings, &key); -+ if (h == NULL) -+ { -+ char *result = (char *) malloc (strlen (ptr) + 1); -+ -+ if (result == NULL) -+ fatal (NILF, _("virtual memory exhausted")); -+ -+ strcpy (result, ptr); -+ -+ h = (struct hash_string *) malloc (sizeof (struct hash_string)); -+ if (h == NULL) -+ fatal (NILF, _("virtual memory exhausted")); -+ -+ h->string = result; -+ h->count = 1; -+ hash_insert (&strings, h); -+ } -+ else -+ { -+ h->count++; -+ assert (h->count != 0); -+ } -+ -+ return h->string; -+} -+ -+char * -+hash_savestring (str, length) -+ const char *str; -+ unsigned int length; -+{ -+ struct hash_string *h, key; -+ -+ if (length == 0 || *str == '\0') -+ return ""; -+ -+ key.string = alloca (length + 1); -+ key.count = 0; -+ bcopy (str, key.string, length); -+ key.string [length] = '\0'; -+ -+ h = (struct hash_string *) hash_find_item (&strings, &key); -+ if (h == NULL) -+ { -+ char *out = (char *) xmalloc (length + 1); -+ bcopy (str, out, length); -+ out[length] = '\0'; -+ -+ h = (struct hash_string *) malloc (sizeof (struct hash_string)); -+ if (h == NULL) -+ fatal (NILF, _("virtual memory exhausted")); -+ -+ h->string = out; -+ h->count = 1; -+ hash_insert (&strings, h); -+ } -+ else -+ { -+ h->count++; -+ assert (h->count != 0); -+ } -+ -+ return h->string; -+} -+ -+void -+hash_strfree (ptr) -+ char *ptr; -+{ -+ struct hash_string *h, key; -+ -+ if (*ptr == '\0') -+ return; -+ -+ key.string = ptr; -+ key.count = 0; -+ h = (struct hash_string *) hash_find_item (&strings, &key); -+ -+ /* Check if string comes from hash_strdup or hash_savestring. */ -+ if (h == NULL || h->string != ptr) -+ { -+ free (ptr); -+ return; -+ } -+ -+ h->count--; -+ if (h->count == 0) -+ { -+ struct hash_string *d; -+ -+ d = hash_delete (&strings, h); -+ assert (d == h); -+ free (h->string); -+ free (h); -+ } -+} ---- make-3.80/read.c.memory 2006-02-01 10:45:32.000000000 -0800 -+++ make-3.80/read.c 2006-02-01 10:45:32.000000000 -0800 -@@ -1871,8 +1871,8 @@ record_files (filenames, pattern, patter - fatal (flocp, - _("target `%s' leaves prerequisite pattern empty"), - name); -- free (d->name); -- d->name = savestring (buffer, o - buffer); -+ hash_strfree (d->name); -+ d->name = hash_savestring (buffer, o - buffer); - } - } - } -@@ -2017,7 +2017,7 @@ record_files (filenames, pattern, patter - while (d != 0) - { - struct dep *nextd = d->next; -- free (d->name); -+ hash_strfree (d->name); - free ((char *)d); - d = nextd; - } diff --git a/make-slowdown-parallelism.diff b/make-slowdown-parallelism.diff index 82af80c..da41a92 100644 --- a/make-slowdown-parallelism.diff +++ b/make-slowdown-parallelism.diff @@ -1,7 +1,21 @@ -diff -ur ../make-3.81.orig/tests/scripts/features/parallelism ./tests/scripts/features/parallelism ---- ../make-3.81.orig/tests/scripts/features/parallelism 2006-06-07 12:55:53.000000000 +0200 -+++ ./tests/scripts/features/parallelism 2006-06-07 13:04:04.000000000 +0200 -@@ -27,9 +27,9 @@ +Index: tests/scripts/features/double_colon +=================================================================== +--- tests/scripts/features/double_colon.orig ++++ tests/scripts/features/double_colon +@@ -23,7 +23,7 @@ all: baz + foo:: f1.h ; @echo foo FIRST + foo:: f2.h ; @echo foo SECOND + +-bar:: ; @echo aaa; sleep 1; echo aaa done ++bar:: ; @echo aaa; sleep 4; echo aaa done + bar:: ; @echo bbb + + baz:: ; @echo aaa +Index: tests/scripts/features/parallelism +=================================================================== +--- tests/scripts/features/parallelism.orig ++++ tests/scripts/features/parallelism +@@ -27,9 +27,9 @@ else { run_make_test(" all : def_1 def_2 def_3 @@ -14,7 +28,7 @@ diff -ur ../make-3.81.orig/tests/scripts/features/parallelism ./tests/scripts/fe '-j4', "ONE\nFOUR\nTHREE\nTWO"); # Test parallelism with included files. Here we sleep/echo while -@@ -38,8 +38,8 @@ +@@ -38,8 +38,8 @@ def_3 : ; \@$sleep_command 1 ; echo FOUR run_make_test(" all: 1 2; \@echo success -include 1.inc 2.inc @@ -25,7 +39,7 @@ diff -ur ../make-3.81.orig/tests/scripts/features/parallelism ./tests/scripts/fe "-j4", "ONE.inc\nTHREE.inc\nTWO.inc\nONE\nTHREE\nTWO\nsuccess\n"); -@@ -57,8 +57,8 @@ +@@ -57,8 +57,8 @@ ifeq (\$(INC),yes) -include 1.inc 2.inc endif @@ -36,12 +50,86 @@ diff -ur ../make-3.81.orig/tests/scripts/features/parallelism ./tests/scripts/fe "-j4", "ONE.inc\nTHREE.inc\nTWO.inc\nONE\nTHREE\nTWO\nsuccess\n"); -@@ -95,7 +95,7 @@ +@@ -74,37 +74,37 @@ rmfiles(qw(1.inc 2.inc)); + run_make_test(" + export HI = \$(shell \$(\$\@.CMD)) + first.CMD = echo hi +-second.CMD = $sleep_command 4; echo hi ++second.CMD = $sleep_command 16; echo hi + + .PHONY: all first second + all: first second + +-first second: ; \@echo \$\@; $sleep_command 1; echo \$\@", +- '-j2', "first\nfirst\nsecond\nsecond", 0, 7); ++first second: ; \@echo \$\@; $sleep_command 4; echo \$\@", ++ '-j2', "first\nfirst\nsecond\nsecond", 0, 28); + + # Michael Matz reported a bug where if make is running in + # parallel without -k and two jobs die in a row, but not too close to each + # other, then make will quit without waiting for the rest of the jobs to die. + + run_make_test(" +-.PHONY: all fail.1 fail.2 fail.3 ok +-all: fail.1 ok fail.2 fail.3 ++.PHONY: all fail.3 fail.6 fail.9 ok ++all: fail.3 ok fail.6 fail.9 + +-fail.1 fail.2 fail.3: ++fail.3 fail.6 fail.9: + \@sleep \$(patsubst fail.%,%,\$\@) + \@echo Fail \@exit 1 ok: - \@sleep 4 -+ \@sleep 8 ++ \@sleep 12 \@echo Ok done", '-rR -j5', 'Fail - #MAKE#: *** [fail.1] Error 1 +-#MAKE#: *** [fail.1] Error 1 ++#MAKE#: *** [fail.3] Error 1 + #MAKE#: *** Waiting for unfinished jobs.... + Fail +-#MAKE#: *** [fail.2] Error 1 ++#MAKE#: *** [fail.6] Error 1 + Fail +-#MAKE#: *** [fail.3] Error 1 ++#MAKE#: *** [fail.9] Error 1 + Ok done', + 512); + +Index: tests/scripts/options/dash-l +=================================================================== +--- tests/scripts/options/dash-l.orig ++++ tests/scripts/options/dash-l +@@ -25,7 +25,7 @@ SHELL = /bin/sh + + define test + if [ ! -f test-file ]; then \ +- echo >> test-file; sleep 2; rm -f test-file; \ ++ echo >> test-file; sleep 8; rm -f test-file; \ + else \ + echo $@ FAILED; \ + fi +@@ -46,7 +46,7 @@ $mkoptions = "-l 0.0001"; + $mkoptions .= " -j 4" if ($parallel_jobs); + + # We have to wait longer than the default (5s). +-&run_make_with_options($makefile, $mkoptions, &get_logfile, 0, 8); ++&run_make_with_options($makefile, $mkoptions, &get_logfile, 0, 32); + + $slurp = &read_file_into_string (&get_logfile(1)); + if ($slurp !~ /cannot enforce load limit/) { +Index: tests/test_driver.pl +=================================================================== +--- tests/test_driver.pl.orig ++++ tests/test_driver.pl +@@ -52,7 +52,7 @@ $test_passed = 1; + + + # Timeout in seconds. If the test takes longer than this we'll fail it. +-$test_timeout = 5; ++$test_timeout = 20; + + # Path to Perl + $perl_name = $^X; diff --git a/make.changes b/make.changes index 6f3b45d..162fb7c 100644 --- a/make.changes +++ b/make.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Mon Aug 23 13:39:12 UTC 2010 - mhopf@novell.com + +- Update to 3.82 + - Bug fixes + - Backwards Incompatibilities: + - Makefiles with .POSIX target: shells called with -e + - $? contains prerequisites even if not existent + - Prerequisite with '=' cannot be backslash escaped any more + (use variable with '=' instead) + - Variable names may not contain whitespaces any more + - Mixture of explicit and pattern targets didn't always fail + - Pattern specific rules application order changed + - Library search behavior now compatible with standard linker + - New features + - --eval=STRING: Evaluate makefile syntax string before makefile + - Variable .RECIPEPREFIX: Exchange TAB character + - Variable .SHELLFLAGS: Options passed to shells + - Target .ONESHELL: Single instance of shell for recipe + - Modifier private: Suppresses inheritance of variables + - Directive undefine: Undefine variable + - Changed features + - Multiple modifiers for variables allowed now. + - Directive define: Allow variable assignment operator. +- Nuke memory-hog-2.diff which didn't apply since 3.81 +- Addapt make-slowdown-parallelism.diff to new parallelization tests +- Separate make checks into %checks section + ------------------------------------------------------------------- Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de diff --git a/make.spec b/make.spec index 51df859..e3f9cb5 100644 --- a/make.spec +++ b/make.spec @@ -25,13 +25,11 @@ Group: Development/Tools/Building Provides: gmake PreReq: %install_info_prereq AutoReqProv: on -Version: 3.81 +Version: 3.82 Release: 131 Summary: GNU make -Source: make-3.81.tar.bz2 -Patch1: make-memory-hog-2.diff +Source: make-%version.tar.bz2 Patch2: make-slowdown-parallelism.diff -Patch3: make-fix-testcase.patch Patch64: make-library-search-path.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -40,9 +38,7 @@ The GNU make command with extensive documentation. %prep %setup -#%patch1 -p1 %patch2 -%patch3 -p1 if [ %_lib == lib64 ]; then %patch64 fi @@ -51,6 +47,8 @@ fi CFLAGS=$RPM_OPT_FLAGS \ ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info make %{?_smp_mflags} + +%check make check %install From 40205a44c3f0f8ae0c81bd9e75fa1f4d405f8a1f5f4e3a8f9367996e6ada4cba Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Mon, 30 Aug 2010 17:41:35 +0000 Subject: [PATCH 2/4] - Disable some inherrently broken test cases. OBS-URL: https://build.opensuse.org/package/show/Base:System/make?expand=0&rev=11 --- make-disable-broken-tests.diff | 141 +++++++++++++++++++++++++++++++++ make.changes | 5 ++ make.spec | 2 + 3 files changed, 148 insertions(+) create mode 100644 make-disable-broken-tests.diff diff --git a/make-disable-broken-tests.diff b/make-disable-broken-tests.diff new file mode 100644 index 0000000..1a9f357 --- /dev/null +++ b/make-disable-broken-tests.diff @@ -0,0 +1,141 @@ +Index: make-3.82/tests/scripts/targets/SECONDARY +=================================================================== +--- make-3.82.orig/tests/scripts/targets/SECONDARY ++++ make-3.82/tests/scripts/targets/SECONDARY +@@ -121,69 +121,73 @@ all: version2', + + unlink('version2'); + +-# TEST #9 -- Savannah bug #15919 +-# The original fix for this bug caused a new bug, shown here. +- +-touch(qw(1.a 2.a)); +- +-run_make_test(' +-%.c : %.b ; cp $< $@ +-%.b : %.a ; cp $< $@ +-all : 1.c 2.c', '-rR -j', +-'cp 1.a 1.b +-cp 2.a 2.b +-cp 1.b 1.c +-cp 2.b 2.c +-rm 1.b 2.b'); +- +-unlink(qw(1.a 2.a 1.c 2.c)); +- +-# TEST #10 -- Savannah bug #15919 +-touch('test.0'); +-run_make_test(' +-.SECONDARY : test.1 test.2 test.3 +- +-test : test.4 +- +-%.4 : %.int %.3 ; touch $@ +- +-%.int : %.3 %.2 ; touch $@ +- +-%.3 : | %.2 ; touch $@ +- +-%.2 : %.1 ; touch $@ +- +-%.1 : %.0 ; touch $@', '-rR -j 2', +-'touch test.1 +-touch test.2 +-touch test.3 +-touch test.int +-touch test.4 +-rm test.int'); +- +-# After a touch of test.0 it should give the same output, except we don't need +-# to rebuild test.3 (order-only) +-sleep(1); +-touch('test.0'); +-run_make_test(undef, '-rR -j 2', +-'touch test.1 +-touch test.2 +-touch test.int +-touch test.4 +-rm test.int'); +- +-# With both test.0 and test.3 updated it should still build everything except +-# test.3 +-sleep(1); +-touch('test.0', 'test.3'); +-run_make_test(undef, '-rR -j 2', +-'touch test.1 +-touch test.2 +-touch test.int +-touch test.4 +-rm test.int'); +- +-unlink(qw(test.0 test.1 test.2 test.3 test.4)); ++# All these tests don't reliably work under high load conditions. ++# Heck, I had two different failures on my workstation, and it's ++# perfectly clear that ordering can differ. - mhopf ++ ++# # TEST #9 -- Savannah bug #15919 ++# # The original fix for this bug caused a new bug, shown here. ++# ++# touch(qw(1.a 2.a)); ++# ++# run_make_test(' ++# %.c : %.b ; cp $< $@ ++# %.b : %.a ; cp $< $@ ++# all : 1.c 2.c', '-rR -j', ++# 'cp 1.a 1.b ++# cp 2.a 2.b ++# cp 1.b 1.c ++# cp 2.b 2.c ++# rm 1.b 2.b'); ++# ++# unlink(qw(1.a 2.a 1.c 2.c)); ++# ++# # TEST #10 -- Savannah bug #15919 ++# touch('test.0'); ++# run_make_test(' ++# .SECONDARY : test.1 test.2 test.3 ++# ++# test : test.4 ++# ++# %.4 : %.int %.3 ; touch $@ ++# ++# %.int : %.3 %.2 ; touch $@ ++# ++# %.3 : | %.2 ; touch $@ ++# ++# %.2 : %.1 ; touch $@ ++# ++# %.1 : %.0 ; touch $@', '-rR -j 2', ++# 'touch test.1 ++# touch test.2 ++# touch test.3 ++# touch test.int ++# touch test.4 ++# rm test.int'); ++# ++# # After a touch of test.0 it should give the same output, except we don't need ++# # to rebuild test.3 (order-only) ++# sleep(1); ++# touch('test.0'); ++# run_make_test(undef, '-rR -j 2', ++# 'touch test.1 ++# touch test.2 ++# touch test.int ++# touch test.4 ++# rm test.int'); ++# ++# # With both test.0 and test.3 updated it should still build everything except ++# # test.3 ++# sleep(1); ++# touch('test.0', 'test.3'); ++# run_make_test(undef, '-rR -j 2', ++# 'touch test.1 ++# touch test.2 ++# touch test.int ++# touch test.4 ++# rm test.int'); ++# ++# unlink(qw(test.0 test.1 test.2 test.3 test.4)); + + # This tells the test driver that the perl test script executed properly. + 1; diff --git a/make.changes b/make.changes index 162fb7c..e0e373d 100644 --- a/make.changes +++ b/make.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 30 17:37:23 UTC 2010 - mhopf@novell.com + +- Disable some inherrently broken test cases. + ------------------------------------------------------------------- Mon Aug 23 13:39:12 UTC 2010 - mhopf@novell.com diff --git a/make.spec b/make.spec index e3f9cb5..99973fd 100644 --- a/make.spec +++ b/make.spec @@ -30,6 +30,7 @@ Release: 131 Summary: GNU make Source: make-%version.tar.bz2 Patch2: make-slowdown-parallelism.diff +Patch3: make-disable-broken-tests.diff Patch64: make-library-search-path.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -39,6 +40,7 @@ The GNU make command with extensive documentation. %prep %setup %patch2 +%patch3 -p1 if [ %_lib == lib64 ]; then %patch64 fi From 31c4fb0db202e9ac605832f84ebe529c9d89f360251c7db338c131d544488310 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Tue, 7 Sep 2010 17:37:08 +0000 Subject: [PATCH 3/4] - make-savannah-bug30612-handling_of_archives.diff Fix Savannah bug #30612: handling of archive references with >1 object.. Add oneshell to $(.FEATURES). Fix the NEWS file to be accurate. - make-savannah-bug30723-expand_makeflags_before_reexec.diff Fix Savannah bug #30723: expand MAKEFLAGS before we re-exec after rebuilding makefiles. OBS-URL: https://build.opensuse.org/package/show/Base:System/make?expand=0&rev=12 --- ...avannah-bug30612-handling_of_archives.diff | 235 ++++++++++++++++++ ...g30723-expand_makeflags_before_reexec.diff | 85 +++++++ make.changes | 11 + make.spec | 4 + 4 files changed, 335 insertions(+) create mode 100644 make-savannah-bug30612-handling_of_archives.diff create mode 100644 make-savannah-bug30723-expand_makeflags_before_reexec.diff diff --git a/make-savannah-bug30612-handling_of_archives.diff b/make-savannah-bug30612-handling_of_archives.diff new file mode 100644 index 0000000..fd0b9b5 --- /dev/null +++ b/make-savannah-bug30612-handling_of_archives.diff @@ -0,0 +1,235 @@ +Index: ChangeLog +=================================================================== +RCS file: /sources/make/make/ChangeLog,v +retrieving revision 2.419 +retrieving revision 2.420 +diff -u -p -u -p -r2.419 -r2.420 +--- ChangeLog 10 Aug 2010 07:35:34 -0000 2.419 ++++ ChangeLog 14 Aug 2010 02:50:14 -0000 2.420 +@@ -1,3 +1,17 @@ ++2010-08-13 Paul Smith ++ ++ * NEWS: Accidentally forgot to back out the sorted wildcard ++ enhancement in 3.82, so update NEWS. ++ Also add NEWS about the error check for explicit and pattern ++ targets in the same rule, added to 3.82. ++ ++ * main.c (main): Add "oneshell" to $(.FEATURES) (forgot to add ++ this in 3.82!) ++ ++ * read.c (parse_file_seq): Fix various errors parsing archives ++ with multiple objects in the parenthesis, as well as wildcards. ++ Fixes Savannah bug #30612. ++ + 2010-08-10 Paul Smith + + * main.c (main): Expand MAKEFLAGS before adding it to the +Index: NEWS +=================================================================== +RCS file: /sources/make/make/NEWS,v +retrieving revision 2.109 +retrieving revision 2.110 +diff -u -p -u -p -r2.109 -r2.110 +--- NEWS 28 Jul 2010 05:39:50 -0000 2.109 ++++ NEWS 14 Aug 2010 02:50:14 -0000 2.110 +@@ -18,14 +18,6 @@ http://sv.gnu.org/bugs/index.php?group=m + * Compiling GNU make now requires a conforming ISO C 1989 compiler and + standard runtime library. + +-* WARNING: Future backward-incompatibility! +- Wildcards are not documented as returning sorted values, but up to and +- including this release the results have been sorted and some makefiles are +- apparently depending on that. In the next release of GNU make, for +- performance reasons, we may remove that sorting. If your makefiles +- require sorted results from wildcard expansions, use the $(sort ...) +- function to request it explicitly. +- + * WARNING: Backward-incompatibility! + The POSIX standard for make was changed in the 2008 version in a + fundamentally incompatible way: make is required to invoke the shell as if +@@ -42,6 +34,21 @@ http://sv.gnu.org/bugs/index.php?group=m + existing targets were provided in $?). + + * WARNING: Backward-incompatibility! ++ Wildcards were not documented as returning sorted values, but the results ++ have been sorted up until this release.. If your makefiles require sorted ++ results from wildcard expansions, use the $(sort ...) function to request ++ it explicitly. ++ ++* WARNING: Backward-incompatibility! ++ In previous versions of make it was acceptable to list one or more explicit ++ targets followed by one or more pattern targets in the same rule and it ++ worked "as expected". However, this was not documented as acceptable and if ++ you listed any explicit targets AFTER the pattern targets, the entire rule ++ would be mis-parsed. This release removes this ability completely: make ++ will generate an error message if you mix explicit and pattern targets in ++ the same rule. ++ ++* WARNING: Backward-incompatibility! + As a result of parser enhancements, three backward-compatibility issues + exist: first, a prerequisite containing an "=" cannot be escaped with a + backslash any longer. You must create a variable containing an "=" and +Index: main.c +=================================================================== +RCS file: /sources/make/make/main.c,v +retrieving revision 1.244 +retrieving revision 1.245 +diff -u -p -u -p -r1.244 -r1.245 +--- main.c 10 Aug 2010 07:35:34 -0000 1.244 ++++ main.c 14 Aug 2010 02:50:14 -0000 1.245 +@@ -1138,7 +1138,7 @@ main (int argc, char **argv, char **envp + a macro and some compilers (MSVC) don't like conditionals in macros. */ + { + const char *features = "target-specific order-only second-expansion" +- " else-if shortest-stem undefine" ++ " else-if shortest-stem undefine oneshell" + #ifndef NO_ARCHIVES + " archives" + #endif +Index: read.c +=================================================================== +RCS file: /sources/make/make/read.c,v +retrieving revision 1.193 +retrieving revision 1.194 +diff -u -p -u -p -r1.193 -r1.194 +--- read.c 13 Jul 2010 01:20:42 -0000 1.193 ++++ read.c 14 Aug 2010 02:50:14 -0000 1.194 +@@ -3028,7 +3028,7 @@ parse_file_seq (char **stringp, unsigned + { + /* This looks like the first element in an open archive group. + A valid group MUST have ')' as the last character. */ +- const char *e = p + nlen; ++ const char *e = p; + do + { + e = next_token (e); +@@ -3084,19 +3084,19 @@ parse_file_seq (char **stringp, unsigned + Go to the next item in the string. */ + if (flags & PARSEFS_NOGLOB) + { +- NEWELT (concat (2, prefix, tp)); ++ NEWELT (concat (2, prefix, tmpbuf)); + continue; + } + + /* If we get here we know we're doing glob expansion. + TP is a string in tmpbuf. NLEN is no longer used. + We may need to do more work: after this NAME will be set. */ +- name = tp; ++ name = tmpbuf; + + /* Expand tilde if applicable. */ +- if (tp[0] == '~') ++ if (tmpbuf[0] == '~') + { +- tildep = tilde_expand (tp); ++ tildep = tilde_expand (tmpbuf); + if (tildep != 0) + name = tildep; + } +@@ -3152,7 +3152,10 @@ parse_file_seq (char **stringp, unsigned + else + { + /* We got a chain of items. Attach them. */ +- (*newp)->next = found; ++ if (*newp) ++ (*newp)->next = found; ++ else ++ *newp = found; + + /* Find and set the new end. Massage names if necessary. */ + while (1) +Index: tests/ChangeLog +=================================================================== +RCS file: /sources/make/make/tests/ChangeLog,v +retrieving revision 1.150 +retrieving revision 1.151 +diff -u -p -u -p -r1.150 -r1.151 +--- tests/ChangeLog 10 Aug 2010 07:35:34 -0000 1.150 ++++ tests/ChangeLog 14 Aug 2010 02:50:14 -0000 1.151 +@@ -1,3 +1,11 @@ ++2010-08-13 Paul Smith ++ ++ * scripts/features/archives: New regression tests for archive ++ support. Test for fix to Savannah bug #30612. ++ ++ * run_make_tests.pl (set_more_defaults): Set a %FEATURES hash to ++ the features available in $(.FEATURES). ++ + 2010-08-10 Paul Smith + + * scripts/features/reinvoke: Ensure command line variable settings +Index: tests/run_make_tests.pl +=================================================================== +RCS file: /sources/make/make/tests/run_make_tests.pl,v +retrieving revision 1.32 +retrieving revision 1.33 +diff -u -p -u -p -r1.32 -r1.33 +--- tests/run_make_tests.pl 13 Jul 2010 01:20:43 -0000 1.32 ++++ tests/run_make_tests.pl 14 Aug 2010 02:50:14 -0000 1.33 +@@ -29,6 +29,7 @@ + # You should have received a copy of the GNU General Public License along with + # this program. If not, see . + ++%FEATURES = (); + + $valgrind = 0; # invoke make with valgrind + $valgrind_args = ''; +@@ -367,6 +368,8 @@ sub set_more_defaults + $parallel_jobs = 1; + } + ++ %FEATURES = map { $_ => 1 } split /\s+/, `sh -c "echo '\\\$(info \\\$(.FEATURES))' | $make_path -f- 2>/dev/null"`; ++ + # Set up for valgrind, if requested. + + if ($valgrind) { +Index: tests/scripts/features/archives +=================================================================== +RCS file: tests/scripts/features/archives +diff -N tests/scripts/features/archives +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ tests/scripts/features/archives 14 Aug 2010 02:50:14 -0000 1.1 +@@ -0,0 +1,42 @@ ++# -*-mode: perl-*- ++ ++$description = "Test GNU make's archive management features."; ++ ++$details = "\ ++This only works on systems that support it."; ++ ++# If this instance of make doesn't support archives, skip it ++exists $FEATURES{archives} or return -1; ++ ++# Create some .o files to work with ++utouch(-60, qw(a1.o a2.o a3.o)); ++ ++# Very simple ++run_make_test('all: libxx.a(a1.o)', ++ '', "ar rv libxx.a a1.o\nar: creating libxx.a\na - a1.o\n"); ++ ++# Multiple .o's. Add a new one to the existing library ++run_make_test('all: libxx.a(a1.o a2.o)', ++ '', "ar rv libxx.a a2.o\na - a2.o\n"); ++ ++# Touch one of the .o's so it's rebuilt ++utouch(-40, 'a1.o'); ++run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n"); ++ ++# Use wildcards ++run_make_test('all: libxx.a(*.o)', ++ '', "#MAKE#: Nothing to be done for `all'.\n"); ++ ++# Touch one of the .o's so it's rebuilt ++utouch(-30, 'a1.o'); ++run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n"); ++ ++# Use both wildcards and simple names ++utouch(-50, 'a2.o'); ++run_make_test('all: libxx.a(a3.o *.o)', '', ++ "ar rv libxx.a a3.o\na - a3.o\nar rv libxx.a a2.o\nr - a2.o\n"); ++ ++rmfiles(qw(a1.o a2.o a3.o libxx.a)); ++ ++# This tells the test driver that the perl test script executed properly. ++1; diff --git a/make-savannah-bug30723-expand_makeflags_before_reexec.diff b/make-savannah-bug30723-expand_makeflags_before_reexec.diff new file mode 100644 index 0000000..eaecb98 --- /dev/null +++ b/make-savannah-bug30723-expand_makeflags_before_reexec.diff @@ -0,0 +1,85 @@ +Index: ChangeLog +=================================================================== +RCS file: /sources/make/make/ChangeLog,v +retrieving revision 2.418 +retrieving revision 2.419 +diff -u -p -u -p -r2.418 -r2.419 +--- ChangeLog 7 Aug 2010 08:55:17 -0000 2.418 ++++ ChangeLog 10 Aug 2010 07:35:34 -0000 2.419 +@@ -1,3 +1,8 @@ ++2010-08-10 Paul Smith ++ ++ * main.c (main): Expand MAKEFLAGS before adding it to the ++ environment when re-exec'ing. Fixes Savannah bug #30723. ++ + 2010-07-28 Paul Smith + + Version 3.82 released. +Index: main.c +=================================================================== +RCS file: /sources/make/make/main.c,v +retrieving revision 1.243 +retrieving revision 1.244 +diff -u -p -u -p -r1.243 -r1.244 +--- main.c 19 Jul 2010 07:10:53 -0000 1.243 ++++ main.c 10 Aug 2010 07:35:34 -0000 1.244 +@@ -2093,7 +2093,7 @@ main (int argc, char **argv, char **envp + const char *pv = define_makeflags (1, 1); + char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1); + sprintf (p, "MAKEFLAGS=%s", pv); +- putenv (p); ++ putenv (allocated_variable_expand (p)); + } + + if (ISDB (DB_BASIC)) +Index: tests/ChangeLog +=================================================================== +RCS file: /sources/make/make/tests/ChangeLog,v +retrieving revision 1.149 +retrieving revision 1.150 +diff -u -p -u -p -r1.149 -r1.150 +--- tests/ChangeLog 28 Jul 2010 05:39:50 -0000 1.149 ++++ tests/ChangeLog 10 Aug 2010 07:35:34 -0000 1.150 +@@ -1,3 +1,8 @@ ++2010-08-10 Paul Smith ++ ++ * scripts/features/reinvoke: Ensure command line variable settings ++ are preserved across make re-exec. Tests Savannah bug #30723. ++ + 2010-07-28 Paul Smith + + * scripts/targets/POSIX: Compatibility issues with Solaris (and +Index: tests/scripts/features/reinvoke +=================================================================== +RCS file: /sources/make/make/tests/scripts/features/reinvoke,v +retrieving revision 1.7 +retrieving revision 1.8 +diff -u -p -u -p -r1.7 -r1.8 +--- tests/scripts/features/reinvoke 27 Jun 2005 22:18:47 -0000 1.7 ++++ tests/scripts/features/reinvoke 10 Aug 2010 07:35:34 -0000 1.8 +@@ -57,9 +57,24 @@ include $(F)', + # Now try with the file we're not updating being the actual file we're + # including: this and the previous one test different parts of the code. + +-run_make_test(undef, "F=b", "[ -f b ] || echo >> b\nhello\n") ++run_make_test(undef, 'F=b', "[ -f b ] || echo >> b\nhello\n") + + &rmfiles('a','b','c'); + ++# Ensure command line variables are preserved properly across re-exec ++# Tests for Savannah bug #30723 ++ ++run_make_test(' ++ifdef RECURSE ++-include foo30723 ++endif ++recurse: ; @$(MAKE) -f $(MAKEFILE_LIST) RECURSE=1 test ++test: ; @echo F.O=$(F.O) ++foo30723: ; @touch $@ ++', ++ '--no-print-directory F.O=bar', "F.O=bar\n"); ++ ++unlink('foo30723'); ++ + # This tells the test driver that the perl test script executed properly. + 1; diff --git a/make.changes b/make.changes index e0e373d..47a405c 100644 --- a/make.changes +++ b/make.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Sep 7 17:22:32 UTC 2010 - mhopf@novell.com + +- make-savannah-bug30612-handling_of_archives.diff + Fix Savannah bug #30612: handling of archive references with >1 object.. + Add oneshell to $(.FEATURES). + Fix the NEWS file to be accurate. +- make-savannah-bug30723-expand_makeflags_before_reexec.diff + Fix Savannah bug #30723: expand MAKEFLAGS before we re-exec after rebuilding + makefiles. + ------------------------------------------------------------------- Mon Aug 30 17:37:23 UTC 2010 - mhopf@novell.com diff --git a/make.spec b/make.spec index 99973fd..7cf7e6e 100644 --- a/make.spec +++ b/make.spec @@ -31,6 +31,8 @@ Summary: GNU make Source: make-%version.tar.bz2 Patch2: make-slowdown-parallelism.diff Patch3: make-disable-broken-tests.diff +Patch4: make-savannah-bug30723-expand_makeflags_before_reexec.diff +Patch5: make-savannah-bug30612-handling_of_archives.diff Patch64: make-library-search-path.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -41,6 +43,8 @@ The GNU make command with extensive documentation. %setup %patch2 %patch3 -p1 +%patch4 +%patch5 if [ %_lib == lib64 ]; then %patch64 fi From 3891dc8c1749c7c53b5d44ad68be84a491aa8b4b9381bf0277576180f2246c54 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 10 Sep 2010 13:08:38 +0000 Subject: [PATCH 4/4] Accepting request 47702 from Base:System checked in (request 47702) OBS-URL: https://build.opensuse.org/request/show/47702 OBS-URL: https://build.opensuse.org/package/show/Base:System/make?expand=0&rev=13 --- make.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/make.spec b/make.spec index 7cf7e6e..8eee79e 100644 --- a/make.spec +++ b/make.spec @@ -1,5 +1,5 @@ # -# spec file for package make (Version 3.81) +# spec file for package make (Version 3.82) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -26,13 +26,13 @@ Provides: gmake PreReq: %install_info_prereq AutoReqProv: on Version: 3.82 -Release: 131 +Release: 1 Summary: GNU make Source: make-%version.tar.bz2 Patch2: make-slowdown-parallelism.diff -Patch3: make-disable-broken-tests.diff -Patch4: make-savannah-bug30723-expand_makeflags_before_reexec.diff -Patch5: make-savannah-bug30612-handling_of_archives.diff +Patch3: make-disable-broken-tests.diff +Patch4: make-savannah-bug30723-expand_makeflags_before_reexec.diff +Patch5: make-savannah-bug30612-handling_of_archives.diff Patch64: make-library-search-path.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build