From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id 7319138418A1; Tue, 21 Jun 2022 03:20:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7319138418A1 Received: from linux-libre.fsfla.org ([209.51.188.54]:35736 helo=free.home) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3UOn-0000R6-TQ; Mon, 20 Jun 2022 23:17:54 -0400 Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 25L3HfLs690372 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Jun 2022 00:17:41 -0300 From: Alexandre Oliva To: Eric Gallager Cc: gcc-patches , Paolo Bonzini , neroden@gcc.gnu.org, Ralf.Wildenhues@gmx.de Subject: Re: [PING][PATCH][WIP] have configure probe prefix for gmp/mpfr/mpc [PR44425] Organization: Free thinker, not speaking for the GNU Project References: Errors-To: aoliva@lxoliva.fsfla.org Date: Tue, 21 Jun 2022 00:17:41 -0300 In-Reply-To: (Eric Gallager's message of "Thu, 9 Jun 2022 16:04:50 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2022 03:20:07 -0000 Hello, Eric, On Jun 9, 2022, Eric Gallager wrote: > (cc-ing the build machinery maintainers listed in MAINTAINERS this time) Thanks, I'd missed it the first time. > On Thu, Jun 2, 2022 at 11:53 AM Eric Gallager wrote: >> So, I'm working on fixing PR bootstrap/44425, and have this patch to >> have the top-level configure script check in the value passed to >> `--prefix=` when looking for gmp/mpfr/mpc. It "works" (in that >> configuring with just `--prefix=` and none of >> `--with-gmp=`/`--with-mpfr=`/`--with-mpc=` now works where it failed >> before), but unfortunately it results in a bunch of duplicated >> `-I`/`-L` flags stuck in ${gmplibs} and ${gmpinc}... is that >> acceptable or should I try another approach? I wonder if it would make sense to add -L${libdir} and -I${includedir} to host flags. It would obviate the explicit flag-setting for each of the libs, and it would address the apparent double-setting when prefix is set, or confusingly partial overrides when --with-*-include and --with-*-lib are used. It would be IMHO preferrable to use libdir and includedir, rather than prefix, especially for cases in which exec_prefix != prefix, but takes some work for libdir and includedir to be expanded correctly during configure. E.g., libdir is normally set to ${exec_prefix}/lib, and exec_prefix defaults to ${prefix}, but a shell won't expand multiple layers of macros like make does, so configure needs some help with that. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about