public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel@lists.01.org
Subject: Re: [PATCH] ArmPkg/CompilerIntrinsicsLib: use Clang-compatible 'weak' attribute
Date: Tue, 6 Sep 2016 15:38:10 +0100	[thread overview]
Message-ID: <20160906143810.GD16080@bivouac.eciton.net> (raw)
In-Reply-To: <1473172051-25022-1-git-send-email-ard.biesheuvel@linaro.org>

On Tue, Sep 06, 2016 at 03:27:31PM +0100, Ard Biesheuvel wrote:
> Clang does not like separate definitions for the __alias__ and the
> __weak__ attributes, so merge the definitions into one.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---
> 
> Note that the CI job is currently broken due to this clang issue.
> 
>  ArmPkg/Library/CompilerIntrinsicsLib/memset.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memset.c b/ArmPkg/Library/CompilerIntrinsicsLib/memset.c
> index 0d837fcecf09..7271b4be6f96 100644
> --- a/ArmPkg/Library/CompilerIntrinsicsLib/memset.c
> +++ b/ArmPkg/Library/CompilerIntrinsicsLib/memset.c
> @@ -26,20 +26,17 @@ void *__memset(void *s, int c, size_t n)
>    return s;
>  }
>  
> -__attribute__((__alias__("__memset")))
> -void *memset(void *dest, int c, size_t n);
> -
> -#ifdef __arm__
> -
>  //
>  // Other modules (such as CryptoPkg/IntrinsicLib) may provide another
>  // implementation of memset(), which may conflict with this one if this
>  // object was pulled into the link due to the definitions below. So make
>  // our memset() 'weak' to let the other implementation take precedence.
>  //
> -__attribute__((__weak__))
> +__attribute__((__weak__, __alias__("__memset")))
>  void *memset(void *dest, int c, size_t n);
>  
> +#ifdef __arm__
> +
>  void __aeabi_memset(void *dest, size_t n, int c)
>  {
>    __memset(dest, c, n);
> -- 
> 2.7.4
> 


      reply	other threads:[~2016-09-06 14:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 14:27 [PATCH] ArmPkg/CompilerIntrinsicsLib: use Clang-compatible 'weak' attribute Ard Biesheuvel
2016-09-06 14:38 ` Leif Lindholm [this message]

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-list 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=20160906143810.GD16080@bivouac.eciton.net \
    --to=devel@edk2.groups.io \
    /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