Use -ftls-model=local-exec for RTEMS by default?

2022-07-20 Thread Sebastian Huber
Hello, RTEMS applications are usually fully statically linked together with the operating system. So, we can use the -ftls-model=local-exec TLS model. The default value for this option is defined in common.opt: ftls-model= Common Joined RejectNegative Enum(tls_model) Var(flag_tls_default) In

Re: [PATCH v2] powerpc: add documentation for HWCAPs

2022-07-20 Thread Nicholas Piggin via Gcc
Excerpts from Tulio Magno Quites Machado Filho's message of July 16, 2022 6:17 am: > Segher Boessenkool writes: > >> That is a usability problem. Can it be fixed, or will that create its >> own compatibility problems? In practice I mean. If it is, the C >> libraries could fix it up, for new p

Re: Use -ftls-model=local-exec for RTEMS by default?

2022-07-20 Thread Sebastian Huber
On 20/07/2022 10:43, Sebastian Huber wrote: Hello, RTEMS applications are usually fully statically linked together with the operating system. So, we can use the -ftls-model=local-exec TLS model. The default value for this option is defined in common.opt: ftls-model= Common Joined RejectNegat

Re: Use -ftls-model=local-exec for RTEMS by default?

2022-07-20 Thread Alexander Monakov via Gcc
On Wed, 20 Jul 2022, Sebastian Huber wrote: > How does Ada get its default TLS model? You shouldn't need to do anything special, GCC automatically selects initial-exec or local-exec for non-PIC (including PIE). Alexander

Re: Use -ftls-model=local-exec for RTEMS by default?

2022-07-20 Thread Sebastian Huber
On 20/07/2022 13:41, Alexander Monakov wrote: On Wed, 20 Jul 2022, Sebastian Huber wrote: How does Ada get its default TLS model? You shouldn't need to do anything special, GCC automatically selects initial-exec or local-exec for non-PIC (including PIE). I am not sure, for this test program:

Re: Use -ftls-model=local-exec for RTEMS by default?

2022-07-20 Thread Alexander Monakov via Gcc
On Wed, 20 Jul 2022, Sebastian Huber wrote: > On 20/07/2022 13:41, Alexander Monakov wrote: > > On Wed, 20 Jul 2022, Sebastian Huber wrote: > > > >> How does Ada get its default TLS model? > > You shouldn't need to do anything special, GCC automatically selects > > initial-exec or local-exec fo

Re: Use -ftls-model=local-exec for RTEMS by default?

2022-07-20 Thread Sebastian Huber
On 20.07.22 15:01, Alexander Monakov wrote: On Wed, 20 Jul 2022, Sebastian Huber wrote: On 20/07/2022 13:41, Alexander Monakov wrote: On Wed, 20 Jul 2022, Sebastian Huber wrote: How does Ada get its default TLS model? You shouldn't need to do anything special, GCC automatically selects init