* [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
* [PATCH v2 2/2] RTEMS: Use local-exec TLS model by default 2022-11-21 7:25 [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC Sebastian Huber @ 2022-11-21 7:25 ` Sebastian Huber 2022-12-06 21:06 ` [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC Thomas Schwinge 1 sibling, 0 replies; 9+ messages in thread From: Sebastian Huber @ 2022-11-21 7:25 UTC (permalink / raw) To: gcc-patches; +Cc: Jeff Law gcc/ChangeLog: * config/rtems.h (SUBTARGET_CC1_SPEC): Undef and define. --- gcc/config/rtems.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/config/rtems.h b/gcc/config/rtems.h index 95bcdc41b2f..4742b1f3722 100644 --- a/gcc/config/rtems.h +++ b/gcc/config/rtems.h @@ -56,3 +56,7 @@ /* Prefer int for int32_t (see stdint-newlib.h). */ #undef STDINT_LONG32 #define STDINT_LONG32 (INT_TYPE_SIZE != 32 && LONG_TYPE_SIZE == 32) + +/* Default to local-exec TLS model. */ +#undef SUBTARGET_CC1_SPEC +#define SUBTARGET_CC1_SPEC " %{!ftls-model=*:-ftls-model=local-exec}" -- 2.35.3 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC 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 ` Thomas Schwinge 2022-12-07 6:04 ` Sebastian Huber 1 sibling, 1 reply; 9+ messages in thread From: Thomas Schwinge @ 2022-12-06 21:06 UTC (permalink / raw) To: Sebastian Huber; +Cc: Jeff Law, gcc-patches Hi! I suppose I just fail to see some detail here, but: On 2022-11-21T08:25:25+0100, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote: > 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; ... doesn't this (at least potentially?) badly interact with any existing 'SUBTARGET_CC1_SPEC' definitions -- which pe rabove get appended to 'cc1_spec'? gcc/config/loongarch/gnu-user.h- and provides this hook instead. */ gcc/config/loongarch/gnu-user.h:#undef SUBTARGET_CC1_SPEC gcc/config/loongarch/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC gcc/config/loongarch/gnu-user.h- -- gcc/config/loongarch/loongarch.h-#define EXTRA_SPECS \ gcc/config/loongarch/loongarch.h: {"subtarget_cc1_spec", SUBTARGET_CC1_SPEC}, \ gcc/config/loongarch/loongarch.h- {"subtarget_cpp_spec", SUBTARGET_CPP_SPEC}, \ -- gcc/config/mips/gnu-user.h- and provides this hook instead. */ gcc/config/mips/gnu-user.h:#undef SUBTARGET_CC1_SPEC gcc/config/mips/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC gcc/config/mips/gnu-user.h- -- gcc/config/mips/linux-common.h- gcc/config/mips/linux-common.h:#undef SUBTARGET_CC1_SPEC gcc/config/mips/linux-common.h:#define SUBTARGET_CC1_SPEC \ gcc/config/mips/linux-common.h- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ -- gcc/config/mips/mips.h- gcc/config/mips/mips.h:/* SUBTARGET_CC1_SPEC is passed to the compiler proper. It may be gcc/config/mips/mips.h- overridden by subtargets. */ gcc/config/mips/mips.h:#ifndef SUBTARGET_CC1_SPEC gcc/config/mips/mips.h:#define SUBTARGET_CC1_SPEC "" gcc/config/mips/mips.h-#endif -- gcc/config/mips/mips.h-#define EXTRA_SPECS \ gcc/config/mips/mips.h: { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ gcc/config/mips/mips.h- { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ -- gcc/config/mips/r3900.h-/* By default (if not mips-something-else) produce code for the r3900 */ gcc/config/mips/r3900.h:#undef SUBTARGET_CC1_SPEC gcc/config/mips/r3900.h:#define SUBTARGET_CC1_SPEC "\ gcc/config/mips/r3900.h-%{mhard-float:%e-mhard-float not supported} \ Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC 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 9:50 ` Richard Sandiford 0 siblings, 2 replies; 9+ messages in thread From: Sebastian Huber @ 2022-12-07 6:04 UTC (permalink / raw) To: Thomas Schwinge; +Cc: Jeff Law, gcc-patches On 06.12.22 22:06, Thomas Schwinge wrote: > Hi! > > I suppose I just fail to see some detail here, but: > > On 2022-11-21T08:25:25+0100, Sebastian Huber<sebastian.huber@embedded-brains.de> wrote: >> 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; > ... doesn't this (at least potentially?) badly interact with any existing > 'SUBTARGET_CC1_SPEC' definitions -- which pe rabove get appended to > 'cc1_spec'? > > gcc/config/loongarch/gnu-user.h- and provides this hook instead. */ > gcc/config/loongarch/gnu-user.h:#undef SUBTARGET_CC1_SPEC > gcc/config/loongarch/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC > gcc/config/loongarch/gnu-user.h- > -- > gcc/config/loongarch/loongarch.h-#define EXTRA_SPECS \ > gcc/config/loongarch/loongarch.h: {"subtarget_cc1_spec", SUBTARGET_CC1_SPEC}, \ > gcc/config/loongarch/loongarch.h- {"subtarget_cpp_spec", SUBTARGET_CPP_SPEC}, \ > -- > gcc/config/mips/gnu-user.h- and provides this hook instead. */ > gcc/config/mips/gnu-user.h:#undef SUBTARGET_CC1_SPEC > gcc/config/mips/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC > gcc/config/mips/gnu-user.h- > -- > gcc/config/mips/linux-common.h- > gcc/config/mips/linux-common.h:#undef SUBTARGET_CC1_SPEC > gcc/config/mips/linux-common.h:#define SUBTARGET_CC1_SPEC \ > gcc/config/mips/linux-common.h- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ > -- > gcc/config/mips/mips.h- > gcc/config/mips/mips.h:/* SUBTARGET_CC1_SPEC is passed to the compiler proper. It may be > gcc/config/mips/mips.h- overridden by subtargets. */ > gcc/config/mips/mips.h:#ifndef SUBTARGET_CC1_SPEC > gcc/config/mips/mips.h:#define SUBTARGET_CC1_SPEC "" > gcc/config/mips/mips.h-#endif > -- > gcc/config/mips/mips.h-#define EXTRA_SPECS \ > gcc/config/mips/mips.h: { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ > gcc/config/mips/mips.h- { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ > -- > gcc/config/mips/r3900.h-/* By default (if not mips-something-else) produce code for the r3900 */ > gcc/config/mips/r3900.h:#undef SUBTARGET_CC1_SPEC > gcc/config/mips/r3900.h:#define SUBTARGET_CC1_SPEC "\ > gcc/config/mips/r3900.h-%{mhard-float:%e-mhard-float not supported} \ Oh, I came up with the name SUBTARGET_CC1_SPEC after a discussion on the mailing list and I have to admit that I didn't check that it was actually already in use. What about renaming the loongarch/mips define to LOONGARCH_CC1_SPEC and MIPS_CC1_SPEC? -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.huber@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC 2022-12-07 6:04 ` Sebastian Huber @ 2022-12-07 7:10 ` Thomas Schwinge 2022-12-07 7:54 ` Sebastian Huber 2022-12-07 9:50 ` Richard Sandiford 1 sibling, 1 reply; 9+ messages in thread From: Thomas Schwinge @ 2022-12-07 7:10 UTC (permalink / raw) To: Sebastian Huber; +Cc: Jeff Law, gcc-patches, Iain Sandoe Hi! On 2022-12-07T07:04:10+0100, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote: > On 06.12.22 22:06, Thomas Schwinge wrote: > I suppose I just fail to see some detail here, but: > >> On 2022-11-21T08:25:25+0100, Sebastian Huber<sebastian.huber@embedded-brains.de> wrote: >>> 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; >> >> ... doesn't this (at least potentially?) badly interact with any existing >> 'SUBTARGET_CC1_SPEC' definitions -- which pe rabove get appended to >> 'cc1_spec'? >> >> gcc/config/loongarch/gnu-user.h- and provides this hook instead. */ >> gcc/config/loongarch/gnu-user.h:#undef SUBTARGET_CC1_SPEC >> gcc/config/loongarch/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC >> gcc/config/loongarch/gnu-user.h- >> -- >> gcc/config/loongarch/loongarch.h-#define EXTRA_SPECS \ >> gcc/config/loongarch/loongarch.h: {"subtarget_cc1_spec", SUBTARGET_CC1_SPEC}, \ >> gcc/config/loongarch/loongarch.h- {"subtarget_cpp_spec", SUBTARGET_CPP_SPEC}, \ >> -- >> gcc/config/mips/gnu-user.h- and provides this hook instead. */ >> gcc/config/mips/gnu-user.h:#undef SUBTARGET_CC1_SPEC >> gcc/config/mips/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC >> gcc/config/mips/gnu-user.h- >> -- >> gcc/config/mips/linux-common.h- >> gcc/config/mips/linux-common.h:#undef SUBTARGET_CC1_SPEC >> gcc/config/mips/linux-common.h:#define SUBTARGET_CC1_SPEC \ >> gcc/config/mips/linux-common.h- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ >> -- >> gcc/config/mips/mips.h- >> gcc/config/mips/mips.h:/* SUBTARGET_CC1_SPEC is passed to the compiler proper. It may be >> gcc/config/mips/mips.h- overridden by subtargets. */ >> gcc/config/mips/mips.h:#ifndef SUBTARGET_CC1_SPEC >> gcc/config/mips/mips.h:#define SUBTARGET_CC1_SPEC "" >> gcc/config/mips/mips.h-#endif >> -- >> gcc/config/mips/mips.h-#define EXTRA_SPECS \ >> gcc/config/mips/mips.h: { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ >> gcc/config/mips/mips.h- { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ >> -- >> gcc/config/mips/r3900.h-/* By default (if not mips-something-else) produce code for the r3900 */ >> gcc/config/mips/r3900.h:#undef SUBTARGET_CC1_SPEC >> gcc/config/mips/r3900.h:#define SUBTARGET_CC1_SPEC "\ >> gcc/config/mips/r3900.h-%{mhard-float:%e-mhard-float not supported} \ > > Oh, I came up with the name SUBTARGET_CC1_SPEC after a discussion on the > mailing list I've put Iain in CC. > and I have to admit that I didn't check that it was > actually already in use. Always one of the first things I do. ;-) > What about renaming the loongarch/mips define > to LOONGARCH_CC1_SPEC and MIPS_CC1_SPEC? Also in use are a number of other 'SUBTARGET_[...]_SPEC' and corresponding 'subtarget_[...]_spec' in 'EXTRA_SPECS', for example: gcc/config/mips/mips.h-#define EXTRA_SPECS \ gcc/config/mips/mips.h: { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ gcc/config/mips/mips.h: { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ gcc/config/mips/mips.h: { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC }, \ gcc/config/mips/mips.h: { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \ gcc/config/mips/mips.h- { "asm_abi_default_spec", "-" MULTILIB_ABI_DEFAULT }, \ gcc/config/mips/mips.h- { "endian_spec", ENDIAN_SPEC }, \ gcc/config/mips/mips.h: SUBTARGET_EXTRA_SPECS Do we need/want to keep the association of same-name upper-case/lower-case variants; in your proposal you'd then get '{ "subtarget_cc1_spec", MIPS_CC1_SPEC }', for example? (I didn't quickly grok all 'EXTRA_SPECS' usage.) Alternatively, what about renaming your 'SUBTARGET_CC1_SPEC' to 'CC1_SPEC_EXTRA' -- if that makes sense? static const char *cc1_spec = CC1_SPEC CC1_SPEC_EXTRA; But doesn't somehow this whole thing feel a bit like "chating the system"? ;-) Can't you actually achieve your thing (TLS model) via (new) 'EXTRA_SPECS' in 'gcc/config/rtems.h', for example? Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC 2022-12-07 7:10 ` Thomas Schwinge @ 2022-12-07 7:54 ` Sebastian Huber 2022-12-07 8:21 ` Iain Sandoe 0 siblings, 1 reply; 9+ messages in thread From: Sebastian Huber @ 2022-12-07 7:54 UTC (permalink / raw) To: Thomas Schwinge; +Cc: Jeff Law, gcc-patches, Iain Sandoe On 07.12.22 08:10, Thomas Schwinge wrote: > Hi! > > On 2022-12-07T07:04:10+0100, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote: >> On 06.12.22 22:06, Thomas Schwinge wrote: >> I suppose I just fail to see some detail here, but: >> >>> On 2022-11-21T08:25:25+0100, Sebastian Huber<sebastian.huber@embedded-brains.de> wrote: >>>> 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; >>> >>> ... doesn't this (at least potentially?) badly interact with any existing >>> 'SUBTARGET_CC1_SPEC' definitions -- which pe rabove get appended to >>> 'cc1_spec'? >>> >>> gcc/config/loongarch/gnu-user.h- and provides this hook instead. */ >>> gcc/config/loongarch/gnu-user.h:#undef SUBTARGET_CC1_SPEC >>> gcc/config/loongarch/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC >>> gcc/config/loongarch/gnu-user.h- >>> -- >>> gcc/config/loongarch/loongarch.h-#define EXTRA_SPECS \ >>> gcc/config/loongarch/loongarch.h: {"subtarget_cc1_spec", SUBTARGET_CC1_SPEC}, \ >>> gcc/config/loongarch/loongarch.h- {"subtarget_cpp_spec", SUBTARGET_CPP_SPEC}, \ >>> -- >>> gcc/config/mips/gnu-user.h- and provides this hook instead. */ >>> gcc/config/mips/gnu-user.h:#undef SUBTARGET_CC1_SPEC >>> gcc/config/mips/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC >>> gcc/config/mips/gnu-user.h- >>> -- >>> gcc/config/mips/linux-common.h- >>> gcc/config/mips/linux-common.h:#undef SUBTARGET_CC1_SPEC >>> gcc/config/mips/linux-common.h:#define SUBTARGET_CC1_SPEC \ >>> gcc/config/mips/linux-common.h- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ >>> -- >>> gcc/config/mips/mips.h- >>> gcc/config/mips/mips.h:/* SUBTARGET_CC1_SPEC is passed to the compiler proper. It may be >>> gcc/config/mips/mips.h- overridden by subtargets. */ >>> gcc/config/mips/mips.h:#ifndef SUBTARGET_CC1_SPEC >>> gcc/config/mips/mips.h:#define SUBTARGET_CC1_SPEC "" >>> gcc/config/mips/mips.h-#endif >>> -- >>> gcc/config/mips/mips.h-#define EXTRA_SPECS \ >>> gcc/config/mips/mips.h: { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ >>> gcc/config/mips/mips.h- { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ >>> -- >>> gcc/config/mips/r3900.h-/* By default (if not mips-something-else) produce code for the r3900 */ >>> gcc/config/mips/r3900.h:#undef SUBTARGET_CC1_SPEC >>> gcc/config/mips/r3900.h:#define SUBTARGET_CC1_SPEC "\ >>> gcc/config/mips/r3900.h-%{mhard-float:%e-mhard-float not supported} \ >> >> Oh, I came up with the name SUBTARGET_CC1_SPEC after a discussion on the >> mailing list > > I've put Iain in CC. > >> and I have to admit that I didn't check that it was >> actually already in use. > > Always one of the first things I do. ;-) > >> What about renaming the loongarch/mips define >> to LOONGARCH_CC1_SPEC and MIPS_CC1_SPEC? > > Also in use are a number of other 'SUBTARGET_[...]_SPEC' and > corresponding 'subtarget_[...]_spec' in 'EXTRA_SPECS', for example: > > gcc/config/mips/mips.h-#define EXTRA_SPECS \ > gcc/config/mips/mips.h: { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ > gcc/config/mips/mips.h: { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ > gcc/config/mips/mips.h: { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC }, \ > gcc/config/mips/mips.h: { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \ > gcc/config/mips/mips.h- { "asm_abi_default_spec", "-" MULTILIB_ABI_DEFAULT }, \ > gcc/config/mips/mips.h- { "endian_spec", ENDIAN_SPEC }, \ > gcc/config/mips/mips.h: SUBTARGET_EXTRA_SPECS > > Do we need/want to keep the association of same-name > upper-case/lower-case variants; in your proposal you'd then get > '{ "subtarget_cc1_spec", MIPS_CC1_SPEC }', for example? (I didn't > quickly grok all 'EXTRA_SPECS' usage.) > > Alternatively, what about renaming your 'SUBTARGET_CC1_SPEC' to > 'CC1_SPEC_EXTRA' -- if that makes sense? > > static const char *cc1_spec = CC1_SPEC CC1_SPEC_EXTRA; I was told that an operating system is the subtarget in this context. So from the name SUBTARGET_CC1_SPEC is is clear who is in charge. This is not clear from CC1_SPEC_EXTRA. > > But doesn't somehow this whole thing feel a bit like "chating the > system"? ;-) > > Can't you actually achieve your thing (TLS model) via (new) 'EXTRA_SPECS' > in 'gcc/config/rtems.h', for example? The EXTRA_SPECS definition seems to be target-specific. Not all targets let an operating system define SUBTARGET_EXTRA_SPECS. The SUBTARGET_EXTRA_SPECS would need to get propagated to the corresponding specs, which seems to be also target-specific, for example for mips we have: #undef CC1_SPEC #define CC1_SPEC "\ %{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \ %(subtarget_cc1_spec)" I think going this route would lead to a lot of changes affecting all targets. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.huber@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC 2022-12-07 7:54 ` Sebastian Huber @ 2022-12-07 8:21 ` Iain Sandoe 0 siblings, 0 replies; 9+ messages in thread From: Iain Sandoe @ 2022-12-07 8:21 UTC (permalink / raw) To: Sebastian Huber; +Cc: Thomas Schwinge, Jeff Law, GCC Patches Hi > On 7 Dec 2022, at 07:54, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote: > > > > On 07.12.22 08:10, Thomas Schwinge wrote: >> Hi! >> On 2022-12-07T07:04:10+0100, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote: >>> On 06.12.22 22:06, Thomas Schwinge wrote: >>> I suppose I just fail to see some detail here, but: >>> >>>> On 2022-11-21T08:25:25+0100, Sebastian Huber<sebastian.huber@embedded-brains.de> wrote: >>>>> 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; >>>> >>>> ... doesn't this (at least potentially?) badly interact with any existing >>>> 'SUBTARGET_CC1_SPEC' definitions -- which pe rabove get appended to >>>> 'cc1_spec'? >>>> >>>> gcc/config/loongarch/gnu-user.h- and provides this hook instead. */ >>>> gcc/config/loongarch/gnu-user.h:#undef SUBTARGET_CC1_SPEC >>>> gcc/config/loongarch/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC >>>> gcc/config/loongarch/gnu-user.h- >>>> -- >>>> gcc/config/loongarch/loongarch.h-#define EXTRA_SPECS \ >>>> gcc/config/loongarch/loongarch.h: {"subtarget_cc1_spec", SUBTARGET_CC1_SPEC}, \ >>>> gcc/config/loongarch/loongarch.h- {"subtarget_cpp_spec", SUBTARGET_CPP_SPEC}, \ >>>> -- >>>> gcc/config/mips/gnu-user.h- and provides this hook instead. */ >>>> gcc/config/mips/gnu-user.h:#undef SUBTARGET_CC1_SPEC >>>> gcc/config/mips/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC >>>> gcc/config/mips/gnu-user.h- >>>> -- >>>> gcc/config/mips/linux-common.h- >>>> gcc/config/mips/linux-common.h:#undef SUBTARGET_CC1_SPEC >>>> gcc/config/mips/linux-common.h:#define SUBTARGET_CC1_SPEC \ >>>> gcc/config/mips/linux-common.h- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ >>>> -- >>>> gcc/config/mips/mips.h- >>>> gcc/config/mips/mips.h:/* SUBTARGET_CC1_SPEC is passed to the compiler proper. It may be >>>> gcc/config/mips/mips.h- overridden by subtargets. */ >>>> gcc/config/mips/mips.h:#ifndef SUBTARGET_CC1_SPEC >>>> gcc/config/mips/mips.h:#define SUBTARGET_CC1_SPEC "" >>>> gcc/config/mips/mips.h-#endif >>>> -- >>>> gcc/config/mips/mips.h-#define EXTRA_SPECS \ >>>> gcc/config/mips/mips.h: { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ >>>> gcc/config/mips/mips.h- { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ >>>> -- >>>> gcc/config/mips/r3900.h-/* By default (if not mips-something-else) produce code for the r3900 */ >>>> gcc/config/mips/r3900.h:#undef SUBTARGET_CC1_SPEC >>>> gcc/config/mips/r3900.h:#define SUBTARGET_CC1_SPEC "\ >>>> gcc/config/mips/r3900.h-%{mhard-float:%e-mhard-float not supported} \ >>> >>> Oh, I came up with the name SUBTARGET_CC1_SPEC after a discussion on the >>> mailing list >> I've put Iain in CC. >>> and I have to admit that I didn't check that it was >>> actually already in use. >> Always one of the first things I do. ;-) >>> What about renaming the loongarch/mips define >>> to LOONGARCH_CC1_SPEC and MIPS_CC1_SPEC? >> Also in use are a number of other 'SUBTARGET_[...]_SPEC' and >> corresponding 'subtarget_[...]_spec' in 'EXTRA_SPECS', for example: >> gcc/config/mips/mips.h-#define EXTRA_SPECS \ >> gcc/config/mips/mips.h: { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ >> gcc/config/mips/mips.h: { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ >> gcc/config/mips/mips.h: { "subtarget_asm_debugging_spec", SUBTARGET_ASM_DEBUGGING_SPEC }, \ >> gcc/config/mips/mips.h: { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \ >> gcc/config/mips/mips.h- { "asm_abi_default_spec", "-" MULTILIB_ABI_DEFAULT }, \ >> gcc/config/mips/mips.h- { "endian_spec", ENDIAN_SPEC }, \ >> gcc/config/mips/mips.h: SUBTARGET_EXTRA_SPECS >> Do we need/want to keep the association of same-name >> upper-case/lower-case variants; in your proposal you'd then get >> '{ "subtarget_cc1_spec", MIPS_CC1_SPEC }', for example? (I didn't >> quickly grok all 'EXTRA_SPECS' usage.) >> Alternatively, what about renaming your 'SUBTARGET_CC1_SPEC' to >> 'CC1_SPEC_EXTRA' -- if that makes sense? >> static const char *cc1_spec = CC1_SPEC CC1_SPEC_EXTRA; > > I was told that an operating system is the subtarget in this context. So from the name SUBTARGET_CC1_SPEC is is clear who is in charge. This is not clear from CC1_SPEC_EXTRA. Perhaps I was not precise enough (or misunderstood the full requirement). Having reloaded some state on this thread… * The initial point was that target specs were an alternate mechanism for doing what was required which I understood to be that there was "an OS-specific common spec that needed to be added to multiple ports". * There are existing cases (at least Darwin is one) where this is done - multiple ports (e.g. x86, rs6000) refer to common specs in the gcc/config/ - so, for example, the specs in gcc/config/i386/darwin.h pull in common specs from gcc/config/darwin.h * there are also cases where this is specifically done in port code (sometimes with “SUBSUBTARGET_xxxx”) === I made the comment that, IMO this is initially confusing when the OS might be considered the target and the ISA the sub-target - however the status quo in specs naming is the opposite way round. ( I do not wish add further confusion here - but attempting to clarify - these styles of provision might not be suitable for the specific case, I guess - anyway, at this point, I’ve got nothing more to add :) ) Iain > >> But doesn't somehow this whole thing feel a bit like "chating the >> system"? ;-) >> Can't you actually achieve your thing (TLS model) via (new) 'EXTRA_SPECS' >> in 'gcc/config/rtems.h', for example? > > The EXTRA_SPECS definition seems to be target-specific. Not all targets let an operating system define SUBTARGET_EXTRA_SPECS. The SUBTARGET_EXTRA_SPECS would need to get propagated to the corresponding specs, which seems to be also target-specific, for example for mips we have: > > #undef CC1_SPEC > #define CC1_SPEC "\ > %{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \ > %(subtarget_cc1_spec)" > > I think going this route would lead to a lot of changes affecting all targets. > > -- > embedded brains GmbH > Herr Sebastian HUBER > Dornierstr. 4 > 82178 Puchheim > Germany > email: sebastian.huber@embedded-brains.de > phone: +49-89-18 94 741 - 16 > fax: +49-89-18 94 741 - 08 > > Registergericht: Amtsgericht München > Registernummer: HRB 157899 > Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler > Unsere Datenschutzerklärung finden Sie hier: > https://embedded-brains.de/datenschutzerklaerung/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC 2022-12-07 6:04 ` Sebastian Huber 2022-12-07 7:10 ` Thomas Schwinge @ 2022-12-07 9:50 ` Richard Sandiford 2022-12-09 7:03 ` Sebastian Huber 1 sibling, 1 reply; 9+ messages in thread From: Richard Sandiford @ 2022-12-07 9:50 UTC (permalink / raw) To: Sebastian Huber; +Cc: Thomas Schwinge, Jeff Law, gcc-patches Sebastian Huber <sebastian.huber@embedded-brains.de> writes: > On 06.12.22 22:06, Thomas Schwinge wrote: >> Hi! >> >> I suppose I just fail to see some detail here, but: >> >> On 2022-11-21T08:25:25+0100, Sebastian Huber<sebastian.huber@embedded-brains.de> wrote: >>> 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; >> ... doesn't this (at least potentially?) badly interact with any existing >> 'SUBTARGET_CC1_SPEC' definitions -- which pe rabove get appended to >> 'cc1_spec'? >> >> gcc/config/loongarch/gnu-user.h- and provides this hook instead. */ >> gcc/config/loongarch/gnu-user.h:#undef SUBTARGET_CC1_SPEC >> gcc/config/loongarch/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC >> gcc/config/loongarch/gnu-user.h- >> -- >> gcc/config/loongarch/loongarch.h-#define EXTRA_SPECS \ >> gcc/config/loongarch/loongarch.h: {"subtarget_cc1_spec", SUBTARGET_CC1_SPEC}, \ >> gcc/config/loongarch/loongarch.h- {"subtarget_cpp_spec", SUBTARGET_CPP_SPEC}, \ >> -- >> gcc/config/mips/gnu-user.h- and provides this hook instead. */ >> gcc/config/mips/gnu-user.h:#undef SUBTARGET_CC1_SPEC >> gcc/config/mips/gnu-user.h:#define SUBTARGET_CC1_SPEC GNU_USER_TARGET_CC1_SPEC >> gcc/config/mips/gnu-user.h- >> -- >> gcc/config/mips/linux-common.h- >> gcc/config/mips/linux-common.h:#undef SUBTARGET_CC1_SPEC >> gcc/config/mips/linux-common.h:#define SUBTARGET_CC1_SPEC \ >> gcc/config/mips/linux-common.h- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ >> -- >> gcc/config/mips/mips.h- >> gcc/config/mips/mips.h:/* SUBTARGET_CC1_SPEC is passed to the compiler proper. It may be >> gcc/config/mips/mips.h- overridden by subtargets. */ >> gcc/config/mips/mips.h:#ifndef SUBTARGET_CC1_SPEC >> gcc/config/mips/mips.h:#define SUBTARGET_CC1_SPEC "" >> gcc/config/mips/mips.h-#endif >> -- >> gcc/config/mips/mips.h-#define EXTRA_SPECS \ >> gcc/config/mips/mips.h: { "subtarget_cc1_spec", SUBTARGET_CC1_SPEC }, \ >> gcc/config/mips/mips.h- { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC }, \ >> -- >> gcc/config/mips/r3900.h-/* By default (if not mips-something-else) produce code for the r3900 */ >> gcc/config/mips/r3900.h:#undef SUBTARGET_CC1_SPEC >> gcc/config/mips/r3900.h:#define SUBTARGET_CC1_SPEC "\ >> gcc/config/mips/r3900.h-%{mhard-float:%e-mhard-float not supported} \ > > Oh, I came up with the name SUBTARGET_CC1_SPEC after a discussion on the > mailing list and I have to admit that I didn't check that it was > actually already in use. What about renaming the loongarch/mips define > to LOONGARCH_CC1_SPEC and MIPS_CC1_SPEC? One drawback to that is that people might have their own spec files that reference the existing names. Typically those would be produced by using -dumpspecs and editing the output. I think we only really support that if people regenerate the specs files for each release, but for targets like MIPS that don't see much activity, it's probably easy to get away without doing that. How about going back to Jose's suggestion from the original thread of using OS_CC1_SPEC? The patch is OK with that change if no-one objects in 24 hours. Thanks, Richard ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] Allow subtarget customization of CC1_SPEC 2022-12-07 9:50 ` Richard Sandiford @ 2022-12-09 7:03 ` Sebastian Huber 0 siblings, 0 replies; 9+ messages in thread From: Sebastian Huber @ 2022-12-09 7:03 UTC (permalink / raw) To: Thomas Schwinge, Jeff Law, gcc-patches, richard.sandiford On 07/12/2022 10:50, Richard Sandiford wrote: > How about going back to Jose's suggestion from the original thread > of using OS_CC1_SPEC? The patch is OK with that change if no-one > objects in 24 hours. I checked in this change: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3e4b8dc477c12f303171ec7f0394c97494095545 -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.huber@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ^ 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).