From patchwork Wed Sep 25 21:23:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 1167628 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-509585-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Cu0XHTXv"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="XioWh4n1"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46drdx52rDz9sP3 for ; Thu, 26 Sep 2019 07:23:49 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:in-reply-to:message-id:references:mime-version :content-type; q=dns; s=default; b=o6MZ+MHXpPvjuCu8rqBL7+gFLpCP/ 92KEJHtxkK+98UopHHGoUM/UxAhnmjkF8mOON5VH912Jg/fAI8tZ6VRDgMeMyNaU 1r/3ubWAniw3ppHIzF+WNdiOhGOEf+wz/ZXmbGfHbx6ftBeeXdrDZROOd2SX0olV rzUZvtT+u9sMyk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:in-reply-to:message-id:references:mime-version :content-type; s=default; bh=Rs2ZNG/UkyiV38fGOxnzK73wQ50=; b=Cu0 XHTXvlEcDcCVqbXKjSfVKiAovd7da9WhKXRW7R1bKqrVuaJ9q/Ir9lf2uVLEP91l 9Z95JlokuYzdI7QqVFtIEpYqy+N0PrlOw64DvuWq/btD+eDCtHymd5LCXwwYPVNt 60ehFBaSmvW+gRhVOVDRLHrHhCaYNA/jGZnR5POE= Received: (qmail 54764 invoked by alias); 25 Sep 2019 21:23:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 54710 invoked by uid 89); 25 Sep 2019 21:23:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=historical, nowadays, Leaving X-HELO: esa5.hgst.iphmx.com Received: from esa5.hgst.iphmx.com (HELO esa5.hgst.iphmx.com) (216.71.153.144) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Sep 2019 21:23:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1569446618; x=1600982618; h=date:from:to:subject:in-reply-to:message-id:references: mime-version; bh=FkKNx/j6LeJJGXmLFFABBYZZhmuhuPEJmq5vmlbTQ28=; b=XioWh4n1rOzue7h98gNrpijI2NdmGFetDEcVNlEAfYocos8uqpHvNhHG mWh3gpCf5iPgTCiJsD96Bq25llch4HPpN94uSy+S06MolNVSqjI+jKx0v 0ViO5sknAoFG4gqDmr5loPjvMz3y8mu1kQfZZNxH73rmbEfYN9QgdiFLA Z512dSuKgUdJSt/FnF+rPR0iipLZcICM4QyZK78RnaQBQVncbxfJBVljO xCvCPPO6R1qKj6VKcEP8nqwmoIXoF+gF23BuMlkTWw3/mEwxD/JhwTUdz UL5hINqtTF5rIol24+UCe7Hcw5ZfIZVA0l2YgdHBSistMIz5Z/q2aN2pQ g==; IronPort-SDR: UfR+AflkQdH67IXBXCsHgU+VtOkf+rQ/6KTC8KtnZ2D8n1sv62zaTSeklWxz2Rvf1O36JngX7d 4Kqy7jucNSKB/AfvdpR0v9I98S7wlYilZNfmB3fTVKHF+C5qbBnPpZYDwWolc6Cm75BorEz83V I7Kh1EWIHk8pty1BSSyIyGcfwzB1uqJ0f6mXlIeIFwXSy83TDVHYSfu6oVSTwH7EyEgiL2OIAB yTPfMEdv6ZgbPFMAb25JJOO4UtTRD3h3r5Y3zt6T08S7QJERIEPf7jRWtRESQG31WKIfbSgWuC ovs= Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 26 Sep 2019 05:23:26 +0800 IronPort-SDR: 27gqptYt+5MpCpHpNVF9vwzkDABK181fGERjxuMMEY/QZOdK08w4FbzsdWl51QnAz0EKxZIu7A a4R3YRpafF0QtYtIwpAc6tgVZfY/JG6Q7SPafZdhaolbtRaMRM+Xg59+jbaMp0JJxkW5K5LGwI yu8DXOkYcTBppA9CDYmnSNjqt3KTOlsQTrtnDOl0c3Smu6FluFTE90OfYzASZh0cp32Lun3vpO YwcxFjeT0VzS9kDwLr1veh2KbqerWI1JnnfarCgLKBkHCTW6Z53k+/EbPZgSgshBQ/Vm0wOM5Z 0bKNQL73wOLExBMYKDCT61VJ Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2019 14:19:42 -0700 IronPort-SDR: cNre9MHKgYZ5JFeYmIKVs3KAme0pblxTMZ/oUh/tnO/pc3W5WiqWdPvGj2FOCDEMByuWU5LDfx qNzKCJp1L52jPKnsq0CzH366cLnLLuVWcxY3ovlynBP+GelaClejWJZdAQSJSNBLwimNYNmpoc eku0ZQ7JdC4vY0S1v3G6u+7vOTYagMXzI3H+Li3AhoEUm2tCys2A5e0eanXq7TrJnoz7cMMIUM fBsINHoQbcJf1HITv6cnf4kQTcL5HuwxMDs79JP+hRZ0cx/ti40wMWJQMhG4Pp+0jKkxk5vFNl OGc= WDCIronportException: Internal Received: from unknown (HELO redsun52) ([10.149.66.28]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2019 14:23:25 -0700 Date: Wed, 25 Sep 2019 22:23:22 +0100 (BST) From: "Maciej W. Rozycki" To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] libada: Remove racy duplicate gnatlib installation In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 For some reason, presumably historical, the `install-gnatlib' target for the default multilib is invoked twice, once via the `ada.install-common' target in `gcc/ada/gcc-interface/Make-lang.in' invoked from gcc/ and again via the `install-libada' target in libada/. Apart from doing the same twice this is actually harmful in sufficiently parallelized `make' invocation, as the removal of old files performed within the `install-gnatlib' recipe in the former case actually races with the installation of new files done in the latter case, causing the recipe to fail and abort, however non-fatally, having not completed the installation of all the built files needed for the newly-built compiler to work correctly. This can be observed with a native `x86_64-linux-gnu' bootstrap: make[4]: Entering directory '.../gcc/ada' rm -rf .../lib/gcc/x86_64-linux-gnu/10.0.0/adalib rm: cannot remove '.../lib/gcc/x86_64-linux-gnu/10.0.0/adalib': Directory not empty make[4]: *** [gcc-interface/Makefile:512: install-gnatlib] Error 1 make[4]: Leaving directory '.../gcc/ada' make[3]: *** [.../gcc/ada/gcc-interface/Make-lang.in:853: install-gnatlib] Error 2 make[2]: [.../gcc/ada/gcc-interface/Make-lang.in:829: ada.install-common] Error 2 (ignored) which then causes missing files to be reported when an attempt is made to use the newly-installed non-functional compiler to build a `riscv-linux-gnu' cross-compiler: (cd ada/bldtools/sinfo; gnatmake -q xsinfo ; ./xsinfo sinfo.h ) error: "ada.ali" not found, "ada.ads" must be compiled error: "s-memory.ali" not found, "s-memory.adb" must be compiled gnatmake: *** bind failed. /bin/sh: ./xsinfo: No such file or directory make[2]: *** [.../gcc/ada/Make-generated.in:45: ada/sinfo.h] Error 127 make[2]: Leaving directory '.../gcc' make[1]: *** [Makefile:4369: all-gcc] Error 2 make[1]: Leaving directory '...' make: *** [Makefile:965: all] Error 2 Depending on timing `.../lib/gcc/x86_64-linux-gnu/10.0.0/adainclude' may cause an installation failure instead and the resulting compiler may be non-functional in a different way. Remove the extraneous `install-gnatlib' invocation from within gcc/ then as all the gnatlib handling ought to be done in libada/ nowadays. gcc/ada/ * gcc-interface/Make-lang.in (ada.install-common): Remove `install-gnatlib' invocation. --- gcc/ada/gcc-interface/Make-lang.in | 8 -------- 1 file changed, 8 deletions(-) gcc-lang-no-install-gnatlib.diff Index: gcc/gcc/ada/gcc-interface/Make-lang.in =================================================================== --- gcc.orig/gcc/ada/gcc-interface/Make-lang.in +++ gcc/gcc/ada/gcc-interface/Make-lang.in @@ -840,14 +840,6 @@ doc/gnat-style.pdf: ada/gnat-style.texi $(INSTALL_PROGRAM) gnatdll$(exeext) $(DESTDIR)$(bindir)/gnatdll$(exeext); \ fi -# -# Finally, install the library -# - -if [ -f gnat1$(exeext) ] ; \ - then \ - $(MAKE) $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib; \ - fi - install-gnatlib: $(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib$(LIBGNAT_TARGET)