Add -ftls-model=local-exec to embedded builds #3149

Merged
kilograham merged 4 commits from local-exec into develop 2026-08-21 15:55:33 -05:00
kilograham commented 2026-08-19 18:39:05 -05:00 (Migrated from github.com)
No description provided.
peterharperuk (Migrated from github.com) reviewed 2026-08-19 18:39:05 -05:00
will-v-pi (Migrated from github.com) reviewed 2026-08-19 18:39:05 -05:00
kilograham commented 2026-08-19 19:58:01 -05:00 (Migrated from github.com)

fixes #3112

fixes #3112
Wren6991 (Migrated from github.com) reviewed 2026-08-19 21:05:31 -05:00
@ -0,0 +1,29 @@
/**
Wren6991 (Migrated from github.com) commented 2026-08-19 21:05:31 -05:00

Trying to parse the LLM babble: this seems to insinuate you still get a GOT indirection for TLS in a different TU. I thought the whole point of forcing this TLS model was to not do that, and always emit tp-relative accesses.

Trying to parse the LLM babble: this seems to insinuate you still get a GOT indirection for TLS in a different TU. I thought the whole point of forcing this TLS model was to *not* do that, and always emit `tp`-relative accesses.
lurch (Migrated from github.com) reviewed 2026-08-20 07:59:39 -05:00
@ -56,2 +56,4 @@
)
# :tls_local_exec configure local-exec tls model during compilation, so it doesn't use GOT indirection
cc_args(
lurch (Migrated from github.com) commented 2026-08-20 07:59:39 -05:00

It looks like this has been inserted in the wrong place? Line 58 (before this insertion) describes the :no_canonical_system_headers and :no_canonical_prefixes settings, and line 72 (after this insertion) is adding the no_canonical_system_headers setting and line 78 is adding the no_canonical_prefixes setting.

It looks like this has been inserted in the wrong place? Line 58 (before this insertion) describes the `:no_canonical_system_headers` and `:no_canonical_prefixes` settings, and line 72 (after this insertion) is adding the `no_canonical_system_headers` setting and line 78 is adding the `no_canonical_prefixes` setting.
lurch commented 2026-08-20 08:02:41 -05:00 (Migrated from github.com)

What does "embedded builds" mean in this context?

What does "embedded builds" mean in this context?
kilograham (Migrated from github.com) reviewed 2026-08-20 17:09:13 -05:00
@ -0,0 +1,29 @@
/**
kilograham (Migrated from github.com) commented 2026-08-20 17:09:13 -05:00

it did mention the fact that this only happens with the old tls-model ... but it is something worth testing works anyway - i have modified the comment

it did mention the fact that this only happens with the old tls-model ... but it is something worth testing works anyway - i have modified the comment
kilograham (Migrated from github.com) reviewed 2026-08-20 17:09:29 -05:00
@ -56,2 +56,4 @@
)
# :tls_local_exec configure local-exec tls model during compilation, so it doesn't use GOT indirection
cc_args(
kilograham (Migrated from github.com) commented 2026-08-20 17:09:29 -05:00

yup i have moved it up

yup i have moved it up
Wren6991 commented 2026-08-20 19:22:58 -05:00 (Migrated from github.com)

What does "embedded builds" mean in this context?

I would guess non-host builds, aka PICO_ON_DEVICE=1

> What does "embedded builds" mean in this context? I would guess non-`host` builds, aka `PICO_ON_DEVICE=1`
Wren6991 (Migrated from github.com) reviewed 2026-08-20 19:23:29 -05:00
@ -0,0 +1,29 @@
/**
Wren6991 (Migrated from github.com) commented 2026-08-20 19:23:29 -05:00

Thanks, the one you wrote is much better.

Thanks, the one you wrote is much better.
Wren6991 (Migrated from github.com) approved these changes 2026-08-20 19:23:42 -05:00
lurch (Migrated from github.com) reviewed 2026-08-21 09:05:03 -05:00
@ -26,2 +28,4 @@
for (int i=0;i<COUNT;i++) {
counter += delta;
// the same thing again, but on a thread local this TU only has a declaration for
extern_bump(delta);
lurch (Migrated from github.com) commented 2026-08-21 09:05:03 -05:00

Was this supposed to be

        counter += extern_bump(delta);

(Or if not, should extern_bump be declared as returning void instead of int?)

Was this supposed to be ```suggestion counter += extern_bump(delta); ``` (Or if not, should `extern_bump` be declared as returning `void` instead of `int`?)
kilograham (Migrated from github.com) reviewed 2026-08-21 15:55:19 -05:00
@ -26,2 +28,4 @@
for (int i=0;i<COUNT;i++) {
counter += delta;
// the same thing again, but on a thread local this TU only has a declaration for
extern_bump(delta);
kilograham (Migrated from github.com) commented 2026-08-21 15:55:19 -05:00

the test is fine - could return void but i don't care enough ;-)

the test is fine - could return void but i don't care enough ;-)
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!3149
No description provided.