From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 68E7F3861021; Thu, 18 Apr 2024 19:37:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68E7F3861021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1713469036; bh=sRb50VbqsaXxji1+zy6/OFQ/RjyTWm5azLFR83ruoAc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MBdPC2gxyOg2lMpRS0lHYb/zoU+IZf+RtavJDpoth68eYRktd4ztzJYjUetlMMO4g qzNTJuaHLzvz4vuRm9VDx5NuA24U2Xv1/ZlfmPhQ8aK0E+MoMKUTDh3kiRVzlmWP9E xTnkhKqCDv8wwwlXVMwIybEwcxz0bh86KxOTxU1o= From: "hjl.tools at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.40 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31655 --- Comment #7 from H.J. Lu --- (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: >=20 > 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 >=20 > #define nintel_02_known (sizeof (intel_02_known) / sizeof (intel_02_known > [0])) >=20 > +/* 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 > + > static int > intel_02_known_compare (const void *p1, const void *p2) > { This alone should be sufficient. --=20 You are receiving this mail because: You are on the CC list for the bug.=