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

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

Re: Compilation with clang


From: Joerg Wunsch
Subject: Re: Compilation with clang
Date: Wed, 13 Oct 2021 23:00:45 +0200

As Marian Buschsieweke wrote:

> parts of the avrlibc headers are not compatible with clang. (The use case is
> not to compile avrlibc itself with clang, but rather an application using
> a vanilla GCC compiled avrlibc.) However, the issues are not always trivial to
> fix.

I seem to remember someone recently came up here asking for whether
someone were interested in avr-libc / Clang. You might find that in
the mailing list archive.

> For targets where _SFR_IO_REG_P (_WD_CONTROL_REG) evaluates to false, the
> inline assembly in the then-clause is syntactically not correct, as the
> constraints "I" are not fulfilled.

I somewhat disagree: I think this is a semantic error, rather than a
syntax error.

Anyway, that doesn't help much, as it's not our turn to modify Clang on
that.

> What would be the best way to fix this?

I don't have a good idea either. My only other idea would be to drag
certain things of these inline asm statements into macros inside the
device header files itself, but that's probably going to open a can of
worms.

-- 
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]