From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075068.outbound.protection.outlook.com [40.92.75.68]) by sourceware.org (Postfix) with ESMTPS id BDE0D3986402 for ; Wed, 14 Jul 2021 15:56:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BDE0D3986402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hotmail.de ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LGwegpoey2+Fzz20Vo4USqN2uZfypBCcgidFbhgO7vwuXHDma7y9+DZl90x+w3P6UBS7nw63SiXNSMkyChvmc6Jdlno3OTHnMn3AHElRRdLH9S659KJWCF7/EZs2wP9g9jqJsajRmzZx4OpbGyhFI7JGiAFYWSn91mrYBu8/xBMa6h4t4JyFmBRFhJrBP0ewkFIta9Hyi0geia9xoH+X1P4NTh9d748DbTzOnTVt4gi27pRkvGdFujglJTdlyyjrfy6vWgHHW9sd3BNpQHIGdTYRYfDXyGDrCr9I/0rUMf9ZuY3FAuLLyy/5zjovh2IKsQtKPFHopyWUvguI/TuIkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YOvxZ+7Xj82O29inLv90MTYsTMstHBz3cFh/LKGQbXk=; b=BpThBX5xl17Xuw/9jKG3GvRAvF6R5XtevPfEecP+oltVyRw8tbHa8YlfbcpRiNG7qotB7eRvjybuFs8ssNSb8N6JbppmPaU8FPxCQrB0nbUiq20460BYOpKh/+3K5NAuQMNWJbfy4HRzIn2n+hHEIDnEiYJYxavvt+DThf971tKmSsgcCVgoAKGJWbVZ3zs73fqT1ukvWfjZ74WzGwsHwykffryIgMjiEGCw4kqRdIo23lOcNX5IpkJ0A/uPe90yeF0RXIOdRxHs70Gbbgm2t5aVnhkNtwsF3IzCLcyUokVJQ8l1GWoZn48z36M8RV+WW2tqmLh1Lekis5p7L0+Xpw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DB3EUR04FT045.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::4c) by DB3EUR04HT015.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::308) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Wed, 14 Jul 2021 15:56:31 +0000 Received: from AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2a01:111:e400:7e0c::43) by DB3EUR04FT045.mail.protection.outlook.com (2a01:111:e400:7e0c::291) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 15:56:31 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:BE53B6AA6A62EF52DBC9D59B0B123D15FA8EBE4E8DB30BA4F1A583E083DD057C; UpperCasedChecksum:32B33E7F8E1246E7F866F488F9C1D43530DCCAC62B7F9325A2CB22FF4879E399; SizeAsReceived:8263; Count:48 Received: from AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM ([fe80::2cfe:7434:1813:e18f]) by AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM ([fe80::2cfe:7434:1813:e18f%8]) with mapi id 15.20.4308.027; Wed, 14 Jul 2021 15:56:31 +0000 Subject: Re: [PATCH] Generate gimple-match.c and generic-match.c earlier To: Tamar Christina , Michael Matz Cc: "gcc-patches@gcc.gnu.org" , Richard Biener References: From: Bernd Edlinger Message-ID: Date: Wed, 14 Jul 2021 17:56:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TMN: [LBASzyGy8zmNbKf9rQWWrY7Io9C831rJ] X-ClientProxiedBy: FR0P281CA0048.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::10) To AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:364::23) X-Microsoft-Original-Message-ID: <92a3d28f-b66d-f31c-1384-7dc3ac319c5f@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (88.76.118.196) by FR0P281CA0048.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.12 via Frontend Transport; Wed, 14 Jul 2021 15:56:30 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 7afea1ff-ce6b-4dab-c56e-08d946dff2a0 X-MS-TrafficTypeDiagnostic: DB3EUR04HT015: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BttAaDh4aUJmTDHQwfCgOa46SgMXOLrwr2jAlU5uS9/fY6KM/XlRNMhperC5XtzxDpBuPXSHJMWKSzWUb2RfldETb8QEjkuReKMBo6/JFxurixEqUZjg7PxMokhmgHojWbwJstJDMynpkqOrztpwJG1P6G+xp7BJPCb2EhmCf8QaW+VcthP0sYCnbVg/T/LF9zkEx1rl0Im8CI3V4HctOUZLxBgo+X8rrUNCkCgm1gkF2rGxIk8hylQLipmslF8ZCRvueJkJLl6IxQ4wtafJDcptw3iVAwZgR3xx5jT00Y2eSknkct+xL2c53/p4Ej111q2I8HaFNmE8h1Pp3ENjUj6hLea6FtOEPSV7CQy0Bn62hmXd5a4aj3+Ie5TQf6rLx7osCMEyfBEM3PQsiSsQEtkVEij+xtwejIF/aWL3v4Nic1+c18wGRxKWu8EH4tGcam6ifkBcODf11u2FpXKdT/ALa+KCxrOBqxnmauJgHQQ= X-MS-Exchange-AntiSpam-MessageData: UasHcP1z13ahBl4mkVPk8fn410RfF7P9RjgfPYGXOtVIyH5PtI/Nra+ePaZZjdTWrQYPEVlysNAqbbPHv0PS1YoHeY84gzcMexiE5gqFnmhWy0ZH5wVcVt4zxOv5pugnKPx4K38sWfnLj6Pachs0lQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7afea1ff-ce6b-4dab-c56e-08d946dff2a0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 15:56:31.5832 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB3EUR04FT045.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3EUR04HT015 X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, FORGED_MUA_MOZILLA, FREEMAIL_FROM, KAM_DMARC_STATUS, KAM_SHORT, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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 15:56:35 -0000 On 7/14/21 2:47 PM, Tamar Christina 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. > Sorry for the breakage! I do not know this tool at all, but this here looks suspicious, as it it by-passes the dependencies in the top-level Makefile: https://github.com/crosstool-ng/crosstool-ng/blob/755850d07ec4e8dc44787d1a0e35fe19507f17f6/scripts/build/cc/gcc.sh#L682-L683 CT_DoExecLog CFG make ${CT_JOBSFLAGS} configure-gcc configure-libcpp configure-build-libiberty CT_DoExecLog ALL make ${CT_JOBSFLAGS} all-libcpp all-build-libiberty ... https://github.com/crosstool-ng/crosstool-ng/blob/755850d07ec4e8dc44787d1a0e35fe19507f17f6/scripts/build/cc/gcc.sh#L711-L712 CT_DoExecLog ALL make ${CT_JOBSFLAGS} -C gcc ${libgcc_rule} \ ${repair_cc} but the top-level Makefile has also a dependency to all-build-libcpp: dependencies = { module=all-gcc; on=all-build-libcpp; }; dependencies = { module=all-gcc; on=all-libcpp; hard=true; }; Maybe this just worked by chance, when building with "make -j" started a parallel build, might build the build-libcpp dependency eventually, but due to the patch it is needed earlier? Bernd. > Any ideas what's going on? > > 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 >>>