[oe] building u-boot - git failed
Holger Hans Peter Freyther
holger+oe at freyther.de
Sun Jan 31 03:35:35 UTC 2010
On Sunday 31 January 2010 04:20:18 Guo Hongruan wrote:
> -mno-thumb-interwork -Wall -Wstrict-prototypes -fno-stack-protector -c -o
> board.o board.c
> board.c:126: error: inline function 'coloured_LED_init' cannot be declared
> weak
> board.c:128: error: inline function 'red_LED_on' cannot be declared weak
> board.c:130: error: inline function 'red_LED_off' cannot be declared weak
> board.c:132: error: inline function 'green_LED_on' cannot be declared weak
> board.c:134: error: inline function 'green_LED_off' cannot be declared weak
> board.c:136: error: inline function 'yellow_LED_on' cannot be declared weak
> board.c:138: error: inline function 'yellow_LED_off' cannot be declared
> weak
> anyone can give me some hints?
Yeah,
please make sure some of your outstanding stuff is getting cleaned up and
included in the upstream OpenEmbedded.
Now if you look at the code in board.c:96[1]
void inline __yellow_LED_off(void) {}
void yellow_LED_off(void) __attribute__((weak, alias("__yellow_LED_off")));
There are two GCC attributes that you could check the manual for. The first one
is weak and the second one is an alias.
The idea of weak here seems to be that you have a default ARM implementation
(__yellow_LED_off) but that a specific board could just write "void
yellow_LED_off(void) { real_gpio_foo }" and U-Boot is properly linking and will
use the board specific routine..
The alias is more or less to be able to have two names for the same text
segment.
Now to the hint:
1.) The issue seems to be caused by using newer GCC?
2.) Take it up with upstream uboot to see how they want it to be changed.
2.1.) E.g. removing the "inline" could work and it should not increase the
size of the text section
2.2) E.g. instead of using the alias it could call the inline function...
[1] http://git.denx.de/cgi-bin/gitweb.cgi?p=u-
boot.git;a=blob;f=lib_arm/board.c;h=e148739152c0826130ab70f249c74aa010165d67;hb=HEAD#l96
More information about the Openembedded-devel
mailing list