NiosII GCC Compiler Built-Ins Question

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

 



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:25:16: error: undefined identifier '__builtin_rdctl'
./arch/nios2/include/asm/irqflags.h:25:16: error: not a function <noident>
./arch/nios2/include/asm/irqflags.h:34:9: error: undefined identifier '__builtin_wrctl'
./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].
2. Additions in the sparse lib.c file [3].

#2 was accepted but that built-in seems to be generic for all architectures. In my case, this is only for the GCC compiler for NiosII.

What is the best way to handle a built-in for a specific architecture?

Thanks,

Thor

Links:
[1] https://gcc.gnu.org/onlinedocs/gcc/Altera-Nios-II-Built-in-Functions.html
[2] https://lkml.org/lkml/2015/6/15/616
[3] http://comments.gmane.org/gmane.comp.parsers.sparse/3402

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



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux