Skip to contentSkip to conversation

Support MUSL-x32 build for openssl and libffi

PATCH In review [email protected] 2 participants 5 messages Jul 20, 2017 – Jul 24, 2017

lore
Share & tools
lore
#0 lore raw

cover Support MUSL-x32 build for openssl and libffi

From: sweeaun <[email protected]>

Modification to enable MUSL-x32 build for openssl and libffi recipes.

The following changes since commit 57f606b12b339c82e6981d7ac32450c00d787085:

libgcrypt: upgrade to 1.7.8 (2017-07-19 15:13:40 +0100)

are available in the git repository at:

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

sweeaun (2):
openssl: Support musl-x32 build
libffi: Support musl-x32 build

 meta/recipes-connectivity/openssl/openssl.inc      |  5 ++--
 .../0001-libffi-Support-musl-x32-build.patch       | 30 ++++++++++++++++++++++
 meta/recipes-support/libffi/libffi_3.2.1.bb        |  1 +
 3 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 openssl: Support musl-x32 build

From: sweeaun <[email protected]>

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

---
 meta/recipes-connectivity/openssl/openssl.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssl/openssl.inc +3 -2
index ce295e8..a56bd6e 100644
@@ -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)
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH 1/2] openssl: Support musl-x32 build

Quoted 21 lines · On Wed, 2017-07-19 at 13:29 -0700, [email protected] wrote:

From: sweeaun <[email protected]>

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

---
 meta/recipes-connectivity/openssl/openssl.inc | 5 +++--

 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssl/openssl.inc +0 -0
index ce295e8..a56bd6e 100644
@@ -66,7 +66,8 @@ do_configure () {

  case $os in
  linux-gnueabi |\
  linux-gnuspe |\

meta/recipes-connectivity/openssl/openssl.inc +2 -1
-	linux-musl*)
+	linux-musleabi |\
+	linux-muslspe)
Quoted 3 lines

  os=linux
  ;;
  *)

I think there is a bug here if os=linux-musl which likely caused:

https://autobuilder.yocto.io/builders/nightly-musl/builds/364

Cheers,

Richard

#3 lore raw

Re: [PATCH 1/2] openssl: Support musl-x32 build

Thanks. Will fix that and resubmit the patch.

Regards,
SweeAun

-----Original Message-----
From: Richard Purdie [mailto:[email protected]]
Sent: Saturday, July 22, 2017 4:20 PM
To: Khor, Swee Aun <[email protected]>; [email protected]
Subject: Re: [OE-core] [PATCH 1/2] openssl: Support musl-x32 build

Quoted 21 lines · On Wed, 2017-07-19 at 13:29 -0700, [email protected] wrote:

From: sweeaun <[email protected]>

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

---
 meta/recipes-connectivity/openssl/openssl.inc | 5 +++--

 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-connectivity/openssl/openssl.inc +0 -0
index ce295e8..a56bd6e 100644
@@ -66,7 +66,8 @@ do_configure () {

  case $os in
  linux-gnueabi |\
  linux-gnuspe |\

meta/recipes-connectivity/openssl/openssl.inc +2 -1
-	linux-musl*)
+	linux-musleabi |\
+	linux-muslspe)
Quoted 3 lines

  os=linux
  ;;
  *)

I think there is a bug here if os=linux-musl which likely caused:

https://autobuilder.yocto.io/builders/nightly-musl/builds/364

Cheers,

Richard

#4 lore raw

PATCH 2/2 libffi: Support musl-x32 build

In reply to [email protected]

From: sweeaun <[email protected]>

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

---
 .../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
meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch new file +30 -0
new file mode 100644
index 0000000..6b167c8
@@ -0,0 +1,30 @@
+From 69c3906c85c791716bf650aa36d9361d22acf3fb Mon Sep 17 00:00:00 2001
+From: sweeaun <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta/recipes-support/libffi/libffi_3.2.1.bb +1 -0
index 43eee8e..2a3f4b7 100644
@@ -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"
Signature · 1 line
2.7.4