https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: dev-util/ccache-3.7.11 fails tests. Discovered on: amd64 (internal ref: tinderbox) NOTE: This machine uses a clang/LLVM toolchain. If you think that this issue is strictly related to clang/LLVM please block bug 408963. If you think that this issue is strictly related to the LLD linker, please block bug 731004. This machine uses also GLIBC-2.32. If you think that this issue is strictly related to GLIBC please block bug 736174.
Created attachment 656560 [details] build.log build log and emerge --info
I can't reproduce it on glibc-2.32 using clang and lld: $ MAKEOPTS="-j16 V=1" CC=x86_64-pc-linux-gnu-clang CXX=x86_64-pc-linux-gnu-clang++ CFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color" CXXFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -fuse-ld=lld" ebuild ccache-3.7.11.ebuild clean install ... > Running test suite debug_prefix_map.. > Running test suite profiling..... The test fails at """ if ! objdump_cmd test.o | grep_cmd "name" src/test.c >/dev/null 2>&1; then test_failed "Relocation (name) not found in test.o" fi """ Do you override OBJDUMP variable as well?
Setting OBJDUMP=llvm-objdump helps: $ OBJDUMP=llvm-objdump MAKEOPTS="-j16 V=1" CC=x86_64-pc-linux-gnu-clang CXX=x86_64-pc-linux-gnu-clang++ CFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color" CXXFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -fuse-ld=lld" ebuild ccache-3.7.11.ebuild clean install > Test suite: debug_prefix_map > Test case: Multiple -fdebug-prefix-map > Failure reason: Relocation (name) not found in test.o
Does not look like llvm-objdump supports '-g' option: $ LANG=C x86_64-pc-linux-gnu-objdump -g test.o | fgrep name 0x00000020 006e616d 65007465 73740069 6e7400 .name.test.int. DW_AT_name DW_FORM_strp DW_AT_name DW_FORM_strp DW_AT_name DW_FORM_strp <12> DW_AT_name : (indirect string, offset: 0x16): src/test.c <1a> DW_AT_comp_dir : (indirect string, offset: 0x21): name <1f> DW_AT_name : (indirect string, offset: 0x26): test <34> DW_AT_name : (indirect string, offset: 0x2b): int $ LANG=C llvm-objdump -g test.o | fgrep name --arch-name=<string> - Target arch to disassemble for, see -version for available targets --demangle - Demangle symbols names --dis-symname=<string> - disassemble just this symbol's instructions (requires -macho) --disassemble-functions=<string> - List of functions to disassemble. Accept demangled names when --demangle is specified, otherwise accept mangled names --mcpu=<cpu-name> - Target a specific cpu type (-mcpu=help for details) I don't know of llvm-objdump can be used as objdump. Up to llvm maintainer.
(In reply to Sergei Trofimovich from comment #2) > Do you override OBJDUMP variable as well? Yes with llvm-objdump as you already tried