From patchwork Mon Oct 18 14:06:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 68195 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 55B2CB70EF for ; Tue, 19 Oct 2010 01:06:46 +1100 (EST) Received: (qmail 13103 invoked by alias); 18 Oct 2010 14:06:27 -0000 Received: (qmail 13029 invoked by uid 22791); 18 Oct 2010 14:06:26 -0000 X-SWARE-Spam-Status: No, hits=0.2 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) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Oct 2010 14:06:19 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 6A298CB025A; Mon, 18 Oct 2010 16:06:17 +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 l2C2J4PJlAjE; Mon, 18 Oct 2010 16:06:17 +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 57436CB0247; Mon, 18 Oct 2010 16:06:17 +0200 (CEST) Received: by saumur.act-europe.fr (Postfix, from userid 525) id 365BDD9BB4; Mon, 18 Oct 2010 16:06:17 +0200 (CEST) Date: Mon, 18 Oct 2010 16:06:17 +0200 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Vincent Celier Subject: [Ada] Switches for truncated file name on VMS Message-ID: <20101018140617.GA9692@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 On VMS, where the file names are case insensitive, if the spec and body suffixes in the naming scheme are in upper case, if a truncated file name (no suffix) is used to specify some switches, the file is not found and its switches are then incorrect. The test for that is to specify on VMS a naming scheme such as "_.ADA" and ".ADA" and Linker switches for the truncated main file name. The specified switches should be used to link the main. Tested on x86_64-pc-linux-gnu, committed on trunk 2010-10-18 Vincent Celier * make.adb (Switches_Of): Put the spec and body suffix in canonical case. Index: make.adb =================================================================== --- make.adb (revision 165610) +++ make.adb (working copy) @@ -8464,13 +8464,13 @@ package body Make is Naming : Lang_Naming_Data renames Lang.Config.Naming_Data; Name : String (1 .. Source_File_Name'Length + 3); Last : Positive := Source_File_Name'Length; - Spec_Suffix : constant String := - Get_Name_String (Naming.Spec_Suffix); - Body_Suffix : constant String := - Get_Name_String (Naming.Body_Suffix); - Truncated : Boolean := False; + Spec_Suffix : String := Get_Name_String (Naming.Spec_Suffix); + Body_Suffix : String := Get_Name_String (Naming.Body_Suffix); + Truncated : Boolean := False; begin + Canonical_Case_File_Name (Spec_Suffix); + Canonical_Case_File_Name (Body_Suffix); Name (1 .. Last) := Source_File_Name; if Last > Body_Suffix'Length