diff --git a/layer/bsp-alix/TOOLCHAIN b/layer/bsp-alix/TOOLCHAIN index 55a88a4..c158df3 100644 --- a/layer/bsp-alix/TOOLCHAIN +++ b/layer/bsp-alix/TOOLCHAIN @@ -10,6 +10,5 @@ GCC_EXTRACFG="--enable-libmpx" LINUXPKG="linux" LINUX_CPU="x86" LINUX_TGT="bzImage modules" -OPENSSL_TARGET="linux-generic32 386" TC_HARDENING="no" diff --git a/layer/bsp-qemu64/TOOLCHAIN b/layer/bsp-qemu64/TOOLCHAIN index ed98d69..97c7605 100644 --- a/layer/bsp-qemu64/TOOLCHAIN +++ b/layer/bsp-qemu64/TOOLCHAIN @@ -10,6 +10,5 @@ GCC_EXTRACFG="--enable-libmpx" LINUXPKG="linux" LINUX_CPU="x86_64" LINUX_TGT="bzImage" -OPENSSL_TARGET="linux-x86_64" TC_HARDENING="no" diff --git a/layer/bsp-rpi3/TOOLCHAIN b/layer/bsp-rpi3/TOOLCHAIN index 06913ad..d2e44cb 100644 --- a/layer/bsp-rpi3/TOOLCHAIN +++ b/layer/bsp-rpi3/TOOLCHAIN @@ -10,6 +10,5 @@ GCC_EXTRACFG="--with-float=hard --with-fpu=neon-vfpv3" LINUXPKG="linux-rpi3" LINUX_CPU="arm" LINUX_TGT="zImage" -OPENSSL_TARGET="linux-generic32" TC_HARDENING="no" diff --git a/pkg/openssl/build b/pkg/openssl/build index a74626a..1b5d539 100755 --- a/pkg/openssl/build +++ b/pkg/openssl/build @@ -10,6 +10,7 @@ prepare() { } build() { + local OPENSSL_TARGET="" local cflags="" local ldflags="" @@ -18,6 +19,22 @@ build() { ldflags="-z noexecstack -z relro -z now" fi + case "$TARGET" in + i*86-*) + OPENSSL_TARGET="linux-generic32 386" + ;; + x86_64-*) + OPENSSL_TARGET="linux-x86_64" + ;; + arm-*) + OPENSSL_TARGET="linux-generic32" + ;; + *) + echo "don't know how to map $TARGET to OpenSSL arch" + exit 1 + ;; + esac + $1/Configure --prefix=/ --cross-compile-prefix="${TARGET}-" \ --openssldir=/etc/ssl --libdir=/lib \ CFLAGS="-DOPENSSL_NO_HEARTBEATS $cflags" \