Hi Chris,
On 10/28/2016 09:46 AM, Christopher Li wrote:
On Fri, Oct 28, 2016 at 10:21 PM, Thor Thayer
<tthayer@xxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
When I'm running sparse on my NiosII Linux build, I'm seeing many errors
concerning an undefined identifier which is actually a GCC built-in for the
NiosII architecture [1].
./arch/nios2/include/asm/irqflags.h:34:9: error: not a function <noident>
Googling this error led me to 2 possible solutions.
1. Comment it out in the Linux source [2].
That is not the way to go.
2. Additions in the sparse lib.c file [3].
How about add the prototype in sparse and protect it by
#ifdef condition. Then sparse still need to have some way to
introduce the architecture flags. Maybe the default will pick the
host architecture and allow command options to overwrite the
architectures. If gcc has similar architecture options we should
reuse those in sparse.
I am open to other suggestion as well.
I'm assuming this would look like the "#ifdef __bfin__\n" section of
lib.c (line 863).
I'm having trouble finding what the arch define is for nios2 (the
obvious __nios2__ doesn't work for me) but I'll keep digging.
Thanks for the response and guidance!
Thor
Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html