From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 0806C385782D for ; Mon, 28 Mar 2022 14:36:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0806C385782D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 22SEZsBl010739; Mon, 28 Mar 2022 09:35:54 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 22SEZsgK010738; Mon, 28 Mar 2022 09:35:54 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 28 Mar 2022 09:35:54 -0500 From: Segher Boessenkool To: Ian Pilcher Cc: gcc-help@gcc.gnu.org Subject: Re: Environment variable equivalent of -L Message-ID: <20220328143554.GJ614@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2022 14:36:56 -0000 On Mon, Mar 28, 2022 at 09:04:53AM -0500, Ian Pilcher via Gcc-help wrote: > I am using GCC as a cross compiler, which results in some crazy long > command lines, because of all the directories that need to be passed > with the -I and -L options. > > I've found the CPATH variable, for include file paths (-I equivalent), > but I haven't found anything that works like -L. I tried LIBRARY_PATH, > but that didn't work. > > Am I missing something, or is there just no such variable? You could use what in DOS was called a response file: '@FILE' Read command-line options from FILE. The options read are inserted in place of the original @FILE option. If FILE does not exist, or cannot be read, then the option will be treated literally, and not removed. Segher