aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-04-17Undef attribute_relro on internal tests that include tls.hAdhemerval Zanella3-0/+6
So it does not clash with global definition.
2024-04-17elf: Do not cast TLS_DTV_UNALLOCATED to voidAdhemerval Zanella6-7/+6
The test-as-const-tlsdesc uses _Static_assert to verify the constants generated and clang warns the expression is not an integral constant expression because the cast performs a conversion (and it is no allowed).
2024-04-17malloc: Suppress clang warning on tst-memalignAdhemerval Zanella1-0/+4
2024-04-17x86: Use inhibit_stack_protector on tst-ifunc-isa.hAdhemerval Zanella1-2/+3
2024-04-17Move inhibit_stack_protector to its own headerAdhemerval Zanella2-14/+39
It is used on tests as well.
2024-04-17elf: Suppress clang warning on tst-unique4Adhemerval Zanella2-1/+7
clang warns that the instatiation of the variable is required, but no definition is available. They are implemented on tst-unique4lib.so. Checked on x86_64-linux-gnu.
2024-04-17elf: Suppress clang warning on tst-unique3Adhemerval Zanella1-3/+8
clang warns that the instatiation of the variable is required, but no definition is available. They are implemented on tst-unique3lib.so. Checked on x86_64-linux-gnu.
2024-04-17support: Suppress clang warning on tst-timespecAdhemerval Zanella1-0/+7
clang warns that converting from TIME_T_MAX to double (upper_bound) loses precision (from 9223372036854775807 to 9223372036854775808): tst-timespec.c:290:19: error: implicit conversion from 'time_t' (aka 'long') to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion] .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1, ^~~~~~~~~~ tst-timespec.c:48:20: note: expanded from macro 'TIME_T_MAX' #define TIME_T_MAX TYPE_MAXIMUM (time_t) ^~~~~~~~~~~~~~~~~~~~~ ../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM' ((t) (! TYPE_SIGNED (t) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It does not matter for the test. Checked on x86_64-linux-gnu.
2024-04-17misc: Disable some atomic tests on clangAdhemerval Zanella1-0/+6
clang warns on some atomic macros, disable for now: tst-atomic.c:463:7: error: unsupported inline asm: input with type 'int64_t' (aka 'long') matching output with type 'typeof (*&mem)' (aka 'int') if (catomic_exchange_and_add (&mem, 11) != 2 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../sysdeps/x86/atomic-machine.h:213:3: note: expanded from macro 'catomic_exchange_and_add' __arch_exchange_and_add_body (__arch_exchange_and_add_cprefix, __arch_c, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../sysdeps/x86/atomic-machine.h:199:12: note: expanded from macro '__arch_exchange_and_add_body' : "0" ((int64_t) cast_to_integer (__addval)), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tst-atomic.c:487:7: error: unsupported inline asm: input with type 'int64_t' (aka 'long') matching output with type 'typeof (*(&mem))' (aka 'int') if (catomic_increment_val (&mem) != 3) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../include/atomic.h:313:38: note: expanded from macro 'catomic_increment_val' # define catomic_increment_val(mem) (catomic_exchange_and_add ((mem), 1) + 1) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../sysdeps/x86/atomic-machine.h:213:3: note: expanded from macro 'catomic_exchange_and_add' __arch_exchange_and_add_body (__arch_exchange_and_add_cprefix, __arch_c, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../sysdeps/x86/atomic-machine.h:199:12: note: expanded from macro '__arch_exchange_and_add_body' : "0" ((int64_t) cast_to_integer (__addval)), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tst-atomic.c:501:7: error: unsupported inline asm: input with type 'int64_t' (aka 'long') matching output with type 'typeof (*(&mem))' (aka 'int') if (catomic_decrement_val (&mem) != 15) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../include/atomic.h:340:38: note: expanded from macro 'catomic_decrement_val' # define catomic_decrement_val(mem) (catomic_exchange_and_add ((mem), -1) - 1) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../sysdeps/x86/atomic-machine.h:213:3: note: expanded from macro 'catomic_exchange_and_add' __arch_exchange_and_add_body (__arch_exchange_and_add_cprefix, __arch_c, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../sysdeps/x86/atomic-machine.h:199:12: note: expanded from macro '__arch_exchange_and_add_body' : "0" ((int64_t) cast_to_integer (__addval)), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-04-17linux: Adequate tst-clone3 to c11 atomicsAdhemerval Zanella2-10/+6
2024-04-17posix: Suppress clang warning on bug-regex24Adhemerval Zanella1-0/+7
clang complains that adding a 'regoff_t' to a string doe snot append to it, and the printf idea below is to make rm_so an offset.
2024-04-17dirent: Remove variable lenght array structure for tst-getdents64.cAdhemerval Zanella1-11/+5
Clang emits the following warnings: ../sysdeps/unix/sysv/linux/tst-getdents64.c:111:18: error: fields must have a constant size: 'variable length array in structure' extension will never be supported char buffer[buffer_size]; ^
2024-04-17string: Suppress clang -Wsuspicious-bzero on testerAdhemerval Zanella1-0/+26
2024-04-17malloc: Only enable -Waggressive-loop-optimizations suppression for gccAdhemerval Zanella1-2/+2
2024-04-17Use check tests with trampolines iff compiler supports itAdhemerval Zanella4-7/+64
2024-04-17Handle pragma GCC optimize for clangAdhemerval Zanella2-2/+10
2024-04-17stdio: Suppress clang warnings for tst-vprintf-width-i18n.cAdhemerval Zanella1-0/+8
Clang issues the following warning: tst-vfprintf-width-i18n.c:51:34: error: invalid conversion specifier '1' [-Werror,-Wformat-invalid-specifier] TEST_COMPARE (sprintf (buf, "%I16d", 12345), 16); ~~^ Since it does not how to handle %I.
2024-04-17stdio: Suppress clang warnings for tst-unlockedio.cAdhemerval Zanella1-0/+4
Clang issues the following warnings: tst-unlockedio.c:63:36: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from -0 to 0 [-Werror,-Wliteral-conversion] || fwrite_unlocked (blah, 0, -0.0, fp) != 0 ~~~~~~~~~~~~~~~ ^~~~ tst-unlockedio.c:61:33: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from 0.25 to 0 [-Werror,-Wliteral-conversion] || fwrite_unlocked (--cp, 0.25, 16, fp) != 0 ~~~~~~~~~~~~~~~ ^~~~ tst-unlockedio.c:59:37: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from 0.25 to 0 [-Werror,-Wliteral-conversion] || fwrite_unlocked (cp++, 16, 0.25, fp) != 0 ~~~~~~~~~~~~~~~ ^~~~ tst-unlockedio.c:116:34: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from -0 to 0 [-Werror,-Wliteral-conversion] || fread_unlocked (buf, 0, -0.0, fp) != 0 ~~~~~~~~~~~~~~ ^~~~ tst-unlockedio.c:114:32: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from 0.25 to 0 [-Werror,-Wliteral-conversion] || fread_unlocked (--wp, 0.25, 16, fp) != 0 ~~~~~~~~~~~~~~ ^~~~ tst-unlockedio.c:112:36: error: implicit conversion from 'double' to 'size_t' (aka 'unsigned long') changes value from 0.25 to 0 [-Werror,-Wliteral-conversion] || fread_unlocked (wp++, 16, 0.25, fp) != 0 ~~~~~~~~~~~~~~ ^~~~
2024-04-17stdio: Suppress -Wformat only for gcc for tst-sprintf-errno.cAdhemerval Zanella1-1/+1
2024-04-17stdio: Disable attribute (optimize) if compiler does not support itAdhemerval Zanella1-1/+7
2024-04-17stdio: Disable clang warning on scanf13 testAdhemerval Zanella1-0/+15
2024-04-17stdio: Disable bug23-3 on clangAdhemerval Zanella1-0/+5
2024-04-17stdlib: Avoid internal definitions for tst-strtod5iAdhemerval Zanella1-0/+1
Compiler might emit a __copysign.
2024-04-17math: Fix test-totalorderl-ldbl-96 exponent settingAdhemerval Zanella1-2/+2
Clang issues the following warning: ../sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c:49:2: error: implicit truncation from 'int' to bit-field changes value from 65535 to -1 [-Werror,-Wbitfield-constant-conversion] SET_LDOUBLE_WORDS (ldnx, 0xffff, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../sysdeps/x86_64/fpu/math_ldbl.h:56:28: note: expanded from macro 'SET_LDOUBLE_WORDS' iw_u.parts.sign_exponent = (exp); \ ^ ~~~~~ ../sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c:51:2: error: implicit truncation from 'int' to bit-field changes value from 65535 to -1 [-Werror,-Wbitfield-constant-conversion] SET_LDOUBLE_WORDS (ldny, 0xffff, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../sysdeps/x86_64/fpu/math_ldbl.h:56:28: note: expanded from macro 'SET_LDOUBLE_WORDS' iw_u.parts.sign_exponent = (exp); \ ^ ~~~~~
2024-04-17And defines to __attribute__ (__noclone__) iff compiler supports it.Adhemerval Zanella44-100/+112
2024-04-17x86: Use -mfpmath=387 iff compiler supports itAdhemerval Zanella3-1/+38
2024-04-17x86_64: Disable libmvec tests if compiler does not support attribute '__simd__'Adhemerval Zanella3-0/+93
clang ignore the attribute, which is required by libmvec tests.
2024-04-17math: Only build tests for _Complex __int128 iff compiler supports itAdhemerval Zanella4-10/+76
clang fails building test-tgmath3-atan2.c: error: '_Complex __int128' is invalid _Complex __int128 var__Complex___int128 __attribute__ ((unused)); since it does not support _Complex with __int128. So disable the test in such case.
2024-04-17x86: Fix test-double-vlen include-nextAdhemerval Zanella4-4/+4
clang issues: ../sysdeps/x86_64/fpu/test-double-vlen4.h:20:2: error: #include_next in file found relative to primary source file or found by absolute path; will search from start of include path [-Werror,-Winclude-next-absolute-path] Instead of suppress the warning, it is simpler to just include the absolute path instead.
2024-04-17math: Define CMPLX(F,L) for clangAdhemerval Zanella1-1/+1
2024-04-17Use -ffloat-store iff compiler supports itAdhemerval Zanella3-2/+36
2024-04-17math: Fix clang warnings on bug-tgmath1.cAdhemerval Zanella1-0/+7
The type generic fabs expansion issues the floating point absolute with the wrong argument type (for instance cabs with floating point or fabs with a complex type) and clang warns that implicit conversion might incur in unexpected behavior.
2024-04-17math: Fix clang warnings for math/test-tgmath-ret.cAdhemerval Zanella1-0/+6
clang warns that since the global variables are only used to function calls (without being actually used), there are not needed and will not be emitted.
2024-04-17localedata: Fix clang warnings on testsAdhemerval Zanella1-1/+7
clang does not support 'I' specifier and handles it as a 'length modifier'.
2024-04-17configure: remove overly restrictive check for clangFangrui Song2-4/+4
2024-04-17riscv: Suppress clang confstr -Wignored-attributes feupdateenvAdhemerval Zanella1-0/+6
clang warns that the alias will be always resolve to __GI___feupdateenv even if weak definition of __GI_feupdateenv is overridden, which is really the intention.
2024-04-17riscv: Do not use cfi_label when building with clangAdhemerval Zanella4-3/+9
The .cfi_label is a gas extension not supported by clang. From a ziglang discussion [1], it seems that it is not really required. [1] https://github.com/ziglang/zig/issues/3340
2024-04-17string: Suppress clang confstr -Wignored-attributes on strlenAdhemerval Zanella1-0/+5
clang warns that the alias will be always resolve to __strlen even if weak definition of __GI_strlen is overridden, which is really the intention.
2024-04-17arm: Fix clang multi-arch build with ld.bfdAdhemerval Zanella5-13/+8
clang binds autogenerated memcpy/memset/memchr calls to the hidden internal symbols, different than gcc that binds without hidden attribute. And this triggers an linker issue with bfd: ld: BFD (GNU Binutils for Ubuntu) 2.38 assertion fail ../../bfd/elf32-arm.c:4286 Similar to other architectures, bind internal memcpy and memcpy symbols to the generic interface instead.
2024-04-17arm: Use vmov.i32 instead of vmov on neon memchrAdhemerval Zanella1-2/+2
clang fails with: error: invalid instruction
2024-04-17aarch64: Use 64-bit variable to access the special registersAdhemerval Zanella5-15/+29
clang issues: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths] while tryng to use 32 bit variables with 'mrs' to get/set the fpsr, dczid_el0, and ctr. Since all of 64 bit register, use the expected variable size.
2024-04-17i386: sfp-machine.h: Do no use asm input cast for clangAdhemerval Zanella1-18/+26
clang by default rejects the input casts with: error: invalid use of a cast in a inline asm context requiring an lvalue: remove the cast or build with -fheinous-gnu-extensions And even with -fheinous-gnu-extensions clang still throws an warning and also states that this option might be removed in the future. For gcc the cast are still useful [1] as type-checking. [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581722.html
2024-04-17i386: Move ___tls_get_addr hidden proto before its first usageAdhemerval Zanella1-2/+2
clang can not apply asm redirections to functions after these functions are used for the first time.
2024-04-17i386: Disable math_opt_barrier and math_force_eval for clangAdhemerval Zanella1-1/+1
It triggers an ICE with clang while building round_and_return.
2024-04-17x86: Add inhibit_stack_protector on ifunc handlersAdhemerval Zanella28-6/+40
2024-04-17x86: math: Avoid the use of __libgcc_cmp_return__ for __gcc_CMPtypeAdhemerval Zanella1-2/+11
2024-04-17x86: Define __HAVE_FLOAT128 for Clang and use __builtin_*f128 code pathFangrui Song1-7/+14
Clang supports __builtin_fabsf128 (despite not supporting _Float128) but it does not support __builtin_fabsq. Fallback to back to `typedef __float128 _Float128;` it clang is used.
2024-04-17x86: Use -msse2avx iff compiler supports itAdhemerval Zanella3-7/+40
2024-04-17support: Handle clang support/dtotimespec.c on dtotimespecAdhemerval Zanella1-1/+1
clang issues: dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka 'long') to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion] else if (sec >= 1.0 + TYPE_MAXIMUM (time_t)) ~ ^~~~~~~~~~~~~~~~~~~~~ ../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM' ((t) (! TYPE_SIGNED (t) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So explicit cast it to double.
2024-04-17stdio: Fix -Wtautological-constant-out-of-range-compare on clangAdhemerval Zanella1-1/+6
clang emits an error while building vfprintf-internal for default case: error: result of comparison of constant 255 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare] if (spec <= UCHAR_MAX The test is indeed not required for default non-wide build.