summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/multilib_header.bbclass7
-rw-r--r--scripts/multilib_header_wrapper.h26
2 files changed, 16 insertions, 17 deletions
diff --git a/meta/classes/multilib_header.bbclass b/meta/classes/multilib_header.bbclass
index 304c28e771..e03f5b13b2 100644
--- a/meta/classes/multilib_header.bbclass
+++ b/meta/classes/multilib_header.bbclass
@@ -13,13 +13,9 @@ oe_multilib_header() {
13 ;; 13 ;;
14 *) 14 *)
15 esac 15 esac
16 # We use
17 # For ARM: We don't support multilib builds.
18 # For MIPS: "n32" is a special case, which needs to be 16 # For MIPS: "n32" is a special case, which needs to be
19 # distinct from both 64-bit and 32-bit. 17 # distinct from both 64-bit and 32-bit.
20 case ${TARGET_ARCH} in 18 case ${TARGET_ARCH} in
21 arm*) return
22 ;;
23 mips*) case "${MIPSPKGSFX_ABI}" in 19 mips*) case "${MIPSPKGSFX_ABI}" in
24 "-n32") 20 "-n32")
25 ident=n32 21 ident=n32
@@ -31,9 +27,6 @@ oe_multilib_header() {
31 ;; 27 ;;
32 *) ident=${SITEINFO_BITS} 28 *) ident=${SITEINFO_BITS}
33 esac 29 esac
34 if echo ${TARGET_ARCH} | grep -q arm; then
35 return
36 fi
37 for each_header in "$@" ; do 30 for each_header in "$@" ; do
38 if [ ! -f "${D}/${includedir}/$each_header" ]; then 31 if [ ! -f "${D}/${includedir}/$each_header" ]; then
39 bberror "oe_multilib_header: Unable to find header $each_header." 32 bberror "oe_multilib_header: Unable to find header $each_header."
diff --git a/scripts/multilib_header_wrapper.h b/scripts/multilib_header_wrapper.h
index 5a87540884..f516673b63 100644
--- a/scripts/multilib_header_wrapper.h
+++ b/scripts/multilib_header_wrapper.h
@@ -21,11 +21,23 @@
21 * 21 *
22 */ 22 */
23 23
24#include <bits/wordsize.h>
25 24
26#ifdef __WORDSIZE 25#if defined (__arm__)
26#define __MHWORDSIZE 32
27#elif defined (__aarch64__) && defined ( __LP64__)
28#define __MHWORDSIZE 64
29#elif defined (__aarch64__)
30#define __MHWORDSIZE 32
31#else
32#include <bits/wordsize.h>
33#if defined (__WORDSIZE)
34#define __MHWORDSIZE __WORDSIZE
35#else
36#error "__WORDSIZE is not defined"
37#endif
38#endif
27 39
28#if __WORDSIZE == 32 40#if __MHWORDSIZE == 32
29 41
30#ifdef _MIPS_SIM 42#ifdef _MIPS_SIM
31 43
@@ -41,15 +53,9 @@
41#include <ENTER_HEADER_FILENAME_HERE-32.h> 53#include <ENTER_HEADER_FILENAME_HERE-32.h>
42#endif 54#endif
43 55
44#elif __WORDSIZE == 64 56#elif __MHWORDSIZE == 64
45#include <ENTER_HEADER_FILENAME_HERE-64.h> 57#include <ENTER_HEADER_FILENAME_HERE-64.h>
46#else 58#else
47#error "Unknown __WORDSIZE detected" 59#error "Unknown __WORDSIZE detected"
48#endif /* matches #if __WORDSIZE == 32 */ 60#endif /* matches #if __WORDSIZE == 32 */
49
50#else /* __WORDSIZE is not defined */
51
52#error "__WORDSIZE is not defined"
53
54#endif
55 61