From owner-svn-ports-all@freebsd.org Sun Jun 5 16:54:20 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 455FDB69319; Sun, 5 Jun 2016 16:54:20 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay115.isp.belgacom.be (mailrelay115.isp.belgacom.be [195.238.20.142]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3161314CE; Sun, 5 Jun 2016 16:54:18 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DFBABMWFRX/36LsFtcgzpJgQq6YoF6hhICgRo5FAEBAQEBAQFlJ0ESAYNxAQEBBCcvIxALEQMBAgEJGgsPKhYIBhOIM7h4AQEBAQEBAQEBAQEBAQEBAQESDop0hGCFHhwBBIgChWSBMokwgy2Kb3CBA401hjuJHx42gjmBNzoyh32CNQEBAQ Received: from 126.139-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.139.126]) by relay.skynet.be with ESMTP; 05 Jun 2016 18:54:16 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id u55GsF8q062911; Sun, 5 Jun 2016 18:54:15 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sun, 5 Jun 2016 18:54:14 +0200 From: Tijl Coosemans To: Christoph Moench-Tegeder Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r416393 - in head: deskutils/tomboy devel/gmake devel/ocaml-deriving-ocsigen/files games/0ad/files Message-ID: <20160605185414.30f86a7b@kalimero.tijl.coosemans.org> In-Reply-To: <20160605160512.GA1535@elch.exwg.net> References: <201606051435.u55EZ2q0028696@repo.freebsd.org> <20160605160512.GA1535@elch.exwg.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/LJVPmaxxP9JVZtAp5o6Dy/V" X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2016 16:54:20 -0000 --MP_/LJVPmaxxP9JVZtAp5o6Dy/V Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sun, 5 Jun 2016 18:05:12 +0200 Christoph Moench-Tegeder wrote: > ## Tijl Coosemans (tijl@FreeBSD.org): >> Log: >> - Update devel/gmake to 4.2. > > Here it breaks www/firefox' build, right this way: Can you try the attached patch for devel/gmake? --MP_/LJVPmaxxP9JVZtAp5o6Dy/V Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=gmake.patch Index: devel/gmake/Makefile =================================================================== --- devel/gmake/Makefile (revision 416393) +++ devel/gmake/Makefile (working copy) @@ -3,6 +3,7 @@ PORTNAME= gmake PORTVERSION= 4.2 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= GNU/make DISTNAME= make-${PORTVERSION} Index: devel/gmake/files/patch-double-colon =================================================================== --- devel/gmake/files/patch-double-colon (nonexistent) +++ devel/gmake/files/patch-double-colon (working copy) @@ -0,0 +1,164 @@ +From 4762480ae9cb8df4878286411f178d32db14eff0 Mon Sep 17 00:00:00 2001 +From: Paul Smith +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 (struct file): make CONSIDERED an unsigned int. +* main.c (main): No longer need to reset CONSIDERED. +* remake.c (update_goal_chain): increment CONSIDERED rather than +inverting it between 0<->1. +(update_file_1): Reset CONSIDERED to 0 so it's re-considered. +(check_dep): Ditto. +* tests/scripts/features/double_colon: Add a regression test. +--- +diff --git a/filedef.h b/filedef.h +index 507a027..14b4187 100644 +--- filedef.h ++++ 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 --git a/main.c b/main.c +index 576f2e9..e606488 100644 +--- main.c ++++ main.c +@@ -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; +- + if (d->file->updated) + { + /* This makefile was updated. */ +diff --git a/remake.c b/remake.c +index df1a9e0..5d5d67a 100644 +--- remake.c ++++ 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 *goaldeps) + + 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 *goaldeps) + } + } + +- /* 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, unsigned int depth) + 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, unsigned int depth) + /* 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 int depth, + /* 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 --git a/tests/scripts/features/double_colon b/tests/scripts/features/double_colon +index 80ddb31..58f126f 100644 +--- tests/scripts/features/double_colon ++++ 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"); ++ ++unlink('joe-is-forced'); ++ + # This tells the test driver that the perl test script executed properly. + 1; + +-- +cgit v0.9.0.2 Property changes on: devel/gmake/files/patch-double-colon ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property --MP_/LJVPmaxxP9JVZtAp5o6Dy/V--