Age | Commit message (Collapse) | Author | Files | Lines |
|
Regen to add new functions acospi, asinpi, atan2pi, atanpi, cospi,
sinpi, and tanpi.
|
|
Regen to add new functions acospi, asinpi, atan2pi, atanpi, cospi,
sinpi, and tanpi.
|
|
Linux 6.12 has no new syscalls. Update the version number in
syscall-names.list to reflect that it is still current for 6.12.
Tested with build-many-glibcs.py.
|
|
Hide memset/bzero from compiler to silence Clang error:
./tester.c:1345:29: error: 'size' argument to memset is '0'; did you mean to transpose the last two arguments? [-Werror,-Wmemset-transposed-args]
1345 | (void) memset(one+2, 'y', 0);
| ^
./tester.c:1345:29: note: parenthesize the third argument to silence
./tester.c:1432:16: error: 'size' argument to bzero is '0' [-Werror,-Wsuspicious-bzero]
1432 | bzero(one+2, 0);
| ^
./tester.c:1432:16: note: parenthesize the second argument to silence
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Set have-test-clang to yes if clang is used to test glibc. Set
have-test-clangxx to yes if clang++ is used to test glibc.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Although _chk functions are exported in libc.so.6, their prototypes aren't
provided. Their built versions are supported by compiler. Replace
__strcpy_chk with __builtin___strcpy_chk to silence Clang error:
./tst-gnuglob-skeleton.c:225:3: error: call to undeclared function '__strcpy_chk'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
225 | __strcpy_chk (dir->d.d_name, filesystem[dir->idx].name, NAME_MAX);
| ^
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
|
The C standard requires that ungetc guarantees at least one pushback,
but the malloc call to allocate the pushback buffer could fail, thus
violating that requirement. Fix this by adding a single byte pushback
buffer in the FILE struct that the pushback can fall back to if malloc
fails.
The side-effect is that if the initial malloc fails and the 1-byte
fallback buffer is used, future resizing (if it succeeds) will be
2-bytes, 4-bytes and so on, which is suboptimal but it's after a malloc
failure, so maybe even desirable.
A future optimization here could be to have the pushback code use the
single byte buffer first and only fall back to malloc for subsequent
calls.
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Maciej W. Rozycki <macro@redhat.com>
|
|
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Maciej W. Rozycki <macro@redhat.com>
|
|
Clang does not define _Bool for -std=c++98:
/usr/include/bits/platform/features.h:31:19: error: unknown type name '_Bool'
31 | static __inline__ _Bool
| ^
Change _Bool to bool to silence clang++ error.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
GCC 4.9 issues an error for copysign in initializer:
In file included from tst-printf-format-p-double.c:20:0:
tst-printf-format-skeleton-double.c:29:3: error: initializer element is not a constant expression [-Werror]
{ -HUGE_VAL, -DBL_MAX, -DBL_MIN, copysign (0, -1), -NAN, NAN, 0, DBL_MIN,
^
since it can't fold "copysign (0, -1)". Replace copysign (0,-1) with -0.0.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
|
Add explicit instantiation declaration of S<char>::i to silence Clang
error:
tst-unique3.cc:6:18: error: instantiation of variable 'S<char>::i' required here, but no definition is available [-Werror,-Wundefined-var-template]
6 | int t = S<char>::i;
| ^
./tst-unique3.h:5:14: note: forward declaration of template entity is here
5 | static int i;
| ^
tst-unique3.cc:6:18: note: add an explicit instantiation declaration to suppress this warning if 'S<char>::i' is explicitly instantiated in another translation unit
6 | int t = S<char>::i;
| ^
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
|
ieee_long_double_shape_type has
typedef union
{
long double value;
struct
{
...
int sign_exponent:16;
...
} parts;
} ieee_long_double_shape_type;
Clang issues an error:
../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]
49 | SET_LDOUBLE_WORDS (ldnx, 0xffff,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50 | tests[i] >> 32, tests[i] & 0xffffffffULL);
|
Use -1, instead of 0xffff, to silence Clang.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Add _Atomic to futex_wait argument and ctid in tst-clone3[-internal].c to
silence Clang error:
../sysdeps/unix/sysv/linux/tst-clone3-internal.c:93:3: error: address argument to atomic operation must be a pointer to _Atomic type ('pid_t *' (aka 'int *') invalid)
93 | wait_tid (&ctid, CTID_INIT_VAL);
| ^ ~~~~~
../sysdeps/unix/sysv/linux/tst-clone3-internal.c:51:21: note: expanded from macro 'wait_tid'
51 | while ((__tid = atomic_load_explicit (ctid_ptr, \
| ^ ~~~~~~~~
/usr/bin/../lib/clang/19/include/stdatomic.h:145:30: note: expanded from macro 'atomic_load_explicit'
145 | #define atomic_load_explicit __c11_atomic_load
| ^
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Mark _exit_with_flush as noreturn to silence the Clang error on
tst-atexit-common.c:
In file included from tst-atexit.c:22:
../stdlib/tst-atexit-common.c:113:5: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
113 | case 0: /* Child. */
| ^
../stdlib/tst-atexit-common.c:113:5: note: insert 'break;' to avoid fall-through
113 | case 0: /* Child. */
| ^
| break;
1 error generated.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Some hypervisors report 1 TiB L3 cache size. This results
in some variables incorrectly getting zeroed, causing crashes
in memcpy/memmove because invariants are violated.
|
|
Explicitly cast TIME_T_MAX to double in tst-timespec.c to silence Clang
error:
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]
287 | {.expected = {.tv_sec = 0, .tv_nsec = 1},
| ~
288 | .observed = {.tv_sec = TIME_T_MAX / TIMESPEC_HZ,
289 | .tv_nsec = TIMESPEC_HZ - 1},
290 | .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
| ^~~~~~~~~~
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Explicitly cast 192 and 168 to char to silence Clang error:
tst-resolv-invalid-cname.c:313:17: error: implicit conversion from 'int' to 'char' changes value from 192 to -64 [-Werror,-Wconstant-conversion]
313 | 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]
314 | addr[1] = 168;
| ~ ^~~
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Use "#include <...>" to silence Clang #include_next error:
In file included from ../sysdeps/x86_64/fpu/test-double-vlen4-wrappers.c:19:
../sysdeps/x86_64/fpu/test-double-vlen4.h:19: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]
19 | #include_next <test-double-vlen4.h>
| ^
1 error generated.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Pass -mshstk to compiler to silence Clang:
In file included from ../sysdeps/x86_64/tst-cet-legacy-10a.c:2:
../sysdeps/x86_64/tst-cet-legacy-10.c:29:7: error: always_inline function '_get_ssp' requires target feature 'shstk', but would be inlined into function 'do_test' that is compiled without support for 'shstk'
29 | if (_get_ssp () != 0)
| ^
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Load the polynomial evaluation coefficients into 2 vectors and use lanewise MLAs.
Also use intrinsics instead of native operations.
expf: 3% improvement in throughput microbenchmark on Neoverse V1, exp2f: 5%,
exp10f: 13%, coshf: 14%.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
|
|
Load the polynomial evaluation coefficients into 2 vectors and use lanewise MLAs.
8% improvement in throughput microbenchmark on Neoverse V1.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
|
|
Load the polynomial evaluation coefficients into 2 vectors and use lanewise MLAs.
8% improvement in throughput microbenchmark on Neoverse V1 for log2 and log,
and 2% for log10.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
|
|
Since -1 isn't a power of two, compiler may reject it, hide memalign from
Clang 19 which issues an error:
tst-memalign.c:86:31: error: requested alignment is not a power of 2 [-Werror,-Wnon-power-of-two-alignment]
86 | p = memalign (-1, pagesize);
| ^~
tst-memalign.c:86:31: error: requested alignment must be 4294967296 bytes or smaller; maximum alignment assumed [-Werror,-Wbuiltin-assume-aligned-alignment]
86 | p = memalign (-1, pagesize);
| ^~
Update tst-malloc-aux.h to hide all malloc functions and include it in
all malloc tests to prevent compiler from optimizing out any malloc
functions.
Tested with Clang 19.1.5 and GCC 15 20241206 for BZ #32366.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
This was missed in a recent global change.
Fixes: 53fcdf5f743a (2024-11-25, "Silence most -Wzero-as-null-pointer-constant diagnostics")
Reported-by: "Maciej W. Rozycki" <macro@redhat.com>
Cc: Siddhesh Poyarekar <siddhesh@sourceware.org>
Cc: Bruno Haible <bruno@clisp.org>
Cc: Martin Uecker <uecker@tugraz.at>
Cc: Xi Ruoyao <xry111@xry111.site>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Joseph Myers <josmyers@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Maciej W. Rozycki <macro@redhat.com>
|
|
Adds documentation for three-argument handler
Adds remainder of the SA_* flags
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Remove the second
ifndef BUILD_CC
BUILD_CC = $(CC)
endif
in Makeconfig.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: DJ Delorie <dj@redhat.com>
|
|
Commit 6cbf845fcdc7 ("iconv: Preserve iconv -c error exit on invalid
inputs (bug 32046)") changed the error exit code to report an error when
an input character has been transliterated. This looks like a bug as the
moto in the iconv program is to report an error code in the same
condition as the iconv() function.
This happens because the STANDARD_TO_LOOP_ERR_HANDLER macro sets a
default value for result and later updates it if the transliteration
succeed. With the changes, setting the default value also marks the
input as illegal.
Fix that by setting up the default value of result only when the
transliteration is not used. This works because __gconv_transliterate()
calls __gconv_mark_illegal_input() to return an error. At the same time
also fix the typo outself -> ourselves.
Fixes: 6cbf845fcdc7
Resolves: BZ #32448
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
|
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
|
Split and sort tests in sysdeps/x86/fpu/Makefile.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
|
Use empty initializer to silence GCC 4.9 or older:
getaddrinfo.c: In function ‘gaih_inet’:
getaddrinfo.c:1135:24: error: missing braces around initializer [-Werror=missing-braces]
/ sizeof (struct gaih_typeproto)] = {0};
^
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
As of Linux 6.13, there is no code in the vDSO that declines this
initialization request with the special ~0UL state size. If the vDSO
has the function, the call succeeds and returns 0. It's expected
that the code would follow the “a negative value indicating an error”
convention, as indicated in the __cvdso_getrandom_data function
comment, so that INTERNAL_SYSCALL_ERROR_P on glibc's side would return
true. This commit changes the commit to check for zero to indicate
success instead, which covers potential future non-zero success
return values and error returns.
Fixes commit 4f5704ea347e52ac3f272d1341da10aed6e9973e ("powerpc: Use
correct procedure call standard for getrandom vDSO call (bug 32440)").
|
|
Signed-off-by: John David Anglin <dave.anglin@bell.net>
|
|
This reverts commit 8aa2a9e0339215012354f3c4a262edda838134e8.
as not all targets need braces.
|
|
Use "main (void)" instead of "main (void)" to avoid GCC 4.9 warning:
tst-difftime.c:62:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
main ()
^
tst-difftime.c: In function ‘main’:
tst-difftime.c:62:1: error: old-style function definition [-Werror=old-style-definition]
cc1: all warnings being treated as errors
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
|
Regen to add new functions acospi, asinpi, atan2pi and atanpi.
|
|
Message-ID: <20241212220612.782313-3-gfleury@disroot.org>
|
|
Message-ID: <20241212220612.782313-2-gfleury@disroot.org>
|
|
Message-ID: <20241212220612.782313-1-gfleury@disroot.org>
|
|
Since GCC 4.9 doesn't have __builtin_add_overflow:
In file included from tst-stringtable.c:180:0:
stringtable.c: In function ‘stringtable_finalize’:
stringtable.c:185:7: error: implicit declaration of function ‘__builtin_add_overflow’ [-Werror=implicit-function-declaration]
else if (__builtin_add_overflow (previous->offset,
^
return EXIT_UNSUPPORTED for GCC 4.9 or older.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Since elf/ifuncmain9.c fails at run-time when compiled with GCC 5.4 or
older (PR ipa/81128), return EXIT_UNSUPPORTED for GCC 5.4 or older.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
GCC 4.9 issues an error when generating misc/check-installed-headers-c.out:
In file included from ../signal/signal.h:328:0,
from ../include/signal.h:2,
from ../misc/sys/param.h:28,
from ../include/sys/param.h:1,
from /tmp/cih_test_e156ZB.c:10:
../include/bits/sigstksz.h:5:7: error: "IS_IN" is not defined [-Werror=undef]
#elif IS_IN (libsupport)
^
Use "#else" instead.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
GCC 4.9 doesn't define __STDC_VERSION__ and issues an error:
In file included from ../include/regex.h:2:0,
from ../posix/re_comp.h:23,
from ../include/re_comp.h:1,
from /tmp/cih_test_7IKTRI.c:10:
../posix/regex.h:650:19: error: "__STDC_VERSION__" is not defined [-Werror=undef]
# elif 199901L <= __STDC_VERSION__ || defined restrict
^
Use "#else" instead.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Since assert/tst-assert-c++.cc fails to compile with GCC 4.9:
./tst-assert-c++.cc: In function ‘constexpr int check_constexpr()’:
./tst-assert-c++.cc:30:1: error: body of constexpr function ‘constexpr int check_constexpr()’ not a return-statement
}
^
return EXIT_UNSUPPORTED for GCC 4.9 or older.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Add braces to silence GCC 4.9 or older:
getaddrinfo.c: In function ‘gaih_inet’:
getaddrinfo.c:1135:24: error: missing braces around initializer [-Werror=missing-braces]
/ sizeof (struct gaih_typeproto)] = {0};
^
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Since GCC 4.9 doesn't support __builtin_mul_overflow:
tst-fd_to_filename.c: In function ‘check_ranges’:
tst-fd_to_filename.c:51:3: error: implicit declaration of function ‘__builtin_mul_overflow’ [-Werror=implicit-function-declaration]
while (!__builtin_mul_overflow (power, base, &power));
^
cc1: all warnings being treated as errors
return EXIT_UNSUPPORTED for GCC 4.9 or older.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Since ATOMIC_INT_LOCK_FREE in GCC 4.9 is defined as
#define ATOMIC_INT_LOCK_FREE \
__atomic_type_lock_free (atomic_int)
GCC 4.9 fails to compile tst-minsigstksz-1.c:
tst-minsigstksz-1.c:45:6: error: missing binary operator before token "("
# if ATOMIC_INT_LOCK_FREE != 2
^
Change tst-minsigstksz-1.c to define TEST_ATOMIC_OPS to 0 for GCC 4.9 or
older.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Since GCC 4.9 issues an error:
In file included from inl-tester.c:6:0:
tester.c:58:1: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args");
^
use it for GCC 5 or newer.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Add test to check xcheck rule so that TEST_CC and TEST_CXX are used for
"make test".
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Since the C++ compiler is also used to compile links-dso-program.cc in
libsupport, use TEST_CXX to get C++ headers for testing, but don't use
TEST_CXX as CXX for build.
Tested for m68k-linux-gnu-coldfire build and native build on x86-64.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Update ulps for acospi, asinpi, atanpi, atan2pi.
|