aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.cc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-11-21 07:49:15 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-11-21 20:39:14 +0100
commit58c3d9cde123e13838faba398d0a70e6f62cd893 (patch)
treeeca9bdeabe78dde6bd4827258a34692436339a56 /gcc/gcc.cc
parentcbd05ca5ab1231d70d07e1ffbe64c1b7338bf1d6 (diff)
downloadgcc-58c3d9cde123e13838faba398d0a70e6f62cd893.zip
gcc-58c3d9cde123e13838faba398d0a70e6f62cd893.tar.gz
gcc-58c3d9cde123e13838faba398d0a70e6f62cd893.tar.bz2
Allow subtarget customization of CC1_SPEC
gcc/ChangeLog: * gcc.cc (SUBTARGET_CC1_SPEC): Define if not defined. (cc1_spec): Append SUBTARGET_CC1_SPEC.
Diffstat (limited to 'gcc/gcc.cc')
-rw-r--r--gcc/gcc.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 830ab88..ca1c9e2 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 in the initialization of 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;