Recently we have updated toolchain clang-17 version.
While building selftests vdso following warnings / errors noticed on the
Linux next with clang-17. but pass with gcc-13.
Reported-by: Linux Kernel Functional Testing <lkft(a)linaro.org>
make[4]: Entering directory 'tools/testing/selftests/vDSO'
clang --target=x86_64-linux-gnu -fintegrated-as
-Werror=unknown-warning-option -Werror=ignored-optimization-argument
-Werror=option-ignored -Werror=unused-command-line-argument
--target=x86_64-linux-gnu -fintegrated-as -std=gnu99 -nostdlib
-fno-asynchronous-unwind-tables -fno-stack-protector \
vdso_standalone_test_x86.c parse_vdso.c \
-o /vDSO/vdso_standalone_test_x86
vdso_standalone_test_x86.c:73:16: warning: unknown attribute
'externally_visible' ignored [-Wunknown-attributes]
73 | __attribute__((externally_visible)) void c_main(void **stack)
| ^~~~~~~~~~~~~~~~~~
1 warning generated.
parse_vdso.c:65:9: warning: using the result of an assignment as a
condition without parentheses [-Wparentheses]
65 | if (g = h & 0xf0000000)
| ~~^~~~~~~~~~~~~~~~
parse_vdso.c:65:9: note: place parentheses around the assignment to
silence this warning
65 | if (g = h & 0xf0000000)
| ^
| ( )
parse_vdso.c:65:9: note: use '==' to turn this assignment into an
equality comparison
65 | if (g = h & 0xf0000000)
| ^
| ==
parse_vdso.c:206:22: warning: passing 'const char *' to parameter of
type 'const unsigned char *' converts between pointers to integer
types where one is of the unique plain 'char' type and the other is
not [-Wpointer-sign]
206 | ver_hash = elf_hash(version);
| ^~~~~~~
parse_vdso.c:59:52: note: passing argument to parameter 'name' here
59 | static unsigned long elf_hash(const unsigned char *name)
| ^
parse_vdso.c:207:46: warning: passing 'const char *' to parameter of
type 'const unsigned char *' converts between pointers to integer
types where one is of the unique plain 'char' type and the other is
not [-Wpointer-sign]
207 | ELF(Word) chain = vdso_info.bucket[elf_hash(name) %
vdso_info.nbucket];
| ^~~~
parse_vdso.c:59:52: note: passing argument to parameter 'name' here
59 | static unsigned long elf_hash(const unsigned char *name)
| ^
3 warnings generated.
/usr/bin/x86_64-linux-gnu-ld: /tmp/vdso_standalone_test_x86-31b09f.o:
in function `c_main':
vdso_standalone_test_x86.c:(.text+0x1e6): undefined reference to `memcpy'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: Leaving directory 'tools/testing/selftests/vDSO'
Links:
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2UHhSg0TPLhjp9Uq9EFc…
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230821/te…
Steps to reproduce:
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2UHhSg0TPLhjp9Uq9EFc…
tuxmake --runtime podman --target-arch x86_64 --toolchain clang-17
--kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2UHhSg0TPLhjp9Uq9EFc…
LLVM=1 LLVM_IAS=1 debugkernel cpupower headers kernel kselftest
modules
--
Linaro LKFT
https://lkft.linaro.org
Total jobs: 42
Total errors: 13 (30.95%)
LAVA errors: 0 (0.00%)
Test errors: 12 (28.57%)
Job errors: 0 (0.00%)
Infra errors: 1 (2.38%)
Canceled jobs: 0 (0.00%)
Device type: qrb5165-rb5
Total jobs: 42
Total errors: 13 (30.95%)
Error type: Test
Error count: 12 (28.57%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[d8a1879f]'
Count: 5 (11.90%)
IDs:
rb5-07:
6670751 6671481 6672518 6672521 6672522
Error: No match for error type 'Test', message 'tradefed - adb device lost[9496f60d]'
Count: 1 (2.38%)
IDs:
rb5-01:
6672496
Error: No match for error type 'Test', message 'The network seems not available, as the ping command failed'
Count: 2 (4.76%)
IDs:
rb5-01:
6671503 6672494
Error: No match for error type 'Test', message 'tradefed - adb device lost[4fc7b22]'
Count: 4 (9.52%)
IDs:
rb5-06:
6670758 6671458 6671496 6671816
Error type: Infrastructure
Error count: 1 (2.38%)
Error: No match for error type 'Infrastructure', message 'wait-device-boardid timed out after 567 seconds'
Count: 1 (2.38%)
IDs:
rb5-01:
6671501