Summary: | sys-devel/llvm: llvm-objdump does not recognize '-g' option (was: dev-util/ccache-3.7.11 fails tests) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | toolchain |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Agostino Sarubbo
2020-08-25 05:12:53 UTC
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 |