public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC
@ 2022-11-21  7:25 Sebastian Huber
  2022-11-21  7:25 ` [PATCH v2 2/2] RTEMS: Use local-exec TLS model by default Sebastian Huber
  2022-12-06 21:06 ` [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC Thomas Schwinge
  0 siblings, 2 replies; 9+ messages in thread
From: Sebastian Huber @ 2022-11-21  7:25 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jeff Law

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;
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-09  7:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21  7:25 [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC Sebastian Huber
2022-11-21  7:25 ` [PATCH v2 2/2] RTEMS: Use local-exec TLS model by default Sebastian Huber
2022-12-06 21:06 ` [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC Thomas Schwinge
2022-12-07  6:04   ` Sebastian Huber
2022-12-07  7:10     ` Thomas Schwinge
2022-12-07  7:54       ` Sebastian Huber
2022-12-07  8:21         ` Iain Sandoe
2022-12-07  9:50     ` Richard Sandiford
2022-12-09  7:03       ` Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).