From: Iain Sandoe <idsandoe@googlemail.com>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: Use -ftls-model=local-exec for RTEMS by default?
Date: Fri, 22 Jul 2022 12:35:41 +0100 [thread overview]
Message-ID: <8CBF2F47-39E7-433E-B294-ACB5EA95DA76@googlemail.com> (raw)
In-Reply-To: <f8c66bcb-67f8-1ff0-8d54-1eef8ca35274@embedded-brains.de>
> On 22 Jul 2022, at 12:19, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote:
>
> On 21.07.22 10:03, Iain Sandoe wrote:
>>> This sounds like an interesting approach in the long run, however, I need a short term solution which I can back port to GCC 10, 11, and 12. I guess I will add a
>>>
>>> MULTILIB_EXTRA_OPTS = ftls-model=local-exec
>>>
>>> to all RTEMS multilib configurations.
>>>
>>> In general I think the target hooks are hard to customize for operating systems.
>> (IMO) It can be not too tricky - Darwin customises several - you just have to override the default definition in your target-specific header and provide the replacement e.g ( override in config/darwin.h, replacement in config/darwin.cc):
>> #undef TARGET_ENCODE_SECTION_INFO
>> #define TARGET_ENCODE_SECTION_INFO darwin_encode_section_info
>
> The problem is that in this case you need a target-specific copy and paste solution. For example lets suppose you want to use
>
> #define CC1_SPEC "%{!ftls-model=*:-ftls-model=local-exec}"
>
> for RTEMS (in gcc/config/rtems.h), then you have a problem on for example microblaze (gcc/config/microblaze/microblaze.h):
>
> #ifndef CC1_SPEC
> #define CC1_SPEC " \
> %{G*} \
> %(subtarget_cc1_spec) \
> %{mxl-multiply-high:-mcpu=v6.00.a} \
> "
> #endif
>
> or nios2 (gcc/config/nios2/nios2.h):
>
> #define CC1_SPEC "%{G*}"
>
> For each target you would have to check if you have to provide some extra times for CC1_SPEC through copy and paste.
Yes, there is a curious ‘inversion’ process where, to the OS, the architectures are sub-targets, but to the GCC implementation the OSs are sub-targets of the arch, it can be possible to work around this by declaring SUBTARGET_SPEC_XXXX and then appending that to the various users. However, it could be that even that will not work easily in this case.
Iain
prev parent reply other threads:[~2022-07-22 11:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 8:43 Sebastian Huber
2022-07-20 9:28 ` Sebastian Huber
2022-07-20 11:41 ` Alexander Monakov
2022-07-20 11:48 ` Sebastian Huber
2022-07-20 13:01 ` Alexander Monakov
2022-07-21 5:25 ` Sebastian Huber
2022-07-21 8:03 ` Iain Sandoe
2022-07-22 11:19 ` Sebastian Huber
2022-07-22 11:35 ` Iain Sandoe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8CBF2F47-39E7-433E-B294-ACB5EA95DA76@googlemail.com \
--to=idsandoe@googlemail.com \
--cc=gcc@gcc.gnu.org \
--cc=sebastian.huber@embedded-brains.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).