Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Support combination of MUSL and x32 build
@ 2017-07-07  3:43 swee.aun.khor
  2017-07-07  3:43 ` [PATCH 1/7] insane.bbclass: Support musl-x32 swee.aun.khor
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: swee.aun.khor @ 2017-07-07  3:43 UTC (permalink / raw)
  To: openembedded-core

From: sweeaun <swee.aun.khor@intel.com>

Modified infrastructure (bbclass) and fixed bugs on multiple recipes to 
enable combination of MUSL and x32 build.

The following changes since commit 754c03006943a219ffd417c36ab909b464f57f67:

  local.conf.sample: drop image-swab reference (2017-07-06 15:03:10 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib sweeaun/muslx32_patch2
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=sweeaun/muslx32_patch2

sweeaun (7):
  insane.bbclass: Support musl-x32
  siteinfo.bbclass: Support musl-x32
  gnu-efi: Support musl-x32 build
  grub-efi: Support musl-x32
  openssl: Support musl-x32 build
  perl: Support musl-x32 build
  libffi: Support musl-x32 build

 meta/classes/insane.bbclass                        |  5 +++-
 meta/classes/siteinfo.bbclass                      |  2 ++
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.5.bb          |  1 +
 meta/recipes-bsp/grub/grub-efi_2.02.bb             |  2 ++
 meta/recipes-connectivity/openssl/openssl.inc      |  5 ++--
 meta/recipes-devtools/perl/perl_5.24.1.bb          |  2 +-
 .../0001-libffi-Support-musl-x32-build.patch       | 30 ++++++++++++++++++++++
 meta/recipes-support/libffi/libffi_3.2.1.bb        |  1 +
 8 files changed, 44 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch

-- 
2.7.4



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/7] insane.bbclass: Support musl-x32
  2017-07-07  3:43 [PATCH v2 0/7] Support combination of MUSL and x32 build swee.aun.khor
@ 2017-07-07  3:43 ` swee.aun.khor
  2017-07-07  3:43 ` [PATCH 2/7] siteinfo.bbclass: " swee.aun.khor
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: swee.aun.khor @ 2017-07-07  3:43 UTC (permalink / raw)
  To: openembedded-core

From: sweeaun <swee.aun.khor@intel.com>

Added musl-x32 elf header into dictionary.

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
---
 meta/classes/insane.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 7680a59..479d39c 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -150,6 +150,9 @@ def package_qa_get_machine_dict(d):
             "linux-gnux32" :       {
                         "x86_64":     (62,     0,    0,          True,          32),
                       },
+            "linux-muslx32" :       {
+                        "x86_64":     (62,     0,    0,          True,          32),
+                      },
             "linux-gnun32" :       {
                         "mips64":       ( 8,     0,    0,          False,         32),
                         "mips64el":     ( 8,     0,    0,          True,          32),
@@ -488,7 +491,7 @@ def package_qa_check_arch(path,name,d, elf, messages):
 
     # Check the architecture and endiannes of the binary
     is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
-            (target_os == "linux-gnux32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
+            (target_os == "linux-gnux32" or target_os == "linux-muslx32"  or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
     if not ((machine == elf.machine()) or is_32):
         package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
                  (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d)))
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/7] siteinfo.bbclass: Support musl-x32
  2017-07-07  3:43 [PATCH v2 0/7] Support combination of MUSL and x32 build swee.aun.khor
  2017-07-07  3:43 ` [PATCH 1/7] insane.bbclass: Support musl-x32 swee.aun.khor
@ 2017-07-07  3:43 ` swee.aun.khor
  2017-07-07  3:43 ` [PATCH 3/7] gnu-efi: Support musl-x32 build swee.aun.khor
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: swee.aun.khor @ 2017-07-07  3:43 UTC (permalink / raw)
  To: openembedded-core

From: sweeaun <swee.aun.khor@intel.com>

Modified targetinfo and osinfo to support musl-x32.

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
---
 meta/classes/siteinfo.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass
index 90ea5ba..20b4704 100644
--- a/meta/classes/siteinfo.bbclass
+++ b/meta/classes/siteinfo.bbclass
@@ -63,6 +63,7 @@ def siteinfo_data(d):
         "linux-gnueabi": "common-linux common-glibc",
         "linux-gnuspe": "common-linux common-glibc",
         "linux-musl": "common-linux common-musl",
+        "linux-muslx32": "common-linux common-musl",
         "linux-musleabi": "common-linux common-musl",
         "linux-muslspe": "common-linux common-musl",
         "uclinux-uclibc": "common-uclibc",
@@ -99,6 +100,7 @@ def siteinfo_data(d):
         "x86_64-darwin9": "bit-64",
         "x86_64-linux": "bit-64",
         "x86_64-linux-musl": "x86_64-linux bit-64",
+        "x86_64-linux-muslx32": "bit-32 ix86-common x32-linux",
         "x86_64-elf": "bit-64",
         "x86_64-linux-gnu": "bit-64 x86_64-linux",
         "x86_64-linux-gnux32": "bit-32 ix86-common x32-linux",
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/7] gnu-efi: Support musl-x32 build
  2017-07-07  3:43 [PATCH v2 0/7] Support combination of MUSL and x32 build swee.aun.khor
  2017-07-07  3:43 ` [PATCH 1/7] insane.bbclass: Support musl-x32 swee.aun.khor
  2017-07-07  3:43 ` [PATCH 2/7] siteinfo.bbclass: " swee.aun.khor
@ 2017-07-07  3:43 ` swee.aun.khor
  2017-07-07  3:43 ` [PATCH 4/7] grub-efi: Support musl-x32 swee.aun.khor
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: swee.aun.khor @ 2017-07-07  3:43 UTC (permalink / raw)
  To: openembedded-core

From: sweeaun <swee.aun.khor@intel.com>

To build 64-bit binaries for musl-x32.

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
---
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.5.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.5.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.5.bb
index d6f9f53..7346737 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.5.bb
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.5.bb
@@ -53,6 +53,7 @@ FILES_${PN} += "${libdir}/*.lds"
 
 # 64-bit binaries are expected for EFI when targeting X32
 INSANE_SKIP_${PN}-dev_append_linux-gnux32 = " arch"
+INSANE_SKIP_${PN}-dev_append_linux-muslx32 = " arch"
 
 BBCLASSEXTEND = "native"
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/7] grub-efi: Support musl-x32
  2017-07-07  3:43 [PATCH v2 0/7] Support combination of MUSL and x32 build swee.aun.khor
                   ` (2 preceding siblings ...)
  2017-07-07  3:43 ` [PATCH 3/7] gnu-efi: Support musl-x32 build swee.aun.khor
@ 2017-07-07  3:43 ` swee.aun.khor
  2017-07-07  3:43 ` [PATCH 5/7] openssl: Support musl-x32 build swee.aun.khor
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: swee.aun.khor @ 2017-07-07  3:43 UTC (permalink / raw)
  To: openembedded-core

From: sweeaun <swee.aun.khor@intel.com>

To build 64-bit binaries for musl-x32.

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
---
 meta/recipes-bsp/grub/grub-efi_2.02.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index 9d494d5..b949beb 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -65,5 +65,7 @@ FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
 # 64-bit binaries are expected for the bootloader with an x32 userland
 INSANE_SKIP_${PN}_append_linux-gnux32 = " arch"
 INSANE_SKIP_${PN}-dbg_append_linux-gnux32 = " arch"
+INSANE_SKIP_${PN}_append_linux-muslx32 = " arch"
+INSANE_SKIP_${PN}-dbg_append_linux-muslx32 = " arch"
 
 BBCLASSEXTEND = "native"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/7] openssl: Support musl-x32 build
  2017-07-07  3:43 [PATCH v2 0/7] Support combination of MUSL and x32 build swee.aun.khor
                   ` (3 preceding siblings ...)
  2017-07-07  3:43 ` [PATCH 4/7] grub-efi: Support musl-x32 swee.aun.khor
@ 2017-07-07  3:43 ` swee.aun.khor
  2017-07-07  3:43 ` [PATCH 6/7] perl: " swee.aun.khor
  2017-07-07  3:43 ` [PATCH 7/7] libffi: " swee.aun.khor
  6 siblings, 0 replies; 8+ messages in thread
From: swee.aun.khor @ 2017-07-07  3:43 UTC (permalink / raw)
  To: openembedded-core

From: sweeaun <swee.aun.khor@intel.com>

Support musl-x32 build which to build openssl with 32 bits.

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
---
 meta/recipes-connectivity/openssl/openssl.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index ce295e8..a56bd6e 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -66,7 +66,8 @@ do_configure () {
 	case $os in
 	linux-gnueabi |\
 	linux-gnuspe |\
-	linux-musl*)
+	linux-musleabi |\
+	linux-muslspe)
 		os=linux
 		;;
 		*)
@@ -98,7 +99,7 @@ do_configure () {
 	linux-i686)
 		target=debian-i386-i686/cmov
 		;;
-	linux-gnux32-x86_64)
+	linux-gnux32-x86_64 | linux-muslx32-x86_64 )
 		target=linux-x32
 		;;
 	linux-gnu64-x86_64)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/7] perl: Support musl-x32 build
  2017-07-07  3:43 [PATCH v2 0/7] Support combination of MUSL and x32 build swee.aun.khor
                   ` (4 preceding siblings ...)
  2017-07-07  3:43 ` [PATCH 5/7] openssl: Support musl-x32 build swee.aun.khor
@ 2017-07-07  3:43 ` swee.aun.khor
  2017-07-07  3:43 ` [PATCH 7/7] libffi: " swee.aun.khor
  6 siblings, 0 replies; 8+ messages in thread
From: swee.aun.khor @ 2017-07-07  3:43 UTC (permalink / raw)
  To: openembedded-core

From: sweeaun <swee.aun.khor@intel.com>

Existing musl fixups in perl recipe doesn't cover linux-muslx32.
This is fixed to support musl-x32 build.

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
---
 meta/recipes-devtools/perl/perl_5.24.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/perl/perl_5.24.1.bb b/meta/recipes-devtools/perl/perl_5.24.1.bb
index b0ceb84..95d9694 100644
--- a/meta/recipes-devtools/perl/perl_5.24.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.24.1.bb
@@ -125,7 +125,7 @@ do_configure() {
         done
 
         # Fixups for musl
-        if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" ]; then
+        if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" -o "${TARGET_OS}" = "linux-muslx32" ]; then
                 sed -i -e "s,\(d_libm_lib_version=\)'define',\1'undef',g" \
                        -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
                        -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 7/7] libffi: Support musl-x32 build
  2017-07-07  3:43 [PATCH v2 0/7] Support combination of MUSL and x32 build swee.aun.khor
                   ` (5 preceding siblings ...)
  2017-07-07  3:43 ` [PATCH 6/7] perl: " swee.aun.khor
@ 2017-07-07  3:43 ` swee.aun.khor
  6 siblings, 0 replies; 8+ messages in thread
From: swee.aun.khor @ 2017-07-07  3:43 UTC (permalink / raw)
  To: openembedded-core

From: sweeaun <swee.aun.khor@intel.com>

Added target musl-x32 in configure.ac to support musl-x32 build in libffi.

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
---
 .../0001-libffi-Support-musl-x32-build.patch       | 30 ++++++++++++++++++++++
 meta/recipes-support/libffi/libffi_3.2.1.bb        |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch

diff --git a/meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch b/meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch
new file mode 100644
index 0000000..6b167c8
--- /dev/null
+++ b/meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch
@@ -0,0 +1,30 @@
+From 69c3906c85c791716bf650aa36d9361d22acf3fb Mon Sep 17 00:00:00 2001
+From: sweeaun <swee.aun.khor@intel.com>
+Date: Thu, 6 Jul 2017 16:32:46 -0700
+Subject: [PATCH] libffi: Support musl x32 build
+
+Support libffi build with target musl-x32.
+
+Upstream-Status: Pending
+
+Signed-off-by: sweeaun <swee.aun.khor@intel.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index a7bf5ee..8ebe99c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -177,7 +177,7 @@ case "$host" in
+ 	TARGETDIR=x86
+ 	if test $ac_cv_sizeof_size_t = 4; then
+ 	  case "$host" in
+-	    *-gnux32)
++	    *-gnux32 | *-muslx32)
+ 	      TARGET=X86_64
+ 	      ;;
+ 	    *)
+-- 
+2.7.4
+
diff --git a/meta/recipes-support/libffi/libffi_3.2.1.bb b/meta/recipes-support/libffi/libffi_3.2.1.bb
index 43eee8e..2a3f4b7 100644
--- a/meta/recipes-support/libffi/libffi_3.2.1.bb
+++ b/meta/recipes-support/libffi/libffi_3.2.1.bb
@@ -13,6 +13,7 @@ SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
            file://not-win32.patch \
 	   file://0001-mips-Use-compiler-internal-define-for-linux.patch \
            file://0001-mips-fix-MIPS-softfloat-build-issue.patch \
+           file://0001-libffi-Support-musl-x32-build.patch \
 	   "
 
 SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-07 10:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-07  3:43 [PATCH v2 0/7] Support combination of MUSL and x32 build swee.aun.khor
2017-07-07  3:43 ` [PATCH 1/7] insane.bbclass: Support musl-x32 swee.aun.khor
2017-07-07  3:43 ` [PATCH 2/7] siteinfo.bbclass: " swee.aun.khor
2017-07-07  3:43 ` [PATCH 3/7] gnu-efi: Support musl-x32 build swee.aun.khor
2017-07-07  3:43 ` [PATCH 4/7] grub-efi: Support musl-x32 swee.aun.khor
2017-07-07  3:43 ` [PATCH 5/7] openssl: Support musl-x32 build swee.aun.khor
2017-07-07  3:43 ` [PATCH 6/7] perl: " swee.aun.khor
2017-07-07  3:43 ` [PATCH 7/7] libffi: " swee.aun.khor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox