cmake: Add ENABLE_UBSAN for -fsanitize=undefined

Change-Id: I73db5f904a7d86052aae62e67b01281763c83561
This commit is contained in:
Dominique Martinet
2018-10-10 15:20:08 +09:00
parent 2a63c962fc
commit 2f456b8752
5 changed files with 237 additions and 0 deletions

View File

@ -51,6 +51,7 @@ static inline unsigned long hweight_long(unsigned long w)
#define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask))
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
#endif /*__ASSEMBLY__*/