
On Sun, 16 Aug 2009, Wolfgang Denk wrote:
Dear Sergey,
in include/asm-arm/arch-davinci/emac_defs.h you declare emac_desc with the "volatile" attribute, but when using it, "volatile" is frequently added again, resulting in complier warnings like these:
Configuring for davinci_sffsdr board... davinci_emac.c:82: warning: duplicate `volatile' davinci_emac.c:83: warning: duplicate `volatile' davinci_emac.c:84: warning: duplicate `volatile' davinci_emac.c:85: warning: duplicate `volatile' davinci_emac.c: In function `davinci_eth_open': davinci_emac.c:257: warning: duplicate `volatile' davinci_emac.c: In function `davinci_eth_rcv_packet': davinci_emac.c:475: warning: duplicate `volatile' davinci_emac.c:476: warning: duplicate `volatile' davinci_emac.c:477: warning: duplicate `volatile' davinci_emac.c:496: warning: duplicate `volatile'
Can you please provide a fix? Thanks in advance.
Hey,
what compiler do you use? I just compiled all the davinci boards with GNUEABI GCC 4.4.1 (binutils ver.2.19.1) and I didn't get a single compiler warning.
There are 2 separate issues but they are not related to the above description.
First is that it fails to compile with GNUEABI GCC but that is addressed in your recent arm build patch that works OK.
The second one is that GCC 4.4.1 (don't know about the older ones, don't have those on my machine now) generates an error for inline weak functions in lib_arm/board.c (and I think it is totally correct -- what is an inline weak function?) Here is the failed build log excertpt:
=== Cut === board.c:127: error: inline function 'coloured_LED_init' cannot be declared weak board.c:129: error: inline function 'red_LED_on' cannot be declared weak board.c:131: error: inline function 'red_LED_off' cannot be declared weak board.c:133: error: inline function 'green_LED_on' cannot be declared weak board.c:135: error: inline function 'green_LED_off' cannot be declared weak board.c:137: error: inline function 'yellow_LED_on' cannot be declared weak board.c:139: error: inline function 'yellow_LED_off' cannot be declared weak board.c:141: error: inline function 'blue_LED_on' cannot be declared weak board.c:143: error: inline function 'blue_LED_off' cannot be declared weak make[1]: *** [board.o] Error 1 make[1]: Leaving directory /usr/src/U-Boot/Davinci/u-boot/lib_arm' make: *** [lib_arm/libarm.a] Error 2 === Cut ===
Do you want me to send a fix for those? It hardly makes sense, you can do it yourself by removing "inline" qualifier at those 9 lines but I can send a patch if you want me to.
As for those "duplicate `volatile'" warnings I don't see them (and have never seen them before) so I don't know what to fix.
I can send you my build logs off the list if you want.
--- ****************************************************************** * KSI@home KOI8 Net < > The impossible we do immediately. * * Las Vegas NV, USA < > Miracles require 24-hour notice. * ******************************************************************