components/make/patches/33873.patch
branchs11-sru
changeset 2322 62b81b3d31fe
equal deleted inserted replaced
2321:87c74fb0d4b7 2322:62b81b3d31fe
       
     1 This patch is taken from:
       
     2 http://cvs.savannah.gnu.org/viewvc/make/main.c?root=make&r1=1.246&r2=1.247
       
     3 
       
     4 When we re-exec the master makefile in a jobserver environment, ensure
       
     5 that MAKEFLAGS is set properly so the re-exec'd make runs in parallel.
       
     6 See Savannah bug #33873.
       
     7 
       
     8 bug #33873: MAKEFLAGS=-jN gets lost on reexec
       
     9 https://savannah.gnu.org/bugs/?33873
       
    10 
       
    11 sr #107487: MAKEFLAGS not being honored always (regression) in 3.82
       
    12 https://savannah.gnu.org/support/index.php?107487
       
    13 
       
    14 --- a/main.c	2010/08/29 23:05:27	1.246
       
    15 +++ b/main.c	2011/09/18 23:39:26	1.247
       
    16 @@ -2088,6 +2088,11 @@
       
    17  
       
    18            ++restarts;
       
    19  
       
    20 +          /* If we're re-exec'ing the first make, put back the number of
       
    21 +             job slots so define_makefiles() will get it right.  */
       
    22 +          if (master_job_slots)
       
    23 +            job_slots = master_job_slots;
       
    24 +
       
    25            /* Reset makeflags in case they were changed.  */
       
    26            {
       
    27              const char *pv = define_makeflags (1, 1);
       
    28 @@ -2824,9 +2829,6 @@
       
    29  		       && (*(unsigned int *) cs->value_ptr ==
       
    30  			   *(unsigned int *) cs->noarg_value))
       
    31  		ADD_FLAG ("", 0); /* Optional value omitted; see below.  */
       
    32 -	      else if (cs->c == 'j')
       
    33 -		/* Special case for `-j'.  */
       
    34 -		ADD_FLAG ("1", 1);
       
    35  	      else
       
    36  		{
       
    37  		  char *buf = alloca (30);