From: rwild Date: Sun, 23 May 2010 14:36:07 +0000 (+0000) Subject: Honor $MAKE for -fwhopr=; do not honor $MAKEFLAGS, $MFLAGS. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c335b5feeb574fa90f128db8259591419ce34d4a;p=thirdparty%2Fgcc.git Honor $MAKE for -fwhopr=; do not honor $MAKEFLAGS, $MFLAGS. gcc/: * lto-wrapper.c (run_gcc): Unset MAKEFLAGS and MFLAGS before calling make; allow override through $MAKE. * doc/invoke.texi (Optimize Options): Document override. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159760 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a7a77433a09d..c8927954e4c9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-05-23 Ralf Wildenhues + + * lto-wrapper.c (run_gcc): Unset MAKEFLAGS and MFLAGS + before calling make; allow override through $MAKE. + * doc/invoke.texi (Optimize Options): Document override. + 2010-05-23 Anatoly Sokolov * config/rs6000/rs6000.c (rs6000_mode_dependent_address_p): New. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index c3e2d37c7e82..dbde14d22069 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -7459,7 +7459,8 @@ that otherwise would not fit in memory. This option enables If you specify the optional @var{n} the link stage is executed in parallel using @var{n} parallel jobs by utilizing an installed -@code{make} program. +@command{make} program. The environment variable @env{MAKE} may be +used to override the program used. Disabled by default. diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 3dbd96b7cbcb..f114dc611e7a 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -521,7 +521,12 @@ cont: fprintf (mstream, " \\\n\t%s", output_names[i]); fprintf (mstream, "\n"); fclose (mstream); - new_argv[0] = "make"; + /* Avoid passing --jobserver-fd= and similar flags. */ + putenv (xstrdup ("MAKEFLAGS=")); + putenv (xstrdup ("MFLAGS=")); + new_argv[0] = getenv ("MAKE"); + if (!new_argv[0]) + new_argv[0] = "make"; new_argv[1] = "-f"; new_argv[2] = makefile; snprintf (jobs, 31, "-j%d", parallel);