* [U-Boot] [PATCH] ARM: fix build error with gcc-4.4.2 about inline function declared weak
@ 2009-11-01 19:47 walsimou at walsimou.com
2009-11-01 21:22 ` Tom
0 siblings, 1 reply; 5+ messages in thread
From: walsimou at walsimou.com @ 2009-11-01 19:47 UTC (permalink / raw)
To: u-boot
From: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
This patch fix build error with gcc-4.4.2 about inline function
declared weak, see below:
board.c:96: error: inline function 'coloured_LED_init' cannot be declared weak
board.c:98: error: inline function 'red_LED_on' cannot be declared weak
board.c:100: error: inline function 'red_LED_off' cannot be declared weak
board.c:102: error: inline function 'green_LED_on' cannot be declared weak
board.c:104: error: inline function 'green_LED_off' cannot be declared weak
board.c:106: error: inline function 'yellow_LED_on' cannot be declared weak
board.c:108: error: inline function 'yellow_LED_off' cannot be declared weak
board.c:110: error: inline function 'blue_LED_on' cannot be declared weak
board.c:112: error: inline function 'blue_LED_off' cannot be declared weak
make[1]: *** [board.o] Error 1
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
---
lib_arm/board.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 5e3d7f6..886c74c 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -93,23 +93,23 @@ extern void rtl8019_get_enetaddr (uchar * addr);
* May be supplied by boards if desired
*/
void inline __coloured_LED_init (void) {}
-void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
+void coloured_LED_init(void)__attribute__((weak, alias("__coloured_LED_init")));
void inline __red_LED_on (void) {}
-void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
+void red_LED_on(void) __attribute__((weak, alias("__red_LED_on")));
void inline __red_LED_off(void) {}
-void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
+void red_LED_off(void)__attribute__((weak, alias("__red_LED_off")));
void inline __green_LED_on(void) {}
-void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
+void green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
void inline __green_LED_off(void) {}
-void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
+void green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
void inline __yellow_LED_on(void) {}
-void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
+void yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
void inline __yellow_LED_off(void) {}
-void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
+void yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
void inline __blue_LED_on(void) {}
-void inline blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
+void blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
void inline __blue_LED_off(void) {}
-void inline blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
+void blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
/************************************************************************
* Init Utilities *
--
1.6.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] ARM: fix build error with gcc-4.4.2 about inline function declared weak
2009-11-01 19:47 [U-Boot] [PATCH] ARM: fix build error with gcc-4.4.2 about inline function declared weak walsimou at walsimou.com
@ 2009-11-01 21:22 ` Tom
2009-11-01 21:47 ` Gaye Abdoulaye Walsimou
2009-11-01 21:51 ` Wolfgang Denk
0 siblings, 2 replies; 5+ messages in thread
From: Tom @ 2009-11-01 21:22 UTC (permalink / raw)
To: u-boot
What is your
$(CROSS_COMPILE)gcc -v
?
Tom
walsimou at walsimou.com wrote:
> From: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
>
> This patch fix build error with gcc-4.4.2 about inline function
> declared weak, see below:
> board.c:96: error: inline function 'coloured_LED_init' cannot be declared weak
> board.c:98: error: inline function 'red_LED_on' cannot be declared weak
> board.c:100: error: inline function 'red_LED_off' cannot be declared weak
> board.c:102: error: inline function 'green_LED_on' cannot be declared weak
> board.c:104: error: inline function 'green_LED_off' cannot be declared weak
> board.c:106: error: inline function 'yellow_LED_on' cannot be declared weak
> board.c:108: error: inline function 'yellow_LED_off' cannot be declared weak
> board.c:110: error: inline function 'blue_LED_on' cannot be declared weak
> board.c:112: error: inline function 'blue_LED_off' cannot be declared weak
> make[1]: *** [board.o] Error 1
>
> Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
> ---
> lib_arm/board.c | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/lib_arm/board.c b/lib_arm/board.c
> index 5e3d7f6..886c74c 100644
> --- a/lib_arm/board.c
> +++ b/lib_arm/board.c
> @@ -93,23 +93,23 @@ extern void rtl8019_get_enetaddr (uchar * addr);
> * May be supplied by boards if desired
> */
> void inline __coloured_LED_init (void) {}
> -void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
> +void coloured_LED_init(void)__attribute__((weak, alias("__coloured_LED_init")));
> void inline __red_LED_on (void) {}
> -void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
> +void red_LED_on(void) __attribute__((weak, alias("__red_LED_on")));
> void inline __red_LED_off(void) {}
> -void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
> +void red_LED_off(void)__attribute__((weak, alias("__red_LED_off")));
> void inline __green_LED_on(void) {}
> -void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
> +void green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
> void inline __green_LED_off(void) {}
> -void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
> +void green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
> void inline __yellow_LED_on(void) {}
> -void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
> +void yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
> void inline __yellow_LED_off(void) {}
> -void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
> +void yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
> void inline __blue_LED_on(void) {}
> -void inline blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
> +void blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
> void inline __blue_LED_off(void) {}
> -void inline blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
> +void blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
>
> /************************************************************************
> * Init Utilities *
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] ARM: fix build error with gcc-4.4.2 about inline function declared weak
2009-11-01 21:22 ` Tom
@ 2009-11-01 21:47 ` Gaye Abdoulaye Walsimou
2009-11-01 21:51 ` Wolfgang Denk
1 sibling, 0 replies; 5+ messages in thread
From: Gaye Abdoulaye Walsimou @ 2009-11-01 21:47 UTC (permalink / raw)
To: u-boot
Tom wrote:
> What is your
> $(CROSS_COMPILE)gcc -v
> ?
> Tom
>
This is a home made toolchain. With same options with gcc-4.3.4,
gcc-4.4.1, no build error.
armel-linux-gcc -v
Using built-in specs.
Target: armel-unknown-linux-gnueabi
Configured with:
/usr/src/walsimou/embtoolkit-0.1.0-rc5/build/tools_build-armel-linux-arm920t/gcc-4.4.2/configure
--prefix=/usr/src/walsimou/embtoolkit-0.1.0-rc5/tools-armel-linux-arm920t
--with-sysroot=/usr/src/walsimou/embtoolkit-0.1.0-rc5/sysroot-armel-linux-arm920t
--target=armel-unknown-linux-gnueabi --with-cpu=arm920t
--with-float=soft --disable-multilib --host=x86_64-unknown-linux-gnu
--build=x86_64-unknown-linux-gnu --enable-__cxa_atexit --disable-libssp
--disable-libgomp --disable-libmudflap --disable-nls --enable-threads
--enable-shared
--with-gmp=/usr/src/walsimou/embtoolkit-0.1.0-rc5/host-tools-arm920t/usr/local/gmp-host
--with-mpfr=/usr/src/walsimou/embtoolkit-0.1.0-rc5/host-tools-arm920t/usr/local/mpfr-host
--enable-languages=c
Thread model: posix
gcc version 4.4.2 (GCC)
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] ARM: fix build error with gcc-4.4.2 about inline function declared weak
2009-11-01 21:22 ` Tom
2009-11-01 21:47 ` Gaye Abdoulaye Walsimou
@ 2009-11-01 21:51 ` Wolfgang Denk
2009-11-01 22:49 ` Tom
1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2009-11-01 21:51 UTC (permalink / raw)
To: u-boot
Dear Tom,
In message <4AEDFC0D.8020004@windriver.com> you wrote:
> What is your
> $(CROSS_COMPILE)gcc -v
> ?
Tom, please note this issue is old, and in any case a patch,if checked
in, should be properly attributed. I think the first to bring this up
was Ron Lee; please see the whole thread here:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65397
> walsimou at walsimou.com wrote:
> > From: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
> >
> > This patch fix build error with gcc-4.4.2 about inline function
> > declared weak, see below:
Looks exactly the same as Ron's patch to me...
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The trouble with our times is that the future is not what it used to
be. - Paul Valery
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] ARM: fix build error with gcc-4.4.2 about inline function declared weak
2009-11-01 21:51 ` Wolfgang Denk
@ 2009-11-01 22:49 ` Tom
0 siblings, 0 replies; 5+ messages in thread
From: Tom @ 2009-11-01 22:49 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
> Dear Tom,
>
> In message <4AEDFC0D.8020004@windriver.com> you wrote:
>> What is your
>> $(CROSS_COMPILE)gcc -v
>> ?
>
> Tom, please note this issue is old, and in any case a patch,if checked
> in, should be properly attributed. I think the first to bring this up
> was Ron Lee; please see the whole thread here:
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65397
>
>> walsimou at walsimou.com wrote:
>>> From: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
>>>
>>> This patch fix build error with gcc-4.4.2 about inline function
>>> declared weak, see below:
>
> Looks exactly the same as Ron's patch to me...
>
Deja vu..
Let try to fix it this time.
The hold up issue is non inline, adds some wasted bytes.
Is the linker smart enough to garbage collect them away ?
Tom
> Best regards,
>
> Wolfgang Denk
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-11-01 22:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-01 19:47 [U-Boot] [PATCH] ARM: fix build error with gcc-4.4.2 about inline function declared weak walsimou at walsimou.com
2009-11-01 21:22 ` Tom
2009-11-01 21:47 ` Gaye Abdoulaye Walsimou
2009-11-01 21:51 ` Wolfgang Denk
2009-11-01 22:49 ` Tom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox