From: "Ludovic Courtès" <ludo@gnu.org>
To: lloda <lloda@sarc.name>
Cc: 60234@debbugs.gnu.org
Subject: bug#60234: Build failure on mac os 12.6 / gcc 12.2
Date: Wed, 18 Jan 2023 23:16:41 +0100 [thread overview]
Message-ID: <87k01h8tqd.fsf@gnu.org> (raw)
In-Reply-To: <5404ACA9-05C6-4349-9736-3185914D8A0F@sarc.name> (lloda@sarc.name's message of "Wed, 21 Dec 2022 07:49:37 +0100")
Hi Daniel,
lloda <lloda@sarc.name> skribis:
> .../libguile/threads.h:194:43: error: 'scm_i_current_thread' is defined with tls model global-dynamic
> 194 | SCM_INTERNAL SCM_THREAD_LOCAL scm_thread *scm_i_current_thread;
> | ^
> .../libguile/threads.c:357:30: note: previously defined here as local-dynamic
> 357 | SCM_THREAD_LOCAL scm_thread *scm_i_current_thread = NULL;
>
> Simply repeating SCM_INTERNAL in the .c fixes it...
The problem is that ‘SCM_INTERNAL’ is synonymous with ‘extern’, which
makes no sense for a definition (threads.c:357), so rightfully GCC
GNU/Linux rightfully complains:
--8<---------------cut here---------------start------------->8---
CC libguile_3.0_la-threads.lo
threads.c:358:43: warning: 'scm_i_current_thread' initialized and declared 'extern'
358 | SCM_INTERNAL SCM_THREAD_LOCAL scm_thread *scm_i_current_thread = NULL;
| ^~~~~~~~~~~~~~~~~~~~
--8<---------------cut here---------------end--------------->8---
It’s just a warning, but still not looking good.
Is there something else at play, such as a ‘-ftls-model’ flag being
passed to GCC somehow (info “(gcc) Code Gen Options")?
If not, should we have:
#define SCM_THREAD_LOCAL \
__thread __attribute__ ((__tls_model__ ("global-dynamic")))
instead (info "(gcc) Common Variable Attributes")?
Would that work with Clang?
Ludo’.
next prev parent reply other threads:[~2023-01-18 22:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 6:49 bug#60234: Build failure on mac os 12.6 / gcc 12.2 lloda
2022-12-21 7:06 ` lloda
2023-01-18 22:16 ` Ludovic Courtès [this message]
2023-01-20 9:38 ` lloda
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k01h8tqd.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=60234@debbugs.gnu.org \
--cc=lloda@sarc.name \
/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).