avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About the clang/llvm tool chain for AVR


From: Joerg Wunsch
Subject: Re: About the clang/llvm tool chain for AVR
Date: Mon, 15 Jan 2024 20:31:50 +0100

As Ben Shi via Discussion of avr-libc development wrote:

> I am current maintainer of the llvm-avr backend, and I would like to
> ask for your feedback on my work. My final goal is making
> clang-llvm-lld-compiler_rt chain fully functional, and let AVR
> program developers get rid of the GNU tool chain. So any
> complain/concern/report is welcome.

There's probably no reason to "get rid" of the GNU toolchain, but
Clang is certainly a welcome addition.

> Current known issues:

> 1. The clang frontend still does not support float-64 type and int24 type.

Well, they are even relatively new to GCC, and we don't have a libm
for float64.

> 2. The clang frontend does not support virtual functions in C++ classes.

I'm not a C++ guy, so I have no idea what kind of impact that really
has. I vaguely remember C++ on AVR-GCC always had some restrictions
anyway.

> 3. The 32-bit mul/div are not supported in compiler-rt, though 8-bit/16-bit 
> ones are supported.

What does that mean for the end user?

> 5. The lld accepts all syntax of GNU linker script, except 
> 'KEEP(SORT(*)(.ctors))', so you need to do a little modification to the 
> linker scripts distributed within avr-gcc, and use lld style syntax.

As long as it's backwards compatible with the GNU linker, no problem.

> I hope my work can be fully accepted by the aruidno community and
> finally replace the GNU toolchain in its package releases in the
> future.

Well, Arduino is often quite conservative, and unless there is some
really compelling reason to switch toolchains (like say, LLVM would
generally produce code half the size of GCC :-), I wouldn't expect
that to happen anytime soon.

-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]