From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id 946253864826 for ; Wed, 14 Jul 2021 13:12:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 946253864826 Received: by mail-ed1-x533.google.com with SMTP id ee25so3033716edb.5 for ; Wed, 14 Jul 2021 06:12:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BfDtnt0F7uTJsIcuRKp7WUCCUgihMXGsujhJf3PxEDE=; b=kUGjwVJ2rYBvtjAu+y8A47cBmGh7SBH7HmxawI9I2cw9KTMLv8R4pnyKggoTqx80Nt w8gLeBRgqvy+jRLxfFB7VIa2gLledpKcBB/NPyyMpjB7eMDsoWbksExQhxnwkrpMjrt7 q0bT6p1pkHYsa+53DBQ2fo6u7a55wTzZS9Pz+i6JGZ2/i8HZe9jh9KKkmvkkb29SPL/z fOxJAJXIuFnKqb3Hwd9/eo6NcNl5P/RhCMhGZ2Qx3LE8fndZyUyO0Re1iKwy37cyzykQ uH4P1XS4+Sd+iYFjS9jMxA4CNcDuetxgbY9HY3ubJgAOWe/nB6DdpCwdkQbv/yyI1ZYg KQQQ== X-Gm-Message-State: AOAM531eXR22Q5/vZZCQFx8I38RIEdV2pVv7JdNhi/Ji2Ss/P1wtYbE8 SdQnSRqzeiw/msi0au1MxSml2Jp0PnSCpEvKv6A= X-Google-Smtp-Source: ABdhPJyc1zSljXnVOyXcUi90H1B+O3ZaToWVN79wYLHclz0Jp57pJOLwBxwOBToxI7j97LqSmn8lR8F20eFKHFVWKxM= X-Received: by 2002:aa7:c808:: with SMTP id a8mr13721406edt.245.1626268377530; Wed, 14 Jul 2021 06:12:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Wed, 14 Jul 2021 15:12:46 +0200 Message-ID: Subject: Re: [PATCH] Generate gimple-match.c and generic-match.c earlier To: Tamar Christina Cc: Michael Matz , Bernd Edlinger , Richard Biener , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2021 13:13:00 -0000 On Wed, Jul 14, 2021 at 2:48 PM Tamar Christina via Gcc-patches wrote: > > Hi, > > Ever since this commit > > commit c9114f2804b91690e030383de15a24e0b738e856 > Author: Bernd Edlinger > Date: Fri May 28 06:27:27 2021 +0200 > > Various tools have been having trouble with cross compilation resulting in > > make[2]: *** No rule to make target '../build-x86_64-build_pc-linux-gnu/libcpp/libcpp.a', needed by 'build/genmatch'. > > (took a while to track down). I don't understand this part of the build system well enough to know how to fix this. > It looks like `libcpp.a` has special handling for cross compilers which now seems to be broken. > > I can't reproduce it with our normal cross compiler scripts. Which handles the stages on its own, but e.g. > https://github.com/crosstool-ng/crosstool-ng does reproduce the failure. > > Any ideas what's going on? There should be a dependence of all-gcc to all-build-libcpp, Makefile.def has dependencies = { module=all-gcc; on=all-build-libcpp; }; so how come build-libcpp is not built when gcc/ starts? > Kind Regards, > Tamar > > > -----Original Message----- > > From: Gcc-patches On Behalf Of > > Michael Matz > > Sent: Friday, May 28, 2021 4:33 PM > > To: Bernd Edlinger > > Cc: gcc-patches@gcc.gnu.org; Richard Biener > > Subject: Re: [PATCH] Generate gimple-match.c and generic-match.c earlier > > > > Hello, > > > > On Fri, 28 May 2021, Bernd Edlinger wrote: > > > > > >> I was wondering, why gimple-match.c and generic-match.c are not > > > >> built early but always last, which slows down parallel makes > > > >> significantly. > > > >> > > > >> The reason seems to be that generated_files does not mention > > > >> gimple-match.c and generic-match.c. > > > >> > > > >> This comment in Makefile.in says it all: > > > >> > > > >> $(ALL_HOST_OBJS) : | $(generated_files) > > > >> > > > >> So this patch adds gimple-match.c generic-match.c to generated_files. > > > >> > > > >> > > > >> Tested on x86_64-pc-linux-gnu. > > > >> Is it OK for trunk? > > > > > > > > This should help for what I was complaining about in > > > > https://gcc.gnu.org/pipermail/gcc/2021-May/235963.html . I build > > > > with > > > > -j24 and it was stalling on compiling gimple-match.c for me. > > > > Looks like insn-attrtab.c is missed too; I saw genattrtab was running last > > too. > > > > > > > > > > Yeah, probably insn-automata.c as well, sometimes it is picked up > > > early sometimes not. maybe $(simple_generated_c) should be added to > > > generated_files, but insn-attrtab.c is yet another exception. > > > > You can't put files in there that are sometimes slow to generate (which insn- > > {attrtab,automata}.c are on some targets), as _everything_ then waits for > > them to be created first. > > > > Ideally there would be a way for gnumake to mark some targets as "ugh- > > slow" and back-propagate this to all dependencies so that those are put in > > front of the work queue in a parallel make. Alas, something like that never > > came into existence :-/ (When order-only deps were introduced I got > > excited, but then came to realize that that wasn't what was really needed for > > this case, a "weak" version of it would be required at least, or better yet a > > specific facility to impose a cost with a target) > > > > > > Ciao, > > Michael. > > > > > > > > > > > Bernd. > > > > > > > Thanks, > > > > Andrew > > > > > > > >> > > > >> > > > >> Thanks > > > >> Bernd. > > > >> > > > >> > > > >> 2021-05-28 Bernd Edlinger > > > >> > > > >> * Makefile.in (generated_files): Add gimple-match.c and > > > >> generic-match.c > > >