diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-09-06 15:25:03 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-09-06 15:49:40 +0100 |
commit | ec68dc28557925e0708d5676288ad140651a3851 (patch) | |
tree | 8a10d8e5ce4dddcb80e7150fd8898abfa26bf348 /ArmPkg | |
parent | 4c0b2d25c61c8dad0a9dcf9cb078df102aee6284 (diff) | |
download | edk2-ec68dc28557925e0708d5676288ad140651a3851.zip edk2-ec68dc28557925e0708d5676288ad140651a3851.tar.gz edk2-ec68dc28557925e0708d5676288ad140651a3851.tar.bz2 |
ArmPkg/CompilerIntrinsicsLib: use Clang-compatible 'weak' attribute
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>
Diffstat (limited to 'ArmPkg')
-rw-r--r-- | ArmPkg/Library/CompilerIntrinsicsLib/memset.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memset.c b/ArmPkg/Library/CompilerIntrinsicsLib/memset.c index 0d837fc..7271b4b 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); |