From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 963AC3857806; Wed, 30 Aug 2023 12:43:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 963AC3857806 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693399404; bh=yJFYHw25bnESWtWDUCTO1Xw6oiYLFVs5FI6Z83J6jFY=; h=From:To:Subject:Date:From; b=aGJd3LwfWa7YAdYvWhtMbtkgjtR8ZqSIe6+fts+pRdgEm5WbBAVLJXx2sHA3yKrGJ dm+2kvFfCwksNr2tId4UMTEtgGQ82PIrQDk2Slpxh+NeYP3W6+gCmSz7/lyHK0H7+X IPJ5ffs+0DILSi6rE3gWHuRA0vjp7UM7fAD79Sqk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] i386: Disable some tests on clang X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 4efa6fa58e9ff3e725c0f0b1a5287d94c5d3cd89 X-Git-Newrev: 390439fd8d6520aed04a523774fa93c11241f45d Message-Id: <20230830124324.963AC3857806@sourceware.org> Date: Wed, 30 Aug 2023 12:43:24 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=390439fd8d6520aed04a523774fa93c11241f45d commit 390439fd8d6520aed04a523774fa93c11241f45d Author: Adhemerval Zanella Date: Fri Jul 28 09:34:03 2023 -0300 i386: Disable some tests on clang clang generated R_I386_PC32 instead of R_386_PLT32 for static ifoo calls, which triggers an ld issues where it can not link non-PIC and PIC objects. This seems to be a clang bug. Diff: --- elf/ifuncmain9.c | 7 ++++++- sysdeps/x86/tst-ifunc-isa-1.c | 5 +++++ sysdeps/x86/tst-ifunc-isa-2.c | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/elf/ifuncmain9.c b/elf/ifuncmain9.c index e37c391f02..10659c9938 100644 --- a/elf/ifuncmain9.c +++ b/elf/ifuncmain9.c @@ -23,6 +23,7 @@ # include # include # include +# include /* Do not use the test framework, so that the process setup is not disturbed. */ @@ -50,13 +51,16 @@ resolver (void) ++resolver_called; return implementation; } -DIAG_POP_NEEDS_COMMENT_CLANG; static int magic (void) __attribute__ ((ifunc ("resolver"))); +DIAG_POP_NEEDS_COMMENT_CLANG; int main (void) { +#if defined __clang__ && defined __i386__ + return EXIT_UNSUPPORTED; +#else bool errors = false; if (implementation_called != 0) @@ -93,4 +97,5 @@ main (void) } return errors; +#endif } diff --git a/sysdeps/x86/tst-ifunc-isa-1.c b/sysdeps/x86/tst-ifunc-isa-1.c index 94c3944aec..991e70d19e 100644 --- a/sysdeps/x86/tst-ifunc-isa-1.c +++ b/sysdeps/x86/tst-ifunc-isa-1.c @@ -17,14 +17,19 @@ . */ #include +#include #include "tst-ifunc-isa.h" static int do_test (void) { +#if defined __clang__ && defined __i386__ + return EXIT_UNSUPPORTED; +#else enum isa value = foo (); enum isa expected = get_isa (); return value == expected ? EXIT_SUCCESS : EXIT_FAILURE; +#endif } #include diff --git a/sysdeps/x86/tst-ifunc-isa-2.c b/sysdeps/x86/tst-ifunc-isa-2.c index 7521bc7c38..93b617844f 100644 --- a/sysdeps/x86/tst-ifunc-isa-2.c +++ b/sysdeps/x86/tst-ifunc-isa-2.c @@ -23,12 +23,16 @@ static int do_test (void) { +#if defined __clang__ && defined __i386__ + return EXIT_UNSUPPORTED; +#else /* CPU must support SSE2. */ if (!__builtin_cpu_supports ("sse2")) return EXIT_UNSUPPORTED; enum isa value = foo (); /* All ISAs, but SSE2, are disabled by tunables. */ return value == sse2 ? EXIT_SUCCESS : EXIT_FAILURE; +#endif } #include