about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* x86: Fix bsearch for compiler that do not define __USE_EXTERN_INLINES azanella/clangAdhemerval Zanella2024-04-181-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.
* x86_64: update libm test ulpsAdhemerval Zanella2024-04-171-16/+19
| | | | By using clang standard libraries instead of libgcc.
* x86_64: Provide __sfp_handle_exceptions if compiler does notAdhemerval Zanella2024-04-174-1/+73
|
* Build glibc with -ftrapping-mathAdhemerval Zanella2024-04-171-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).
* x86_64: Fix mark-plt configure testAdhemerval Zanella2024-04-172-3/+3
|
* Enable --enable-fortify-source with clangAdhemerval Zanella2024-04-1718-14/+88
|
* bench-malloc-thread: Add libm for powfAdhemerval Zanella2024-04-171-0/+1
| | | | | The bench-malloc-thread.c:63 does use powf and compiler might not optimzie it away.
* benchtests: Remove clang warningsAdhemerval Zanella2024-04-172-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.
* benchtests: Use __f128 on ilogbf128-inputs constantsAdhemerval Zanella2024-04-171-4/+4
|
* benchtests: Add attribute_optimizeAdhemerval Zanella2024-04-173-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.
* aarch64: Fix gmon profiling with clangAdhemerval Zanella2024-04-173-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.
* math: Fix potential underflow on ldbl-128 erflAdhemerval Zanella2024-04-171-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.
* x86_64: update libm test ulpsAdhemerval Zanella2024-04-171-1/+1
| | | | From clang.
* aarch64: update libm test ulpsAdhemerval Zanella2024-04-171-2/+2
| | | | From clang.
* debug: Avoid clang optimize away required function on tst-ssp1.cAdhemerval Zanella2024-04-171-0/+4
|
* elf: Fix tests that require interposable symbolsAdhemerval Zanella2024-04-172-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.
* math: Remove _Static_assert that uses EXCEPTION_SET_FORCES_TRAPAdhemerval Zanella2024-04-172-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).
* Fix loongarch stpcpy on loaderAdhemerval Zanella2024-04-171-0/+3
|
* gmon: Remove ununsed LDFLAGS-tst-profile-statiAdhemerval Zanella2024-04-171-4/+2
|
* posix: Remove the __strcpy_chk from glob testsAdhemerval Zanella2024-04-172-2/+15
| | | | Not all compiler supports the builtin.
* x86: Use -mshstk instead of '#pragma GCC target'Adhemerval Zanella2024-04-173-4/+2
|
* i686: Do not build ifunc tests if compiler does not generate supported ↵Adhemerval Zanella2024-04-176-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.
* i386: Disable some tests on clangAdhemerval Zanella2024-04-173-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.
* configure: Use -Wno-restrict iff compiler supports itAdhemerval Zanella2024-04-173-2/+34
|
* stdio: Fix clang warnings on testsAdhemerval Zanella2024-04-171-0/+5
| | | | | clang does not support 'I' specifier and handles it as a 'length modifier'.
* Use -Wl,--undefined-version if linker requires itAdhemerval Zanella2024-04-173-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.
* linux: Avoid indirection on operand of type 'void *' for gettimeofdayAdhemerval Zanella2024-04-171-2/+2
| | | | | | | ISO C does not allow and it fixes a clang issue with -Werror,-Wvoid-ptr-dereference. Checked on x86_64-linux-gnu.
* Fix libc_cv_protected_data check if compiler defaults to PIEAdhemerval Zanella2024-04-172-2/+2
|
* stdio: Suppress %Z format for clangAdhemerval Zanella2024-04-175-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.
* resolve: Fix implicit conversion on tst-resolv-invalid-cnameAdhemerval Zanella2024-04-171-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; ~ ^~~
* elf: Use volatile to set __rseq_size and __rseq_offsetAdhemerval Zanella2024-04-171-2/+2
| | | | To avoid compiler to optimize them away.
* elf: Disable unload4 test on clangAdhemerval Zanella2024-04-171-0/+5
| | | | It triggers and infintie loop.
* stdio: Fix tst-vfprintf-user-type on clangAdhemerval Zanella2024-04-171-1/+1
| | | | clang always evaluate the pointer alias compasion as false.
* math: Do not use __builtin_isinf on clangAdhemerval Zanella2024-04-171-2/+1
| | | | It does not handle pseudo normal numbers.
* math: Do not use __builtin_isnan on clangAdhemerval Zanella2024-04-173-3/+6
| | | | It does not handle pseudo normal numbers.
* math: Do not use __builtin_fpclassify on clangAdhemerval Zanella2024-04-171-4/+2
| | | | It does not handle pseudo normal numbers.
* math: Fix isgreater* and isless* for clangAdhemerval Zanella2024-04-171-1/+1
| | | | | clang does not check for unordered numbers with builtins for _Float128 type.
* math: Handle fabsf128 intra PLT for !__USE_EXTERN_INLINESAdhemerval Zanella2024-04-172-3/+11
| | | | | If compiler does not support __USE_EXTERN_INLINES we need to route fabsf128 call to an internal symbol.
* intl: Use strcpy on _nl_make_l10nflistAdhemerval Zanella2024-04-171-1/+1
| | | | | It avoid compiler to turn is on strcpy, which might generate a strcpy PLT call since there is no explicit redirection.
* string: mempcy and stpcpy builtins internallyAdhemerval Zanella2024-04-171-2/+6
|
* Handle abort call for -fexceptions callAdhemerval Zanella2024-04-172-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).
* elf: Disable tst-dlopen-nodelete-reloc if compiler does not generate ↵Adhemerval Zanella2024-04-171-15/+15
| | | | | | | STB_GNU_UNIQUE The test requires STB_GNU_UNIQUE symbols so NODELETE is propagated by do_lookup_unique.
* x86: Use bool for C++ on x86.hAdhemerval Zanella2024-04-173-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).
* malloc: Suppress clang warning on tst-aligned-allocAdhemerval Zanella2024-04-171-0/+13
|
* malloc: Disable malloc builtins on testsAdhemerval Zanella2024-04-171-0/+15
| | | | | To avoid compiler optimize away memory allocation calls, which might interfere when both valid and invalid calls checks.
* Only use -finput-charset=ascii iff compiler supports itAdhemerval Zanella2024-04-175-3/+46
|
* conform: Do not use __SIG_ATOMIC_TYPE__Adhemerval Zanella2024-04-172-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.
* conform: Replace _Static_assert with macroAdhemerval Zanella2024-04-171-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.
* conform: Use -dD instead of -dN on compiler invocationAdhemerval Zanella2024-04-171-3/+3
| | | | clang does not support -dN.
* localedata: Use hexadecimal character escape on testsAdhemerval Zanella2024-04-1711-36/+39
| | | | Instead of latin1 ones.