From patchwork Mon Oct 4 13:17:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 66648 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 97562B70AB for ; Tue, 5 Oct 2010 00:17:25 +1100 (EST) Received: (qmail 27794 invoked by alias); 4 Oct 2010 13:17:24 -0000 Received: (qmail 27785 invoked by uid 22791); 4 Oct 2010 13:17:23 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Oct 2010 13:17:15 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 6A895CB025B; Mon, 4 Oct 2010 15:17:13 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AAG6SWqmZBKJ; Mon, 4 Oct 2010 15:17:13 +0200 (CEST) Received: from saumur.act-europe.fr (saumur.act-europe.fr [10.10.0.183]) by mel.act-europe.fr (Postfix) with ESMTP id 53FE6CB01DD; Mon, 4 Oct 2010 15:17:13 +0200 (CEST) Received: by saumur.act-europe.fr (Postfix, from userid 525) id 3840ED9BB4; Mon, 4 Oct 2010 15:17:13 +0200 (CEST) Date: Mon, 4 Oct 2010 15:17:13 +0200 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Vincent Celier Subject: [Ada] Simultaneous compilations and -gnateG Message-ID: <20101004131713.GA17826@adacore.com> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.9i X-IsSubscribed: yes 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 When there are several simultaneous compilations, the compilation switch -gnateG (generate preprocessed source) is used and the same preprocessed source is necessary for several of these simultaneous compilation, one or several compilations may fail. This patch makes sure that no compilation will fail for the reason that the processed file cannot be saved to disk. The test for this is to invoke gnatmake with -f -j20 -gnateD... -gnateG a main that withs many package spec that in turn with the same spec that needs to be preprocessed. There should not be any compilation failure if the same invocation of gnatmake succeeds without the -j switch. Tested on x86_64-pc-linux-gnu, committed on trunk 2010-10-04 Vincent Celier * sinput-l.adb (Load_File): Do not fail when switch -gnateG is specified and the processed file cannot be written. Just issue a warning and continue. Index: sinput-l.adb =================================================================== --- sinput-l.adb (revision 164906) +++ sinput-l.adb (working copy) @@ -591,10 +591,9 @@ package body Sinput.L is if not Status then Errout.Error_Msg - ("could not write processed file """ & + ("?could not write processed file """ & Name_Buffer (1 .. Name_Len) & '"', Lo); - return No_Source_File; end if; end; end if;