Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
ISO C does not allow and it fixes a clang issue with
-Werror,-Wvoid-ptr-dereference.
Checked on x86_64-linux-gnu.
|
|
To avoid compiler to optimize them away.
|
|
It does not handle pseudo normal numbers.
|
|
If compiler does not support __USE_EXTERN_INLINES we need to route
fabsf128 call to an internal symbol.
|
|
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).
|
|
Not all compilers might define C99 _Bool type on C++ mode in old
standard modes (clang does not define for -std=c++98).
|
|
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).
|
|
|
|
|
|
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];
^
|
|
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); \
^ ~~~~~
|
|
|
|
|
|
clang ignore the attribute, which is required by libmvec tests.
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
clang fails with:
error: invalid instruction
|
|
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.
|
|
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
|
|
clang can not apply asm redirections to functions after these
functions are used for the first time.
|
|
It triggers an ICE with clang while building round_and_return.
|
|
|
|
|
|
This is not really require and clang throws a attribute declaration must
precede definition:
../sysdeps/x86_64/multiarch/strstr.c:37:54: error: attribute declaration
must precede definition [-Werror,-Wignored-attributes]
extern __typeof (__redirect_strstr) __strstr_generic attribute_hidden;
^
./../include/libc-symbols.h:423:43: note: expanded from macro
'attribute_hidden'
# define attribute_hidden __attribute__ ((visibility ("hidden")))
^
../string/strstr.c:76:1: note: previous definition is here
STRSTR (const char *haystack, const char *needle)
^
../sysdeps/x86_64/multiarch/strstr.c:27:16: note: expanded from macro
'STRSTR'
#define STRSTR __strstr_generic
^
1 error generated.
|
|
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.
|
|
|
|
Clang warns:
../sysdeps/posix/fpathconf.c:118:21: error: right side of operator
converted from negative value to unsigned: -1 to 18446744073709551615
[-Werror]
#if _POSIX_VDISABLE == -1
~~~~~~~~~~~~~~~ ^ ~~
|
|
Commit 939da411433 added symbols redirections to handle ISO C
namespace, however some compiler does not support to redeclare the
function prototype. Moving these defintions to exported header
it not a good practice (it exposes a internal implementation and
it would require to add macros to define it only internally).
Instead this patch replaces the symbol redirections by direct asm
aliases, as done to handle libcall generation done by compiler on
some loop optimizations. The only issue is sparc binutils generates
an extra __mempcpy plt not called anywhere in the code, which indicates
a binutils issue (this is added in the localplt.data for now).
Checked on all affected ABIs.
|
|
|
|
clang emits an warning when a double alias redirection is used, to warn
the the original symbol will be used even when weak definition is
overridden. Howerver, this is a common pattern for weak_alias, where
multiple alias are set to same symbol.
|
|
Clang issues:
../sysdeps/ieee754/dbl-64/s_llround.c:83:30: error: incompatible
redeclaration of library function 'lround'
[-Werror,-Wincompatible-library-redeclaration]
libm_alias_double (__lround, lround)
^
../sysdeps/ieee754/dbl-64/s_llround.c:83:30: note: 'lround' is a builtin
with type 'long (double)'
|
|
|
|
The warning is not supported by clang.
|
|
Linux 6.7 adds a constant SOL_VSOCK (recall that various constants in
include/linux/socket.h are in fact part of the kernel-userspace API
despite that not being a uapi header). Add it to glibc's
bits/socket.h.
Tested for x86_64.
|
|
Linux 6.7 adds three new HWCAP2_* values for AArch64; add them to
bits/hwcap.h in glibc.
|
|
The commit 49d877a80b29d3002887b084eec6676d9f5fec18 (arm: Remove
_dl_skip_args usage) removed the _SKIP_ARGS literal, which was
previously loader to r4 on loader _start. However, the cleanup did not
remove the following 'ldr r4, [sl, r4]' on _dl_start_user, used to check
to skip the arguments after ld self-relocations.
In my testing, the kernel initially set r4 to 0, which makes the
ldr instruction just read the _GLOBAL_OFFSET_TABLE_. However, since r4
is a callee-saved register; a different runtime might not zero
initialize it and thus trigger an invalid memory access.
Checked on arm-linux-gnu.
Reported-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
|
|
On LoongArch GCC compiles __builtin_ffs{,ll} to basically
`(x ? __builtin_ctz (x) : -1) + 1`. Since a hardware ctz instruction is
available, this is much better than the table-driven generic
implementation.
Tested on loongarch64.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
IA64 is gone.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
|