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>
This commit is contained in:
		| @@ -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  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user