Skip to contentSkip to conversation

multilib: Enable multilib headers for musl

PATCH In review Khem Raj 1 participant 2 messages Apr 9, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 multilib: Enable multilib headers for musl

This is no longer needed as we can build multilibbed images with musl now

Include bits/reg.h on musl instead of bits/wordsize.h where __WORDSIZE is defined

[YOCTO #13122]

---
v2: include bits/reg.h on musl for __WORDSIZE

 meta/classes/multilib_header.bbclass | 7 -------
 scripts/multilib_header_wrapper.h    | 4 ++++
 2 files changed, 4 insertions(+), 7 deletions(-)
meta/classes/multilib_header.bbclass +0 -7
index e03f5b13b2..48f231eed0 100644
@@ -6,13 +6,6 @@ inherit siteinfo
 # all of the ABI variants for that given architecture.
 #
 oe_multilib_header() {
-
-	case ${HOST_OS} in
-	*-musl*)
-		return
-		;;
-	*)
-	esac
         # For MIPS: "n32" is a special case, which needs to be
         # distinct from both 64-bit and 32-bit.
         case ${TARGET_ARCH} in
scripts/multilib_header_wrapper.h +4 -0
index c81e7ee5e8..00ea5bf841 100644
@@ -16,7 +16,11 @@
 #elif defined (__aarch64__)
 #define __MHWORDSIZE			32
 #else
+#if defined(__GLIBC__)
 #include <bits/wordsize.h>
+#else
+#include <bits/reg.h>
+#endif
 #if defined (__WORDSIZE)
 #define __MHWORDSIZE			__WORDSIZE
 #else
Signature · 1 line
2.26.0
author
#1 lore raw

This patch needs much more testing and I think is not sufficient either.

Quoted 54 lines · Khem Raj

This is no longer needed as we can build multilibbed images with musl now

Include bits/reg.h on musl instead of bits/wordsize.h where __WORDSIZE is defined

[YOCTO #13122]

---
v2: include bits/reg.h on musl for __WORDSIZE

 meta/classes/multilib_header.bbclass | 7 -------
 scripts/multilib_header_wrapper.h    | 4 ++++
 2 files changed, 4 insertions(+), 7 deletions(-)
meta/classes/multilib_header.bbclass +0 -7
index e03f5b13b2..48f231eed0 100644
@@ -6,13 +6,6 @@ inherit siteinfo
 # all of the ABI variants for that given architecture.
 #
 oe_multilib_header() {
-
-       case ${HOST_OS} in
-       *-musl*)
-               return
-               ;;
-       *)
-       esac
         # For MIPS: "n32" is a special case, which needs to be
         # distinct from both 64-bit and 32-bit.
         case ${TARGET_ARCH} in
scripts/multilib_header_wrapper.h +4 -1
index c81e7ee5e8..00ea5bf841 100644
@@ -16,7 +16,11 @@
 #elif defined (__aarch64__)
 #define __MHWORDSIZE                   32
 #else
+#if defined(__GLIBC__)
 #include <bits/wordsize.h>
+#else
+#include <bits/reg.h>
+#endif
 #if defined (__WORDSIZE)
 #define __MHWORDSIZE                   __WORDSIZE
 #else
--

2.26.0