From patchwork Tue Dec 11 08:01:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 205135 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 34B4C2C0081 for ; Tue, 11 Dec 2012 19:04:04 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1355817845; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version: Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=q4yHy7f1Yv7XW2pUxPXskpaZbEg=; b=DUOdZoLxcFPAvEu w/t3x90zpK/3gHHHZ+44ADM3v1pGSQcjrEVi5NwtZ7BxLT2tNSYaUwR/LA+UOWUy w+RdzPhzEyS1vho5U/i1/2rEmuoik0/ehVQ2zriL9pC335q1ylSctp/V1PuDUSjI ngYs2I5OgoulyuhNTibJ9CZfHAqs= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=tFhzlxGABwsSAY3mC751RKoP3S1zLLxHM+YVHqFO0o+t7VTX/OiU11jQDBZn1e TqmOBQUNfbLXMO1oK5U2uIZFGt7VNpNACLzK6xMtRdSbhyv10hUpul9gBg5CHEls 9VpJXPZ8fqjRBhtbhfZsRvaUrW3dozbXNl9lDr0GLRvOA=; Received: (qmail 29849 invoked by alias); 11 Dec 2012 08:03:54 -0000 Received: (qmail 29839 invoked by uid 22791); 11 Dec 2012 08:03:53 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Dec 2012 08:03:47 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id EE5FCCB3DAA for ; Tue, 11 Dec 2012 09:03:51 +0100 (CET) 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 HRUQY7meqHHO for ; Tue, 11 Dec 2012 09:03:51 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id BA274CB3DA7 for ; Tue, 11 Dec 2012 09:03:51 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Do not invoke gnatls unconditionally Date: Tue, 11 Dec 2012 09:01:17 +0100 Message-ID: <2635349.Pv1Pabyczp@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.16-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 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 Even if the Ada language isn't enabled, the Make-lang.in fragment of the Ada compiler is processed and invokes gnatls unconditionally, which can result in error messages if the command isn't present. Tested on x86_64-suse-linux, applied on the mainline. 2012-12-11 Eric Botcazou * gcc-interface/Make-lang.in (RTS_DIR): Define only if Ada is enabled. Index: gcc-interface/Make-lang.in =================================================================== --- gcc-interface/Make-lang.in (revision 194382) +++ gcc-interface/Make-lang.in (working copy) @@ -122,7 +122,9 @@ ifeq ($(build), $(host)) # put the host RTS dir first in the PATH to hide the default runtime # files that are among the sources - RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib ))) + ifneq ($(findstring ada,$(LANGUAGES)),) + RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib ))) + endif ADA_TOOLS_FLAGS_TO_PASS=\ CC="$(CC)" \ @@ -157,7 +159,9 @@ else else # This is a canadian cross. We should use a toolchain running on the # build platform and targeting the host platform. - RTS_DIR:=$(strip $(subst \,/,$(shell $(GNATLS_FOR_HOST) -v | grep adalib ))) + ifneq ($(findstring ada,$(LANGUAGES)),) + RTS_DIR:=$(strip $(subst \,/,$(shell $(GNATLS_FOR_HOST) -v | grep adalib ))) + endif ADA_TOOLS_FLAGS_TO_PASS=\ CC="$(CC)" \ $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \