diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2019-05-31 22:46:30 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2019-06-01 09:57:32 +0200 |
commit | 371e7001e8d5753365f3b6cd05b17e32be62b4f3 (patch) | |
tree | 875881e191cc140d97c8788a4dbc55f13ab580f4 /ArmPkg/Library | |
parent | 8594c2073cdb1065e60f01e9b099918c5e839212 (diff) | |
download | edk2-371e7001e8d5753365f3b6cd05b17e32be62b4f3.tar.gz edk2-371e7001e8d5753365f3b6cd05b17e32be62b4f3.tar.bz2 edk2-371e7001e8d5753365f3b6cd05b17e32be62b4f3.zip |
ArmPkg/ArmSoftFloatLib GCC4x: fix build failure
The upstream SoftFloat code that was recently incorporated into
ArmSoftFloatLib uses some parameterization to tweak the inlining
and optimization behavior for different compilers.
The custom platform.h file that sets these parameters is based on
the upstream version for Linux/ARM, but was updated to include the
'always_inline' GCC attribute into the INLINE macro, to ensure that
all definitions that are marked as inline are not only inlined into
their callers, but also to ensure that no version of the function is
ever emitted into the object file.
This works fine on recent GCC and Clang, but the latter part turns
out to break on GCC 4.x, resulting duplicate definition linker errors.
Fortunately, the synticatically more appriopriate 'static inline'
works fine on both the recent and the older compilers, so let's switch
to that instead.
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'ArmPkg/Library')
-rw-r--r-- | ArmPkg/Library/ArmSoftFloatLib/platform.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPkg/Library/ArmSoftFloatLib/platform.h b/ArmPkg/Library/ArmSoftFloatLib/platform.h index 31e843463a..07800a9d5b 100644 --- a/ArmPkg/Library/ArmSoftFloatLib/platform.h +++ b/ArmPkg/Library/ArmSoftFloatLib/platform.h @@ -5,7 +5,7 @@ */
#define LITTLEENDIAN 1
-#define INLINE inline __attribute__((always_inline))
+#define INLINE static inline
#define SOFTFLOAT_BUILTIN_CLZ 1
#define SOFTFLOAT_FAST_INT64
#include "opts-GCC.h"
|