From patchwork Mon Nov 21 07:25:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Huber X-Patchwork-Id: 60901 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 17F2D3851882 for ; Mon, 21 Nov 2022 07:26:19 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id 34A7A3899435 for ; Mon, 21 Nov 2022 07:25:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 34A7A3899435 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de Received: from sslproxy06.your-server.de ([78.46.172.3]) by dedi548.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ox1BL-000KXy-LD; Mon, 21 Nov 2022 08:25:31 +0100 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ox1BL-000TRy-Ia; Mon, 21 Nov 2022 08:25:31 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 43B894800B4; Mon, 21 Nov 2022 08:25:31 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6xeH3em-gPn5; Mon, 21 Nov 2022 08:25:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id BC9DA4801C9; Mon, 21 Nov 2022 08:25:30 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Aj6_S7gCUgEL; Mon, 21 Nov 2022 08:25:30 +0100 (CET) Received: from zimbra.eb.localhost (unknown [192.168.96.242]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 9CB4E4800B4; Mon, 21 Nov 2022 08:25:30 +0100 (CET) From: Sebastian Huber To: gcc-patches@gcc.gnu.org Cc: Jeff Law Subject: [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC Date: Mon, 21 Nov 2022 08:25:25 +0100 Message-Id: <20221121072526.103446-1-sebastian.huber@embedded-brains.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.103.7/26726/Sun Nov 20 09:50:39 2022) X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP 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: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" gcc/ChangeLog: * gcc.cc (SUBTARGET_CC1_SPEC): Define if not defined. (cc1_spec): Append SUBTARGET_CC1_SPEC. --- v2: Append SUBTARGET_CC1_SPEC directly to cc1_spec and not through CC1_SPEC. This avoids having to modify all the CC1_SPEC definitions in the targets. gcc/gcc.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/gcc.cc b/gcc/gcc.cc index 830ab88701f..4e1574a4df1 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -706,6 +706,13 @@ proper position among the other output files. */ #define CPP_SPEC "" #endif +/* Subtargets can define SUBTARGET_CC1_SPEC to provide extra args to cc1 and + cc1plus or extra switch-translations. The SUBTARGET_CC1_SPEC is appended + to CC1_SPEC. */ +#ifndef SUBTARGET_CC1_SPEC +#define SUBTARGET_CC1_SPEC "" +#endif + /* config.h can define CC1_SPEC to provide extra args to cc1 and cc1plus or extra switch-translations. */ #ifndef CC1_SPEC @@ -1174,7 +1181,7 @@ proper position among the other output files. */ static const char *asm_debug = ASM_DEBUG_SPEC; static const char *asm_debug_option = ASM_DEBUG_OPTION_SPEC; static const char *cpp_spec = CPP_SPEC; -static const char *cc1_spec = CC1_SPEC; +static const char *cc1_spec = CC1_SPEC SUBTARGET_CC1_SPEC; static const char *cc1plus_spec = CC1PLUS_SPEC; static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; static const char *link_ssp_spec = LINK_SSP_SPEC;