Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LLVM/Clang AVR cross compiler
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 253

PostPosted: Tue Jun 19, 2018 6:33 am    Post subject: LLVM/Clang AVR cross compiler Reply with quote

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
View user's profile Send private message
bstaletic
Apprentice
Apprentice


Joined: 05 Apr 2014
Posts: 253

PostPosted: Tue Jun 19, 2018 10:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21660

PostPosted: Wed Jun 20, 2018 2:21 am    Post subject: Reply with quote

Have you built an llvm with those targets enabled and verified that they work correctly?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum