diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-08-11 20:13:31 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-08-12 09:05:01 +0200 |
commit | 82df618711c596d3b6164e790572c795b7ea4dcc (patch) | |
tree | 1b1cb8623ab9dee14fca1c9941db7b92c2e90717 /MdePkg/Include/Arm | |
parent | d977ba44066e49e466f0505b010cfffaf6d38b12 (diff) | |
download | edk2-82df618711c596d3b6164e790572c795b7ea4dcc.tar.gz edk2-82df618711c596d3b6164e790572c795b7ea4dcc.tar.bz2 edk2-82df618711c596d3b6164e790572c795b7ea4dcc.zip |
MdePkg RVCT: add definition of UNREACHABLE
The RVCT compiler in --gnu mode appears to simply strip of the __builtin
prefix when it encounters calls to __builtin_xxx() functions, and so
the __builtin_unreachable() we emit for GCC results in linker errors
regarding undefined references against 'unreachable()'.
So define UNREACHABLE() to a NOP instead.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdePkg/Include/Arm')
-rw-r--r-- | MdePkg/Include/Arm/ProcessorBind.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MdePkg/Include/Arm/ProcessorBind.h b/MdePkg/Include/Arm/ProcessorBind.h index c2482c2f50..5ee7465c05 100644 --- a/MdePkg/Include/Arm/ProcessorBind.h +++ b/MdePkg/Include/Arm/ProcessorBind.h @@ -28,6 +28,13 @@ #pragma pack()
#endif
+//
+// RVCT does not support the __builtin_unreachable() macro
+//
+#ifdef __ARMCC_VERSION
+#define UNREACHABLE()
+#endif
+
#if _MSC_EXTENSIONS
//
// use Microsoft* C complier dependent integer width types
|