https://sourceware.org/bugzilla/show_bug.cgi?id=26262

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-07-19

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
clang has different behavior depending on -fuse-ld=XXX:

[hjl@gnu-cfl-2 pr26262]$ clang -fuse-ld=gold -Wl,-y,__llvm_profile_raw_version
-Wl,-plugin-opt=save-temps -fprofile-generate -flto -o a a.c -save-temps
a.o: definition of __llvm_profile_raw_version
/usr/lib64/clang/10.0.0/lib/linux/libclang_rt.profile-x86_64.a(InstrProfiling.c.o):
definition of __llvm_profile_raw_version
a.o: definition of __llvm_profile_raw_version
[hjl@gnu-cfl-2 pr26262]$ clang -fuse-ld=bfd -Wl,-y,__llvm_profile_raw_version
-Wl,-plugin-opt=save-temps -fprofile-generate -flto -o a a.o
/usr/bin/ld.bfd: a.o: definition of __llvm_profile_raw_version
[hjl@gnu-cfl-2 pr26262]$ clang -fuse-ld=bfd -Wl,-y,__llvm_profile_raw_version
-Wl,-plugin-opt=save-temps -fprofile-generate -flto -o a a.c -save-temps
/usr/bin/ld.bfd: a.o (symbol from plugin): definition of
__llvm_profile_raw_version
/usr/bin/ld.bfd:
/usr/lib64/clang/10.0.0/lib/linux/libclang_rt.profile-x86_64.a(InstrProfiling.c.o):
definition of __llvm_profile_raw_version
[hjl@gnu-cfl-2 pr26262]$ clang -fuse-ld=gold -Wl,-y,__llvm_profile_raw_version
-Wl,-plugin-opt=save-temps -fprofile-generate -flto -o a a.o
/usr/lib64/clang/10.0.0/lib/linux/libclang_rt.profile-x86_64.a(InstrProfiling.c.o):
definition of __llvm_profile_raw_version
[hjl@gnu-cfl-2 pr26262]$ rm a.o
[hjl@gnu-cfl-2 pr26262]$ clang -fprofile-generate -flto -c a.c
[hjl@gnu-cfl-2 pr26262]$ clang -fuse-ld=bfd -Wl,-y,__llvm_profile_raw_version
-Wl,-plugin-opt=save-temps -fprofile-generate -flto -o a a.o
/usr/bin/ld.bfd: a.o (symbol from plugin): definition of
__llvm_profile_raw_version
/usr/bin/ld.bfd:
/usr/lib64/clang/10.0.0/lib/linux/libclang_rt.profile-x86_64.a(InstrProfiling.c.o):
definition of __llvm_profile_raw_version
[hjl@gnu-cfl-2 pr26262]$ clang -fuse-ld=gold -Wl,-y,__llvm_profile_raw_version
-Wl,-plugin-opt=save-temps -fprofile-generate -flto -o a a.o
/usr/lib64/clang/10.0.0/lib/linux/libclang_rt.profile-x86_64.a(InstrProfiling.c.o):
definition of __llvm_profile_raw_version
[hjl@gnu-cfl-2 pr26262]$ 

It looks like a clang bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to