openssl: Repace if-else with case and add musl triplet
PATCH 1/1 openssl: Repace if-else with case and add musl triplet
Simplifies the code and adds knowlwdge about musl targets
Signed-off-by Khem Raj <[email protected]>
--- meta/recipes-connectivity/openssl/openssl.inc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
meta/recipes-connectivity/openssl/openssl.inc +8 -10
@@ -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
Quoted 6 lines · Khem Raj
Simplifies the code and adds knowlwdge about musl targets
Signed-off-by Khem Raj <[email protected]>--- meta/recipes-connectivity/openssl/openssl.inc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
This breaks x32 builds:
(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@@ -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
Quoted 6 lines · Richard Purdie
This breaks x32 builds:
(target doesn't end up set to linux-x32 which it needs to be)
oops it will also break mips64/n32 :(. I have posted a V2 to address both the issues