about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* Undef attribute_relro on internal tests that include tls.hAdhemerval Zanella2024-04-173-0/+6
| | | | So it does not clash with global definition.
* elf: Do not cast TLS_DTV_UNALLOCATED to voidAdhemerval Zanella2024-04-176-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).
* malloc: Suppress clang warning on tst-memalignAdhemerval Zanella2024-04-171-0/+4
|
* x86: Use inhibit_stack_protector on tst-ifunc-isa.hAdhemerval Zanella2024-04-171-2/+3
|
* Move inhibit_stack_protector to its own headerAdhemerval Zanella2024-04-172-14/+39
| | | | It is used on tests as well.
* elf: Suppress clang warning on tst-unique4Adhemerval Zanella2024-04-172-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.
* elf: Suppress clang warning on tst-unique3Adhemerval Zanella2024-04-171-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.
* support: Suppress clang warning on tst-timespecAdhemerval Zanella2024-04-171-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.
* misc: Disable some atomic tests on clangAdhemerval Zanella2024-04-171-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)), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* linux: Adequate tst-clone3 to c11 atomicsAdhemerval Zanella2024-04-172-10/+6
|
* posix: Suppress clang warning on bug-regex24Adhemerval Zanella2024-04-171-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.
* dirent: Remove variable lenght array structure for tst-getdents64.cAdhemerval Zanella2024-04-171-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]; ^
* string: Suppress clang -Wsuspicious-bzero on testerAdhemerval Zanella2024-04-171-0/+26
|
* malloc: Only enable -Waggressive-loop-optimizations suppression for gccAdhemerval Zanella2024-04-171-2/+2
|
* Use check tests with trampolines iff compiler supports itAdhemerval Zanella2024-04-174-7/+64
|
* Handle pragma GCC optimize for clangAdhemerval Zanella2024-04-172-2/+10
|
* stdio: Suppress clang warnings for tst-vprintf-width-i18n.cAdhemerval Zanella2024-04-171-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.
* stdio: Suppress clang warnings for tst-unlockedio.cAdhemerval Zanella2024-04-171-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 ~~~~~~~~~~~~~~ ^~~~
* stdio: Suppress -Wformat only for gcc for tst-sprintf-errno.cAdhemerval Zanella2024-04-171-1/+1
|
* stdio: Disable attribute (optimize) if compiler does not support itAdhemerval Zanella2024-04-171-1/+7
|
* stdio: Disable clang warning on scanf13 testAdhemerval Zanella2024-04-171-0/+15
|
* stdio: Disable bug23-3 on clangAdhemerval Zanella2024-04-171-0/+5
|
* stdlib: Avoid internal definitions for tst-strtod5iAdhemerval Zanella2024-04-171-0/+1
| | | | Compiler might emit a __copysign.
* math: Fix test-totalorderl-ldbl-96 exponent settingAdhemerval Zanella2024-04-171-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); \ ^ ~~~~~
* And defines to __attribute__ (__noclone__) iff compiler supports it.Adhemerval Zanella2024-04-1744-100/+112
|
* x86: Use -mfpmath=387 iff compiler supports itAdhemerval Zanella2024-04-173-1/+38
|
* x86_64: Disable libmvec tests if compiler does not support attribute '__simd__'Adhemerval Zanella2024-04-173-0/+93
| | | | clang ignore the attribute, which is required by libmvec tests.
* math: Only build tests for _Complex __int128 iff compiler supports itAdhemerval Zanella2024-04-174-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.
* x86: Fix test-double-vlen include-nextAdhemerval Zanella2024-04-174-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.
* math: Define CMPLX(F,L) for clangAdhemerval Zanella2024-04-171-1/+1
|
* Use -ffloat-store iff compiler supports itAdhemerval Zanella2024-04-173-2/+36
|
* math: Fix clang warnings on bug-tgmath1.cAdhemerval Zanella2024-04-171-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.
* math: Fix clang warnings for math/test-tgmath-ret.cAdhemerval Zanella2024-04-171-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.
* localedata: Fix clang warnings on testsAdhemerval Zanella2024-04-171-1/+7
| | | | | clang does not support 'I' specifier and handles it as a 'length modifier'.
* configure: remove overly restrictive check for clangFangrui Song2024-04-172-4/+4
|
* riscv: Suppress clang confstr -Wignored-attributes feupdateenvAdhemerval Zanella2024-04-171-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.
* riscv: Do not use cfi_label when building with clangAdhemerval Zanella2024-04-174-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
* string: Suppress clang confstr -Wignored-attributes on strlenAdhemerval Zanella2024-04-171-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.
* arm: Fix clang multi-arch build with ld.bfdAdhemerval Zanella2024-04-175-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.
* arm: Use vmov.i32 instead of vmov on neon memchrAdhemerval Zanella2024-04-171-2/+2
| | | | | | clang fails with: error: invalid instruction
* aarch64: Use 64-bit variable to access the special registersAdhemerval Zanella2024-04-175-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.
* i386: sfp-machine.h: Do no use asm input cast for clangAdhemerval Zanella2024-04-171-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
* i386: Move ___tls_get_addr hidden proto before its first usageAdhemerval Zanella2024-04-171-2/+2
| | | | | clang can not apply asm redirections to functions after these functions are used for the first time.
* i386: Disable math_opt_barrier and math_force_eval for clangAdhemerval Zanella2024-04-171-1/+1
| | | | It triggers an ICE with clang while building round_and_return.
* x86: Add inhibit_stack_protector on ifunc handlersAdhemerval Zanella2024-04-1728-6/+40
|
* x86: math: Avoid the use of __libgcc_cmp_return__ for __gcc_CMPtypeAdhemerval Zanella2024-04-171-2/+11
|
* x86: Define __HAVE_FLOAT128 for Clang and use __builtin_*f128 code pathFangrui Song2024-04-171-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.
* x86: Use -msse2avx iff compiler supports itAdhemerval Zanella2024-04-173-7/+40
|
* support: Handle clang support/dtotimespec.c on dtotimespecAdhemerval Zanella2024-04-171-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.
* stdio: Fix -Wtautological-constant-out-of-range-compare on clangAdhemerval Zanella2024-04-171-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.