[llvm-dev] [cfe-dev] Using lld in ELLCC for different targets (original) (raw)
Rui Ueyama via llvm-dev llvm-dev at lists.llvm.org
Fri Oct 28 15:02:10 PDT 2016
- Previous message: [llvm-dev] Using lld in ELLCC for different targets
- Next message: [llvm-dev] [cfe-dev] Using lld in ELLCC for different targets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Oct 28, 2016 at 2:56 PM, Richard Pennington via cfe-dev < cfe-dev at lists.llvm.org> wrote:
With all the talk about using lld on the list, I thought it would be interesting to try using it in my clang based ELLCC cross compilation tool chain. http://ellcc.org
The change was simple, since I use configuration files to tell clang how to compile, where to find libraries, etc. I described the config files here: http://ellcc.org/blog/?p=13246 All I had to do was change the linker executable definition for each target: linker: #exe: E/ecc−ldE/ecc-ldE/ecc−ldX exe: E/ld.lldE/ld.lldE/ld.lldx (where EistheexecutabledirectorywherethecompilerwasfoundandE is the executable directory where the compiler was found and EistheexecutabledirectorywherethecompilerwasfoundandX is the executable extension, "" under Linux) Here are the results of linking a program for Linux: ARM32 v6: Good ARM32 v7: Good ARM32 big endian: Not supported by lld, no armelfblinuxeabi emulation mode. Aarch64: Good MIPS 32 little and big endian: Good MIPS64 big endian: Good PPC32: lld failed with a bad relocation type. PPC64 little endian: Not supported by lld, no elf64lppc emulation mode. X86 32 and 64: Good As a test I built clang to run native on ARMv6, ARMv7, Aarch64, MIPS32, MIPS64, and x8684 Linux: Good Very cool!
Awesome results!
I wonder if ARM32 BE is a real thing. I know that the processor is bi-endian, but is there any system that uses ARM32 in big-endian mode?
I use ld for mingw-w64 targets. Is there a mode for the COFF lld that makes it also act like ld?
Unfortunately, no. You can use the GNU compatible driver on Windows, but it always produces ELF.
Now I have to look into how lld supports Linker scripts for my non-Linux
targets.
-Rich
cfe-dev mailing list cfe-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161028/fa6a62c4/attachment.html>
- Previous message: [llvm-dev] Using lld in ELLCC for different targets
- Next message: [llvm-dev] [cfe-dev] Using lld in ELLCC for different targets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]