mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
multilib_header: Update wrapper to handle arm 32/64 bit
Having arm 32/64 bit headers coexisting turns out to be tricky. Unfortunately our wrapper works using wordsize.h and this differs on arm so we can't use it. Therefore replicate the logic here for arm. I did look into writing our own wordsize.h but we also need to remap kernel headers on arm and since wordsize.h comes from libc, that doesn't work for kernel headers. (From OE-Core rev: 141dc7136c9c62da1d30132df4b3244fe6d8898d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -21,11 +21,23 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#if defined (__arm__)
|
||||
#define __MHWORDSIZE 32
|
||||
#elif defined (__aarch64__) && defined ( __LP64__)
|
||||
#define __MHWORDSIZE 64
|
||||
#elif defined (__aarch64__)
|
||||
#define __MHWORDSIZE 32
|
||||
#else
|
||||
#include <bits/wordsize.h>
|
||||
#if defined (__WORDSIZE)
|
||||
#define __MHWORDSIZE __WORDSIZE
|
||||
#else
|
||||
#error "__WORDSIZE is not defined"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __WORDSIZE
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
#if __MHWORDSIZE == 32
|
||||
|
||||
#ifdef _MIPS_SIM
|
||||
|
||||
@@ -41,15 +53,9 @@
|
||||
#include <ENTER_HEADER_FILENAME_HERE-32.h>
|
||||
#endif
|
||||
|
||||
#elif __WORDSIZE == 64
|
||||
#elif __MHWORDSIZE == 64
|
||||
#include <ENTER_HEADER_FILENAME_HERE-64.h>
|
||||
#else
|
||||
#error "Unknown __WORDSIZE detected"
|
||||
#endif /* matches #if __WORDSIZE == 32 */
|
||||
|
||||
#else /* __WORDSIZE is not defined */
|
||||
|
||||
#error "__WORDSIZE is not defined"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user