]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg RVCT: add definition of UNREACHABLE
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 11 Aug 2016 18:13:31 +0000 (20:13 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 12 Aug 2016 07:05:01 +0000 (09:05 +0200)
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>
MdePkg/Include/Arm/ProcessorBind.h

index c2482c2f50f0efeb3b0b1ff18fbb20b68cc13bfa..5ee7465c05a346df182b8d0de0bcf6e93328e54d 100644 (file)
 #pragma pack()\r
 #endif\r
 \r
+//\r
+// RVCT does not support the __builtin_unreachable() macro\r
+//\r
+#ifdef __ARMCC_VERSION\r
+#define UNREACHABLE()\r
+#endif\r
+\r
 #if _MSC_EXTENSIONS \r
   //\r
   // use Microsoft* C complier dependent integer width types \r