public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom <Tom.Rix@windriver.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: fix build error with gcc-4.4.2 about inline function declared weak
Date: Sun, 01 Nov 2009 15:22:21 -0600	[thread overview]
Message-ID: <4AEDFC0D.8020004@windriver.com> (raw)
In-Reply-To: <1257104865-52003-1-git-send-email-walsimou@walsimou.com>

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							*

  reply	other threads:[~2009-11-01 21:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2009-11-01 21:47   ` Gaye Abdoulaye Walsimou
2009-11-01 21:51   ` Wolfgang Denk
2009-11-01 22:49     ` Tom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AEDFC0D.8020004@windriver.com \
    --to=tom.rix@windriver.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox