AnsweredAssumed Answered

AOCC with LLVM linker on Linux problems

Question asked by takashi.uchiyama on Jun 22, 2018

Hi,

 

I have a some problems about LLVM linker.

 

I try to compiled with clang compiler on Red hat linux.

then, i got below error messages.

 

--

 

$ clang -O3 -flto hello.c -o hello_c.out

 

 

/usr/bin/ld: ~/AOCC-1.2-Compiler/bin/../lib/LLVMgold.so: error loading plugin: ~/AOCC-1.2-Compiler/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory

 

clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)

 

--

 

however, I added -fuse-ld option in clang command and then finished normally.

 

 

clang -O3 -fuse-ld=lld -flto hello.c -o hello_c.out

 

How do i get to set default Linker(lld) with aocc's clang?

and , Why does aocc's clang used ld Linker when it do not specify -fuse-ld option?

Outcomes