From patchwork Mon Aug 29 13:48:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 112054 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 438E1B6F8B for ; Mon, 29 Aug 2011 23:49:16 +1000 (EST) Received: (qmail 20788 invoked by alias); 29 Aug 2011 13:49:04 -0000 Received: (qmail 20765 invoked by uid 22791); 29 Aug 2011 13:49:02 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_RG X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Aug 2011 13:48:44 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D42162BAB66; Mon, 29 Aug 2011 09:48:43 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Ug8i4ysomu4Y; Mon, 29 Aug 2011 09:48:43 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id 6E3AA2BAB17; Mon, 29 Aug 2011 09:48:43 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id 5E8BF92A55; Mon, 29 Aug 2011 09:48:43 -0400 (EDT) Date: Mon, 29 Aug 2011 09:48:43 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Vincent Celier Subject: [Ada] gnatmake ignores "-largs" in package Linker Message-ID: <20110829134843.GA10311@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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 It is not possible to specify "-largs" as a switch in package linker of the main project file, to link with an external library libargs. This patch corrects this. Now any option found in the switches of packages Compiler, Binder or Linker is taken as is into account. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Vincent Celier * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler, Binder or Linker of the main project file. Index: make.adb =================================================================== --- make.adb (revision 178228) +++ make.adb (working copy) @@ -7373,15 +7373,15 @@ end if; - -- Then check if we are dealing with -cargs/-bargs/-largs/-margs + -- Then check if we are dealing with -cargs/-bargs/-largs/-margs. These + -- options are taken as is when found in package Compiler, Binder or + -- Linker of the main project file. - elsif Argv = "-bargs" - or else - Argv = "-cargs" - or else - Argv = "-largs" - or else - Argv = "-margs" + elsif (And_Save or else Program_Args = None) + and then (Argv = "-bargs" or else + Argv = "-cargs" or else + Argv = "-largs" or else + Argv = "-margs") then case Argv (2) is when 'c' => Program_Args := Compiler;