[v2] multilib: Enable multilib headers for musl

Submitted by Khem Raj on April 9, 2020, 8:29 a.m. | Patch ID: 171817

Details

Message ID 20200409082941.3428697-1-raj.khem@gmail.com
State Master Next
Commit 65395d5dd2986abe257bcdf1a4fd29fac9c649d5
Headers show

Commit Message

Khem Raj April 9, 2020, 8:29 a.m.
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]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
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(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/multilib_header.bbclass b/meta/classes/multilib_header.bbclass
index e03f5b13b2..48f231eed0 100644
--- a/meta/classes/multilib_header.bbclass
+++ b/meta/classes/multilib_header.bbclass
@@ -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
diff --git a/scripts/multilib_header_wrapper.h b/scripts/multilib_header_wrapper.h
index c81e7ee5e8..00ea5bf841 100644
--- a/scripts/multilib_header_wrapper.h
+++ b/scripts/multilib_header_wrapper.h
@@ -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

Comments

Khem Raj April 9, 2020, 2:31 p.m.
This patch needs much more testing and I think is not sufficient either.

On Thu, Apr 9, 2020 at 1:29 AM Khem Raj <raj.khem@gmail.com> wrote:
>
> 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]
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> 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(-)
>
> diff --git a/meta/classes/multilib_header.bbclass b/meta/classes/multilib_header.bbclass
> index e03f5b13b2..48f231eed0 100644
> --- a/meta/classes/multilib_header.bbclass
> +++ b/meta/classes/multilib_header.bbclass
> @@ -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
> diff --git a/scripts/multilib_header_wrapper.h b/scripts/multilib_header_wrapper.h
> index c81e7ee5e8..00ea5bf841 100644
> --- a/scripts/multilib_header_wrapper.h
> +++ b/scripts/multilib_header_wrapper.h
> @@ -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
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#137154): https://lists.openembedded.org/g/openembedded-core/message/137154
Mute This Topic: https://lists.openembedded.org/mt/72892284/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-