public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/31655] clang can't build glibc with stack protector
Date: Thu, 18 Apr 2024 19:37:16 +0000 [thread overview]
Message-ID: <bug-31655-131-sT43yWMwKn@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31655-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=31655
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Adhemerval Zanella from comment #4)
> I think we make explicit the constraints in the code, where we can't call
> external symbols in static build. Something like:
>
> diff --git a/sysdeps/x86/dl-cacheinfo.h b/sysdeps/x86/dl-cacheinfo.h
> index 5a98f70364..1943dc7db6 100644
> --- a/sysdeps/x86/dl-cacheinfo.h
> +++ b/sysdeps/x86/dl-cacheinfo.h
> @@ -98,6 +98,12 @@ static const struct intel_02_cache_info
>
> #define nintel_02_known (sizeof (intel_02_known) / sizeof (intel_02_known
> [0]))
>
> +/* The bsearch is called early during process initialization before TCB has
> + been set up; and if the compiler does not enable __extern_inline it
> might call
> + the symbol which might use an invalid thread-pointer. */
> +#define bsearch bsearch_inline
> +#include <bits/stdlib-bsearch.h>
> +
> static int
> intel_02_known_compare (const void *p1, const void *p2)
> {
This alone should be sufficient.
--
You are receiving this mail because:
You are on the CC list for the bug.
prev parent reply other threads:[~2024-04-18 19:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 15:00 [Bug libc/31655] New: " hjl.tools at gmail dot com
2024-04-18 15:08 ` [Bug libc/31655] " adhemerval.zanella at linaro dot org
2024-04-18 17:43 ` skpgkp1 at gmail dot com
2024-04-18 17:45 ` hjl.tools at gmail dot com
2024-04-18 18:10 ` adhemerval.zanella at linaro dot org
2024-04-18 18:13 ` skpgkp1 at gmail dot com
2024-04-18 19:31 ` adhemerval.zanella at linaro dot org
2024-04-18 19:37 ` hjl.tools at gmail dot com [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=bug-31655-131-sT43yWMwKn@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@sourceware.org \
/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).