aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-04-18x86: Fix bsearch for compiler that do not define __USE_EXTERN_INLINESazanella/clangAdhemerval Zanella1-2/+8
The bsearch is called early during process initialization on Intel platform, before TCB has been set up; and if compiler does not enable __extern_inline it might call the symbol which might use an invalid thread-pointer. Expand the bsearch implementation from stdlib-bsearch.h with a different name. Checked on x86_64-linux-gnu with Intel chip.
2024-04-17x86_64: update libm test ulpsAdhemerval Zanella1-16/+19
By using clang standard libraries instead of libgcc.
2024-04-17x86_64: Provide __sfp_handle_exceptions if compiler does notAdhemerval Zanella4-1/+73
2024-04-17Build glibc with -ftrapping-mathAdhemerval Zanella1-0/+3
GCC enables it by default, clang in the other hand sets -fno-trapping-math. This is required to fix some math and stdlib tests that explicit raises floating point exceptions (i.e. stdlib/tst-strtod-round on aarch64).
2024-04-17x86_64: Fix mark-plt configure testAdhemerval Zanella2-3/+3
2024-04-17Enable --enable-fortify-source with clangAdhemerval Zanella18-14/+88
2024-04-17bench-malloc-thread: Add libm for powfAdhemerval Zanella1-0/+1
The bench-malloc-thread.c:63 does use powf and compiler might not optimzie it away.
2024-04-17benchtests: Remove clang warningsAdhemerval Zanella2-3/+3
clangs warns of the implicit cast of RAND_MAX to float: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-const-int-float-conversion] So make it explicit.
2024-04-17benchtests: Use __f128 on ilogbf128-inputs constantsAdhemerval Zanella1-4/+4
2024-04-17benchtests: Add attribute_optimizeAdhemerval Zanella3-13/+14
Similar to tst-printf-bz18872.sh, add the attribute_optimize to avoid build failures with compilers that do not support "GCC optimize" pragma.
2024-04-17aarch64: Fix gmon profiling with clangAdhemerval Zanella3-12/+23
Different than gcc, clang does not pass the LR value as the first argument. To avoid requiring change clang generated code (since same ABI is used on other OS, like FreeBSD), use a similar strategy as x86_64 to obtain both the frompc and the selfpc from the stack frame. Checked on aarch64-linux-gnu.
2024-04-17math: Fix potential underflow on ldbl-128 erflAdhemerval Zanella1-1/+1
The multiplication is only required if the branch is taken, and the compiler might not optimize it away. Checked on aarch64-linux-gnu with gcc and clang.
2024-04-17x86_64: update libm test ulpsAdhemerval Zanella1-1/+1
From clang.
2024-04-17aarch64: update libm test ulpsAdhemerval Zanella1-2/+2
From clang.
2024-04-17debug: Avoid clang optimize away required function on tst-ssp1.cAdhemerval Zanella1-0/+4
2024-04-17elf: Fix tests that require interposable symbolsAdhemerval Zanella2-0/+2
clang defaults to -fsemantic-interposition, which in turn trigger some optimizations (like inline) that makes some tests that rely on ELF symbol interposition to fail. For this case, explicit set the symbol as weak to avoid it.
2024-04-17math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAPAdhemerval Zanella2-6/+14
And make them a runtime check with assert since EXCEPTION_SET_FORCES_TRAP might not be an integral constant expression (i.e on i386).
2024-04-17Fix loongarch stpcpy on loaderAdhemerval Zanella1-0/+3
2024-04-17gmon: Remove ununsed LDFLAGS-tst-profile-statiAdhemerval Zanella1-4/+2
2024-04-17posix: Remove the __strcpy_chk from glob testsAdhemerval Zanella2-2/+15
Not all compiler supports the builtin.
2024-04-17x86: Use -mshstk instead of '#pragma GCC target'Adhemerval Zanella3-4/+2
2024-04-17i686: Do not build ifunc tests if compiler does not generate supported ↵Adhemerval Zanella6-6/+71
relocations clang with --target i668 might not produce supported relocations that ld.bfd can use for -static-pie without -fPIC, which are used on some tests. Disable them for now.
2024-04-17i386: Disable some tests on clangAdhemerval Zanella3-0/+14
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.
2024-04-17configure: Use -Wno-restrict iff compiler supports itAdhemerval Zanella3-2/+34
2024-04-17stdio: Fix clang warnings on testsAdhemerval Zanella1-0/+5
clang does not support 'I' specifier and handles it as a 'length modifier'.
2024-04-17Use -Wl,--undefined-version if linker requires itAdhemerval Zanella3-0/+104
The lld might set --no-undefined-version as default, which triggers a lot of error since the Versions files may contain entries not exported by all ABI. The -Wl,--undefined-version can not be set by default, since binutils ld does not support (although gold does). So it requires to be checked at configure if linker requires and enabled it conditionally.
2024-04-17linux: Avoid indirection on operand of type 'void *' for gettimeofdayAdhemerval Zanella1-2/+2
ISO C does not allow and it fixes a clang issue with -Werror,-Wvoid-ptr-dereference. Checked on x86_64-linux-gnu.
2024-04-17Fix libc_cv_protected_data check if compiler defaults to PIEAdhemerval Zanella2-2/+2
2024-04-17stdio: Suppress %Z format for clangAdhemerval Zanella5-0/+35
clang does not handle %Z on print, and just suppressing -Wformat-invalid-specifier might trigger another warning for extra arguments (since %Z is ignored). So suppress -Wformat-extra-args as well. For tst-fphex.c a heavy hammer is used since the printf is more complex and clang thrown a more generic warning.
2024-04-17resolve: Fix implicit conversion on tst-resolv-invalid-cnameAdhemerval Zanella1-2/+2
tst-resolv-invalid-cname.c:313:17: error: implicit conversion from 'int' to 'char' changes value from 192 to -64 [-Werror,-Wconstant-conversion] addr[0] = 192; ~ ^~~ tst-resolv-invalid-cname.c:314:17: error: implicit conversion from 'int' to 'char' changes value from 168 to -88 [-Werror,-Wconstant-conversion] addr[1] = 168; ~ ^~~
2024-04-17elf: Use volatile to set __rseq_size and __rseq_offsetAdhemerval Zanella1-2/+2
To avoid compiler to optimize them away.
2024-04-17elf: Disable unload4 test on clangAdhemerval Zanella1-0/+5
It triggers and infintie loop.
2024-04-17stdio: Fix tst-vfprintf-user-type on clangAdhemerval Zanella1-1/+1
clang always evaluate the pointer alias compasion as false.
2024-04-17math: Do not use __builtin_isinf on clangAdhemerval Zanella1-2/+1
It does not handle pseudo normal numbers.
2024-04-17math: Do not use __builtin_isnan on clangAdhemerval Zanella3-3/+6
It does not handle pseudo normal numbers.
2024-04-17math: Do not use __builtin_fpclassify on clangAdhemerval Zanella1-4/+2
It does not handle pseudo normal numbers.
2024-04-17math: Fix isgreater* and isless* for clangAdhemerval Zanella1-1/+1
clang does not check for unordered numbers with builtins for _Float128 type.
2024-04-17math: Handle fabsf128 intra PLT for !__USE_EXTERN_INLINESAdhemerval Zanella2-3/+11
If compiler does not support __USE_EXTERN_INLINES we need to route fabsf128 call to an internal symbol.
2024-04-17intl: Use strcpy on _nl_make_l10nflistAdhemerval Zanella1-1/+1
It avoid compiler to turn is on strcpy, which might generate a strcpy PLT call since there is no explicit redirection.
2024-04-17string: mempcy and stpcpy builtins internallyAdhemerval Zanella1-2/+6
2024-04-17Handle abort call for -fexceptions callAdhemerval Zanella2-2/+9
clang might generate an abort call when cleanup functions (set by __attribute__ ((cleanup)) calls functions not marked as nothrow. We can mitigate by marking some internal functions as __THROW, but it is not possible for functions that issue used-provided callbacks (for instance pthread_once).
2024-04-17elf: Disable tst-dlopen-nodelete-reloc if compiler does not generate ↵Adhemerval Zanella1-15/+15
STB_GNU_UNIQUE The test requires STB_GNU_UNIQUE symbols so NODELETE is propagated by do_lookup_unique.
2024-04-17x86: Use bool for C++ on x86.hAdhemerval Zanella3-3/+10
Not all compilers might define C99 _Bool type on C++ mode in old standard modes (clang does not define for -std=c++98).
2024-04-17malloc: Suppress clang warning on tst-aligned-allocAdhemerval Zanella1-0/+13
2024-04-17malloc: Disable malloc builtins on testsAdhemerval Zanella1-0/+15
To avoid compiler optimize away memory allocation calls, which might interfere when both valid and invalid calls checks.
2024-04-17Only use -finput-charset=ascii iff compiler supports itAdhemerval Zanella5-3/+46
2024-04-17conform: Do not use __SIG_ATOMIC_TYPE__Adhemerval Zanella2-2/+6
clang does not define __SIG_ATOMIC_TYPE__, instead add another directive ('size:') which instruct to use an interger type of defined minimum size.
2024-04-17conform: Replace _Static_assert with macroAdhemerval Zanella1-5/+16
clang does not allow non integral constant expression in _Static_assert. Replace with a macro that uses name bit-field where an invalid constant expression sets its size to 0, resulting in a error.
2024-04-17conform: Use -dD instead of -dN on compiler invocationAdhemerval Zanella1-3/+3
clang does not support -dN.
2024-04-17localedata: Use hexadecimal character escape on testsAdhemerval Zanella11-36/+39
Instead of latin1 ones.