This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make LTO Patch for Job Server Thread Detection Agnostic


On Thu, 27 Feb 2020 at 16:18, Nicholas Krause <xerofoify@gmail.com> wrote:
>
>
>
> On 2/27/20 3:44 AM, Jonathan Wakely wrote:
> > On Thu, 27 Feb 2020 at 06:50, Nicholas Krause <xerofoify@gmail.com> wrote:
> >> Greetings Martin,
> >>
> >> This patch:
> >> https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/lto-wrapper.c;h=353187c60434f43a445e708dcfbf53c857f8cdc1;hp=946897726d03716f7c93f955c438ee4f8190044c;hb=f12fbeb535f192f742025cc4f9b69a48136730f1;hpb=80c7cb9d2c8090f8d165ee2ca5f8d401090c1d06
> >>
> >> May have a small problem with the lines:
> >> +  const char *makeflags = getenv ("MAKEFLAGS");
> >> +  if (makeflags == NULL)
> >> +    return false; I'm not sure if ninja or other build systems use that
> >> for detection or have it as a variable you can use. This may be an issue
> >> with ninja, cmake and other build systems that may not have it. Maybe
> >> I'm wrong but it may be good to check that, Nick
> > The patch is to use Make's jobserver, it's not expected to work with
> > arbitrary build systems.
> >
> > Martin, the comment in your patch says "-std=c11" which should be c++11.
>
> Jonathan,
>
> That's a problem then as were assuming a user's build system for this to
> work. I mean
> for now its fine but in the future wouldn't it de a good ideal to not
> assume this?

It works fine for everybody. There's just an optimisation for people
with a GNU make jobserver available. I don't see a problem.

If somebody wants to add an optimisation for their preferred build
system they can propose a patch.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]