From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTP id 756FA3895470 for ; Tue, 19 May 2020 08:59:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 756FA3895470 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oliva@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 49F291176FD; Tue, 19 May 2020 04:59:26 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com 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 0nlgvF5HrHPV; Tue, 19 May 2020 04:59:26 -0400 (EDT) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id 09A1256170; Tue, 19 May 2020 04:59:25 -0400 (EDT) Received: from livre.home (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 04J8xEOc404002 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 May 2020 05:59:15 -0300 From: Alexandre Oliva To: Richard Biener Cc: gcc-patches@gcc.gnu.org, ebotcazou@adacore.com, joseph@codesourcery.com Subject: Re: drop -aux{dir,base}, revamp -dump{dir,base} Organization: Free thinker, does not speak for AdaCore References: Errors-To: aoliva@lxoliva.fsfla.org Date: Tue, 19 May 2020 05:59:14 -0300 In-Reply-To: (Alexandre Oliva's message of "Tue, 19 May 2020 05:51:39 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-14.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 19 May 2020 08:59:27 -0000 On May 19, 2020, Alexandre Oliva wrote: > - fix a build problem when targeting platforms with an executable suffix aux and dump revamp: fix target exec suffix handling HAVE_TARGET_EXECUTABLE_SUFFIX is defined only in gcc.c, and in a way that requires testing whether it's defined, rather than for nonzero. Fixed the new use in gcc.c, copied the fix and the definition to lto-wrapper.c. for gcc/ChangeLog * lto-wrapper.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Define if... (TARGET_EXECUTABLE_SUFFIX): ... is defined; define this to the empty string otherwise. (run_gcc): Test for HAVE_TARGET_EXECUTABLE_SUFFIX with defined. * gcc.c (process_command): Likewise. --- gcc/gcc.c | 2 +- gcc/lto-wrapper.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/gcc.c b/gcc/gcc.c index 1e4ac9d..8c851d7 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -4966,7 +4966,7 @@ process_command (unsigned int decoded_options_count, : ((temp = strrchr (obase + 1, '.')) && (xlen = strlen (temp)) && (strcmp (temp, ".exe") == 0 -#if HAVE_TARGET_EXECUTABLE_SUFFIX +#if defined(HAVE_TARGET_EXECUTABLE_SUFFIX) || strcmp (temp, TARGET_EXECUTABLE_SUFFIX) == 0 #endif || strcmp (obase, "a.out") == 0))) diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 026c419..d565b08 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -53,6 +53,13 @@ along with GCC; see the file COPYING3. If not see driver to lto-wrapper. */ #define OFFLOAD_TARGET_NAMES_ENV "OFFLOAD_TARGET_NAMES" +/* By default there is no special suffix for target executables. */ +#ifdef TARGET_EXECUTABLE_SUFFIX +#define HAVE_TARGET_EXECUTABLE_SUFFIX +#else +#define TARGET_EXECUTABLE_SUFFIX "" +#endif + enum lto_mode_d { LTO_MODE_NONE, /* Not doing LTO. */ LTO_MODE_LTO, /* Normal LTO. */ @@ -1509,7 +1516,7 @@ run_gcc (unsigned argc, char *argv[]) if ((temp = strrchr (obase + 1, '.')) && (xlen = strlen (temp)) && (strcmp (temp, ".exe") == 0 -#if HAVE_TARGET_EXECUTABLE_SUFFIX +#if defined(HAVE_TARGET_EXECUTABLE_SUFFIX) || strcmp (temp, TARGET_EXECUTABLE_SUFFIX) == 0 #endif || strcmp (obase, "a.out") == 0)) -- Alexandre Oliva, freedom fighter he/him https://FSFLA.org/blogs/lxo/ Free Software Evangelist Stallman was right, but he's left :( GNU Toolchain Engineer Live long and free, and prosper ethically