From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 869D6386100A for ; Wed, 4 Aug 2021 14:48:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 869D6386100A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 39EA92223D; Wed, 4 Aug 2021 14:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1628088514; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Z5XSKnKgO81OEQT/xq9X9WU9n8jZqvVGv49m5wYHr4w=; b=ggbhSqdlUSztEPB4cJ1OilRyUXgFou5Af+8ttDiZQ2MFRdN72/To8MfEn9O1pWdsBC45tW jzcBgiKIjG9PFkiCEyhXAn9DJvqSwk+WNJA43lTHrfbKD/nPoCEEeCdhJqJocOpERjRON5 4QMp9eQoj9fyHYaMZtmcTWDIJfV+V3E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1628088514; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Z5XSKnKgO81OEQT/xq9X9WU9n8jZqvVGv49m5wYHr4w=; b=pqAEEU43zkQbI17cEROvM5qZg/cT+5WsQWHsxvAN3/bnXXC86nP3oAV5rQAhQPb62+A7iI UMvUlWZo/IZFcQCg== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 0A4A3A3B89; Wed, 4 Aug 2021 14:48:34 +0000 (UTC) Received: by wotan.suse.de (Postfix, from userid 10510) id 0576564F3; Wed, 4 Aug 2021 14:48:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by wotan.suse.de (Postfix) with ESMTP id 0454A62A2; Wed, 4 Aug 2021 14:48:34 +0000 (UTC) Date: Wed, 4 Aug 2021 14:48:33 +0000 (UTC) From: Michael Matz To: John Ericson cc: Jonathan Wakely , gcc@gcc.gnu.org Subject: Re: =?UTF-8?Q?Re:_Optional_machine_prefix_for_programs_in_for_-B_dirs, _match?= ing Clang In-Reply-To: <8bae6ba2-a4ad-4445-aeb9-e19ece045062@www.fastmail.com> Message-ID: References: <8bae6ba2-a4ad-4445-aeb9-e19ece045062@www.fastmail.com> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.1 required=5.0 tests=BAD_ENC_HEADER, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2021 14:48:37 -0000 Hello, On Wed, 4 Aug 2021, John Ericson wrote: > > Doesn't GCC automatically look for those commands in the --prefix > > directory that you configure GCC with? Or is that only for native > > compilers? > > It will search only if --with-*=... was not passed, and it will never > prefix the query. So yes in practice for cross compilers people do the > --with-* Hmm, no? Because as you said ... > I think the solution is to stop making cross compilers rely on these > --with-flags to do the obvious things. Executables like `collect2` > hidden within a libexesubdir (libexec/gcc//) have no > need for prefixing, but the assembler and linker are very much > public-facing executables in their own right, and usually are prefixed. ... the 'as' and 'ld' executables should be simply found within the version and target specific GCC libexecsubdir, possibly by being symlinks to whatever you want. That's at least how my crosss are configured and installed, without any --with-{as,ld} options. > and no searching happens, and for native compilers no one > bothers and searching does happen. But to be a pedant strictly speaking > the behavior is independent of whether the compiler is host == target or > not. Ciao, Michael.