Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
By using clang standard libraries instead of libgcc.
|
|
|
|
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).
|
|
|
|
|
|
The bench-malloc-thread.c:63 does use powf and compiler might not
optimzie it away.
|
|
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.
|
|
|
|
Similar to tst-printf-bz18872.sh, add the attribute_optimize to avoid
build failures with compilers that do not support "GCC optimize" pragma.
|
|
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.
|
|
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.
|
|
From clang.
|
|
From clang.
|
|
|
|
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.
|
|
And make them a runtime check with assert since
EXCEPTION_SET_FORCES_TRAP might not be an integral constant expression
(i.e on i386).
|
|
|
|
|
|
Not all compiler supports the builtin.
|
|
|
|
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.
|
|
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.
|
|
|
|
clang does not support 'I' specifier and handles it as a 'length
modifier'.
|
|
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.
|
|
ISO C does not allow and it fixes a clang issue with
-Werror,-Wvoid-ptr-dereference.
Checked on x86_64-linux-gnu.
|
|
|
|
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.
|
|
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;
~ ^~~
|
|
To avoid compiler to optimize them away.
|
|
It triggers and infintie loop.
|
|
clang always evaluate the pointer alias compasion as false.
|
|
It does not handle pseudo normal numbers.
|
|
It does not handle pseudo normal numbers.
|
|
It does not handle pseudo normal numbers.
|
|
clang does not check for unordered numbers with builtins for
_Float128 type.
|
|
If compiler does not support __USE_EXTERN_INLINES we need to route
fabsf128 call to an internal symbol.
|
|
It avoid compiler to turn is on strcpy, which might generate a strcpy
PLT call since there is no explicit redirection.
|
|
|
|
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).
|
|
STB_GNU_UNIQUE
The test requires STB_GNU_UNIQUE symbols so NODELETE is propagated
by do_lookup_unique.
|
|
Not all compilers might define C99 _Bool type on C++ mode in old
standard modes (clang does not define for -std=c++98).
|
|
|
|
To avoid compiler optimize away memory allocation calls, which might
interfere when both valid and invalid calls checks.
|
|
|
|
clang does not define __SIG_ATOMIC_TYPE__, instead add another
directive ('size:') which instruct to use an interger type of
defined minimum size.
|
|
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.
|
|
clang does not support -dN.
|
|
Instead of latin1 ones.
|