pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/gmake Update gmake to 4.2 (again), this time wit...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1ac1c58006b7
branches:  trunk
changeset: 347833:1ac1c58006b7
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Tue May 31 11:44:03 2016 +0000

description:
Update gmake to 4.2 (again), this time with an upstream patch

The patch fixes the firefox build issue:

>From 4762480ae9cb8df4878286411f178d32db14eff0 Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith%gnu.org@localhost>
Date: Tue, 31 May 2016 06:56:51 +0000
Subject: [SV 47995] Ensure forced double-colon rules work with -j.

The fix for SV 44742 had a side-effect that some double-colon targets
were skipped.  This happens because the "considered" facility assumed
that all targets would be visited on each walk through the dependency
graph: we used a bit for considered and toggled it on each pass; if
we didn't walk the entire graph on every pass the bit would get out
of sync.  The new behavior after SV 44742 might return early without
walking the entire graph.  To fix this I changed the considered value
to an integer which is monotonically increasing: it is then never
possible to incorrectly determine that a previous pass through the
graph already considered the current target.

diffstat:

 devel/gmake/Makefile                                           |   6 +-
 devel/gmake/distinfo                                           |  16 +-
 devel/gmake/patches/patch-filedef.h                            |  38 ++++
 devel/gmake/patches/patch-main.c                               |  53 ++--
 devel/gmake/patches/patch-makeint.h                            |  19 --
 devel/gmake/patches/patch-remake.c                             |  91 ++++++++++
 devel/gmake/patches/patch-tests_scripts_features_double__colon |  42 ++++
 7 files changed, 210 insertions(+), 55 deletions(-)

diffs (truncated from 305 to 300 lines):

diff -r b2fcfc062f76 -r 1ac1c58006b7 devel/gmake/Makefile
--- a/devel/gmake/Makefile      Tue May 31 09:58:59 2016 +0000
+++ b/devel/gmake/Makefile      Tue May 31 11:44:03 2016 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.97 2016/05/31 06:53:13 tnn Exp $
+# $NetBSD: Makefile,v 1.98 2016/05/31 11:44:03 wiz Exp $
 
-DISTNAME=      make-4.1
+DISTNAME=      make-4.2
 PKGNAME=       g${DISTNAME}
-PKGREVISION=   2
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GNU:=make/}
 EXTRACT_SUFX=  .tar.bz2
diff -r b2fcfc062f76 -r 1ac1c58006b7 devel/gmake/distinfo
--- a/devel/gmake/distinfo      Tue May 31 09:58:59 2016 +0000
+++ b/devel/gmake/distinfo      Tue May 31 11:44:03 2016 +0000
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.28 2016/05/31 06:53:13 tnn Exp $
+$NetBSD: distinfo,v 1.29 2016/05/31 11:44:03 wiz Exp $
 
-SHA1 (make-4.1.tar.bz2) = 0d701882fd6fd61a9652cb8d866ad7fc7de54d58
-RMD160 (make-4.1.tar.bz2) = 0f322d6c28867ea817f7d02c57e635c8ef556909
-SHA512 (make-4.1.tar.bz2) = 3fcaf06660b7a5019937b81ee69fe54cdfe0a24d66286fc5cc6a34fa996d76dfe6fd5bc49ee59b727ae2b24ddca261ada0fdb5873ba2b38dcc63647ad3cdb193
-Size (make-4.1.tar.bz2) = 1327342 bytes
+SHA1 (make-4.2.tar.bz2) = d78b84a219b4c16593544f541dff7eb765ce3d74
+RMD160 (make-4.2.tar.bz2) = 606bc7508a2b7313d0dafb18a1992c4d12782dc7
+SHA512 (make-4.2.tar.bz2) = 2e8668a130dadc9885a67d80032bf5554c6456741153f3224a4f0eb17ac268b22f062f9e4d66aedda4d1c926494c0b493fe5e941fb5d28ead6adbdf2f09d9128
+Size (make-4.2.tar.bz2) = 1400539 bytes
 SHA1 (patch-af) = 8ff060ecba9d664044eabd98741253881d8c9bbe
-SHA1 (patch-main.c) = 6674cc95ce702c06b8214963bcb43bde3919be4f
-SHA1 (patch-makeint.h) = edfb71f3b41bf3bc4c66d948e3001b5502add6c3
+SHA1 (patch-filedef.h) = e6e9f588101a7b876634aee39e677eb48435c3a2
+SHA1 (patch-main.c) = 81259f9b9486055d81f6f32b4e17e1fb2f40d95c
 SHA1 (patch-pa) = 2c0168db7afec3da98b30392290e5b9464ea7b5e
+SHA1 (patch-remake.c) = a2ebf6678d14b848198e81908eba153b7a3056ec
+SHA1 (patch-tests_scripts_features_double__colon) = cff26c5b216ea623646650a69a0f5ce4a9e1a327
diff -r b2fcfc062f76 -r 1ac1c58006b7 devel/gmake/patches/patch-filedef.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gmake/patches/patch-filedef.h       Tue May 31 11:44:03 2016 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-filedef.h,v 1.1 2016/05/31 11:44:03 wiz Exp $
+
+From 4762480ae9cb8df4878286411f178d32db14eff0 Mon Sep 17 00:00:00 2001
+From: Paul Smith <psmith%gnu.org@localhost>
+Date: Tue, 31 May 2016 06:56:51 +0000
+Subject: [SV 47995] Ensure forced double-colon rules work with -j.
+
+The fix for SV 44742 had a side-effect that some double-colon targets
+were skipped.  This happens because the "considered" facility assumed
+that all targets would be visited on each walk through the dependency
+graph: we used a bit for considered and toggled it on each pass; if
+we didn't walk the entire graph on every pass the bit would get out
+of sync.  The new behavior after SV 44742 might return early without
+walking the entire graph.  To fix this I changed the considered value
+to an integer which is monotonically increasing: it is then never
+possible to incorrectly determine that a previous pass through the
+graph already considered the current target.
+
+--- filedef.h.orig     2016-05-21 20:21:52.000000000 +0000
++++ filedef.h
+@@ -58,6 +58,8 @@ struct file
+     FILE_TIMESTAMP last_mtime;  /* File's modtime, if already known.  */
+     FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
+                                            has been performed.  */
++    unsigned int considered;    /* equal to 'considered' if file has been
++                                   considered on current scan of goal chain */
+     int command_flags;          /* Flags OR'd in for cmds; see commands.h.  */
+     enum update_status          /* Status of the last attempt to update.  */
+       {
+@@ -96,8 +98,6 @@ struct file
+     unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name.  */
+     unsigned int pat_searched:1;/* Nonzero if we already searched for
+                                    pattern-specific variables.  */
+-    unsigned int considered:1;  /* equal to 'considered' if file has been
+-                                   considered on current scan of goal chain */
+     unsigned int no_diag:1;     /* True if the file failed to update and no
+                                    diagnostics has been issued (dontcare). */
+   };
diff -r b2fcfc062f76 -r 1ac1c58006b7 devel/gmake/patches/patch-main.c
--- a/devel/gmake/patches/patch-main.c  Tue May 31 09:58:59 2016 +0000
+++ b/devel/gmake/patches/patch-main.c  Tue May 31 11:44:03 2016 +0000
@@ -1,30 +1,31 @@
-$NetBSD: patch-main.c,v 1.3 2016/05/31 06:53:13 tnn Exp $
+$NetBSD: patch-main.c,v 1.4 2016/05/31 11:44:03 wiz Exp $
+
+From 4762480ae9cb8df4878286411f178d32db14eff0 Mon Sep 17 00:00:00 2001
+From: Paul Smith <psmith%gnu.org@localhost>
+Date: Tue, 31 May 2016 06:56:51 +0000
+Subject: [SV 47995] Ensure forced double-colon rules work with -j.
 
-* [SV 43434] Handle NULL returns from ttyname().
+The fix for SV 44742 had a side-effect that some double-colon targets
+were skipped.  This happens because the "considered" facility assumed
+that all targets would be visited on each walk through the dependency
+graph: we used a bit for considered and toggled it on each pass; if
+we didn't walk the entire graph on every pass the bit would get out
+of sync.  The new behavior after SV 44742 might return early without
+walking the entire graph.  To fix this I changed the considered value
+to an integer which is monotonically increasing: it is then never
+possible to incorrectly determine that a previous pass through the
+graph already considered the current target.
 
---- main.c.orig        2014-10-05 16:24:51.000000000 +0000
+--- main.c.orig        2016-05-21 20:21:52.000000000 +0000
 +++ main.c
-@@ -1401,13 +1401,18 @@ main (int argc, char **argv, char **envp
- #ifdef HAVE_ISATTY
-     if (isatty (fileno (stdout)))
-       if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT")))
--        define_variable_cname ("MAKE_TERMOUT", TTYNAME (fileno (stdout)),
--                               o_default, 0)->export = v_export;
+@@ -2262,10 +2262,6 @@ main (int argc, char **argv, char **envp
+ 
+             for (i = 0, d = read_files; d != 0; ++i, d = d->next)
+               {
+-                /* Reset the considered flag; we may need to look at the file
+-                   again to print an error.  */
+-                d->file->considered = 0;
 -
-+        {
-+          const char *tty = TTYNAME (fileno (stdout));
-+          define_variable_cname ("MAKE_TERMOUT", tty ? tty : DEFAULT_TTYNAME,
-+                                 o_default, 0)->export = v_export;
-+        }
-     if (isatty (fileno (stderr)))
-       if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR")))
--        define_variable_cname ("MAKE_TERMERR", TTYNAME (fileno (stderr)),
--                               o_default, 0)->export = v_export;
-+        {
-+          const char *tty = TTYNAME (fileno (stderr));
-+          define_variable_cname ("MAKE_TERMERR", tty ? tty : DEFAULT_TTYNAME,
-+                                 o_default, 0)->export = v_export;
-+        }
- #endif
- 
-   /* Reset in case the switches changed our minds.  */
+                 if (d->file->updated)
+                   {
+                     /* This makefile was updated.  */
diff -r b2fcfc062f76 -r 1ac1c58006b7 devel/gmake/patches/patch-makeint.h
--- a/devel/gmake/patches/patch-makeint.h       Tue May 31 09:58:59 2016 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-$NetBSD: patch-makeint.h,v 1.3 2016/05/31 06:53:13 tnn Exp $
-
-* [SV 43434] Handle NULL returns from ttyname().
-
---- makeint.h.orig     2014-10-05 16:24:51.000000000 +0000
-+++ makeint.h
-@@ -424,10 +424,11 @@ extern struct rlimit stack_limit;
- /* The number of bytes needed to represent the largest integer as a string.  */
- #define INTSTR_LENGTH         CSTRLEN ("18446744073709551616")
- 
-+#define DEFAULT_TTYNAME "true"
- #ifdef HAVE_TTYNAME
- # define TTYNAME(_f) ttyname (_f)
- #else
--# define TTYNAME(_f) "true"
-+# define TTYNAME(_f) DEFAULT_TTYNAME
- #endif
- 
- 
diff -r b2fcfc062f76 -r 1ac1c58006b7 devel/gmake/patches/patch-remake.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gmake/patches/patch-remake.c        Tue May 31 11:44:03 2016 +0000
@@ -0,0 +1,91 @@
+$NetBSD: patch-remake.c,v 1.3 2016/05/31 11:44:03 wiz Exp $
+
+From 4762480ae9cb8df4878286411f178d32db14eff0 Mon Sep 17 00:00:00 2001
+From: Paul Smith <psmith%gnu.org@localhost>
+Date: Tue, 31 May 2016 06:56:51 +0000
+Subject: [SV 47995] Ensure forced double-colon rules work with -j.
+
+The fix for SV 44742 had a side-effect that some double-colon targets
+were skipped.  This happens because the "considered" facility assumed
+that all targets would be visited on each walk through the dependency
+graph: we used a bit for considered and toggled it on each pass; if
+we didn't walk the entire graph on every pass the bit would get out
+of sync.  The new behavior after SV 44742 might return early without
+walking the entire graph.  To fix this I changed the considered value
+to an integer which is monotonically increasing: it is then never
+possible to incorrectly determine that a previous pass through the
+graph already considered the current target.
+
+--- remake.c.orig      2016-05-21 21:34:45.000000000 +0000
++++ remake.c
+@@ -57,8 +57,9 @@ unsigned int commands_started = 0;
+ static struct goaldep *goal_list;
+ static struct dep *goal_dep;
+ 
+-/* Current value for pruning the scan of the goal chain (toggle 0/1).  */
+-static unsigned int considered;
++/* Current value for pruning the scan of the goal chain.
++   All files start with considered == 0.  */
++static unsigned int considered = 0;
+ 
+ static enum update_status update_file (struct file *file, unsigned int depth);
+ static enum update_status update_file_1 (struct file *file, unsigned int depth);
+@@ -90,12 +91,12 @@ update_goal_chain (struct goaldep *goald
+ 
+   goal_list = rebuilding_makefiles ? goaldeps : NULL;
+ 
+-  /* All files start with the considered bit 0, so the global value is 1.  */
+-  considered = 1;
+-
+ #define MTIME(file) (rebuilding_makefiles ? file_mtime_no_search (file) \
+                      : file_mtime (file))
+ 
++  /* Start a fresh batch of consideration.  */
++  ++considered;
++
+   /* Update all the goals until they are all finished.  */
+ 
+   while (goals != 0)
+@@ -247,10 +248,10 @@ update_goal_chain (struct goaldep *goald
+             }
+         }
+ 
+-      /* If we reached the end of the dependency graph toggle the considered
+-         flag for the next pass.  */
++      /* If we reached the end of the dependency graph update CONSIDERED
++         for the next pass.  */
+       if (g == 0)
+-        considered = !considered;
++        ++considered;
+     }
+ 
+   if (rebuilding_makefiles)
+@@ -615,8 +616,8 @@ update_file_1 (struct file *file, unsign
+             break;
+ 
+           if (!running)
+-            /* The prereq is considered changed if the timestamp has changed while
+-               it was built, OR it doesn't exist.  */
++            /* The prereq is considered changed if the timestamp has changed
++               while it was built, OR it doesn't exist.  */
+             d->changed = ((file_mtime (d->file) != mtime)
+                           || (mtime == NONEXISTENT_MTIME));
+ 
+@@ -650,7 +651,7 @@ update_file_1 (struct file *file, unsign
+             /* We may have already considered this file, when we didn't know
+                we'd need to update it.  Force update_file() to consider it and
+                not prune it.  */
+-            d->file->considered = !considered;
++            d->file->considered = 0;
+ 
+             new = update_file (d->file, depth);
+             if (new > dep_status)
+@@ -1087,7 +1088,7 @@ check_dep (struct file *file, unsigned i
+               /* If the target was waiting for a dependency it has to be
+                  reconsidered, as that dependency might have finished.  */
+               if (file->command_state == cs_deps_running)
+-                file->considered = !considered;
++                file->considered = 0;
+ 
+               set_command_state (file, cs_not_started);
+             }
diff -r b2fcfc062f76 -r 1ac1c58006b7 devel/gmake/patches/patch-tests_scripts_features_double__colon
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gmake/patches/patch-tests_scripts_features_double__colon    Tue May 31 11:44:03 2016 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-tests_scripts_features_double__colon,v 1.1 2016/05/31 11:44:03 wiz Exp $
+
+From 4762480ae9cb8df4878286411f178d32db14eff0 Mon Sep 17 00:00:00 2001
+From: Paul Smith <psmith%gnu.org@localhost>
+Date: Tue, 31 May 2016 06:56:51 +0000
+Subject: [SV 47995] Ensure forced double-colon rules work with -j.
+
+The fix for SV 44742 had a side-effect that some double-colon targets
+were skipped.  This happens because the "considered" facility assumed
+that all targets would be visited on each walk through the dependency
+graph: we used a bit for considered and toggled it on each pass; if
+we didn't walk the entire graph on every pass the bit would get out
+of sync.  The new behavior after SV 44742 might return early without
+walking the entire graph.  To fix this I changed the considered value
+to an integer which is monotonically increasing: it is then never
+possible to incorrectly determine that a previous pass through the
+graph already considered the current target.
+
+--- tests/scripts/features/double_colon.orig   2016-05-21 21:34:45.000000000 +0000
++++ tests/scripts/features/double_colon
+@@ -197,6 +197,21 @@ all:: 3
+ ',
+               '-rs -j2 1 2 root', "all_one\nall_two\nroot\n");
+ 
++# SV 47995 : Parallel double-colon rules with FORCE
++
++run_make_test('
++all:: ; @echo one
++
++all:: joe ; @echo four
++
++joe: FORCE ; touch joe-is-forced
++
++FORCE:
++',
++              '-j5', "one\ntouch joe-is-forced\nfour\n");
++



Home | Main Index | Thread Index | Old Index