Skip to contentSkip to conversation

openssl: Repace if-else with case and add musl triplet

PATCH Superseded Khem Raj 2 participants 3 messages Aug 14, 2014 – Aug 16, 2014

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 openssl: Repace if-else with case and add musl triplet

Simplifies the code and adds knowlwdge about musl targets

---
 meta/recipes-connectivity/openssl/openssl.inc |   18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
meta/recipes-connectivity/openssl/openssl.inc +8 -10
index b839c00..e585dbb 100644
@@ -60,17 +60,15 @@ do_configure () {
 	ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
 
 	os=${HOST_OS}
-	if [ "x$os" = "xlinux-uclibc" ]; then
+	case $os in
+	linux-uclibc* |\
+	linux-musl* |\
+	linux-gnu*)
 		os=linux
-	elif [ "x$os" = "xlinux-uclibceabi" ]; then
-		os=linux
-	elif [ "x$os" = "xlinux-uclibcspe" ]; then
-		os=linux
-	elif [ "x$os" = "xlinux-gnuspe" ]; then
-		os=linux
-	elif [ "x$os" = "xlinux-gnueabi" ]; then
-		os=linux
-	fi
+		;;
+		*)
+		;;
+	esac
 	target="$os-${HOST_ARCH}"
 	case $target in
 	linux-arm)
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 6 lines · Khem Raj

Simplifies the code and adds knowlwdge about musl targets

---
 meta/recipes-connectivity/openssl/openssl.inc |   18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

This breaks x32 builds:

https://autobuilder.yoctoproject.org/main/builders/nightly-x32/builds/204/steps/BuildImages/logs/stdio

(target doesn't end up set to linux-x32 which it needs to be)

Cheers,

Richard

Quoted 33 lines
meta/recipes-connectivity/openssl/openssl.inc +8 -10
index b839c00..e585dbb 100644
@@ -60,17 +60,15 @@ do_configure () {
 	ln -sf apps/openssl.pod crypto/crypto.pod ssl/ssl.pod doc/
 
 	os=${HOST_OS}
-	if [ "x$os" = "xlinux-uclibc" ]; then
+	case $os in
+	linux-uclibc* |\
+	linux-musl* |\
+	linux-gnu*)
 		os=linux
-	elif [ "x$os" = "xlinux-uclibceabi" ]; then
-		os=linux
-	elif [ "x$os" = "xlinux-uclibcspe" ]; then
-		os=linux
-	elif [ "x$os" = "xlinux-gnuspe" ]; then
-		os=linux
-	elif [ "x$os" = "xlinux-gnueabi" ]; then
-		os=linux
-	fi
+		;;
+		*)
+		;;
+	esac
 	target="$os-${HOST_ARCH}"
 	case $target in
 	linux-arm)
Signature · 1 line
1.7.10.4