View previous topic :: View next topic |
Author |
Message |
bstaletic Apprentice
Joined: 05 Apr 2014 Posts: 249
|
Posted: Tue Jun 19, 2018 6:33 am Post subject: LLVM/Clang AVR cross compiler |
|
|
AVR support should be there since LLVM 5.0, which the following link confirms:
http://llvm.org/svn/llvm-project/llvm/trunk/lib/Target/AVR/
i don't see AVR in LLVM_TARGETS, so I'm wondering if this is just a gentoo packaging problem or do I need to jump through some hoops to get "clang -t avr foo.c" to work.
Thanks in advance. |
|
Back to top |
|
|
bstaletic Apprentice
Joined: 05 Apr 2014 Posts: 249
|
Posted: Tue Jun 19, 2018 10:35 am Post subject: |
|
|
Looking at the llvm/lib/Target, Gentoo is not only lacking AVR, but also ARC, Nios2, RISCV and WebAssembly.
Here's the output of "equery u llvm" after I added those targets to LLVM_TARGETS in my local overlay: Code: | * Found these USE flags for sys-devel/llvm-6.0.0-r1:
U I
- - debug : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
- - doc : Build and install the HTML documentation and regenerate the man pages
- - gold : Build the gold linker plugin
- - libedit : Use the libedit library (replacement for readline)
+ + libffi : Enable support for Foreign Function Interface library
+ + llvm_targets_AArch64 : AArch64 CPU target (arm64 in Gentoo)
- - llvm_targets_AMDGPU : AMDGPU target (supports R600 and GCN GPUs)
- - llvm_targets_ARC : <unknown>
+ + llvm_targets_ARM : ARM CPU target
+ - llvm_targets_AVR : 8-bit Atmel AVR microcontroller target [EXPERIMENTAL]
- - llvm_targets_BPF : Berkeley Packet Filter target
- - llvm_targets_Hexagon : Qualcomm Hexagon DSP target
- - llvm_targets_Lanai : Lanai CPU target
- - llvm_targets_MSP430 : MSP430 CPU target (experimental)
- - llvm_targets_Mips : MIPS CPU target (includes MIPS64)
- - llvm_targets_NVPTX : NVIDIA PTX (GPU) target (32-bit and 64-bit)
- - llvm_targets_Nios2 : Nios2 CPU target [EXPERIMENTAL]
- - llvm_targets_PowerPC : PowerPC CPU target (PPC32 and PPC64)
- - llvm_targets_RISCV : RISC-V CPU target [EXPERIMENTAL]
- - llvm_targets_Sparc : Sparc CPU target
- - llvm_targets_SystemZ : SystemZ (s390x) CPU target
- - llvm_targets_WebAssembly : WebAssembly backend [EXPERIMENTAL]
- - llvm_targets_XCore : XCore CPU target
+ + ncurses : Support querying terminal properties using ncurses' terminfo
- - test : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore
- - xar : Support dumping LLVM bitcode sections in Mach-O files (uses app-arch/xar)
- - xml : Add support for XML files |
As you can see, all five missing targets have a description and are marked [EXPERIMENTAl]. Should I open a bug report to request the new LLVM_TARGETS? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21595
|
Posted: Wed Jun 20, 2018 2:21 am Post subject: |
|
|
Have you built an llvm with those targets enabled and verified that they work correctly? |
|
Back to top |
|
|
|