Skip to content

Commit e1cd246

Browse files
authored
fix bug in compiling libssh2 on mips mipsel powerpc (#56)
1 parent 5179171 commit e1cd246

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

curl-static-cross.sh

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ init_env() {
6868
echo "c-ares version: ${ARES_VERSION}"
6969

7070
export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig:${PREFIX}/lib64/pkgconfig";
71-
export libssh2_unsupported_arch="powerpc mipsel mips"
7271

7372
. /etc/os-release;
7473
dist=${ID};
@@ -503,10 +502,6 @@ compile_tls() {
503502
}
504503

505504
compile_libssh2() {
506-
if echo "${libssh2_unsupported_arch}" | grep -q "\\b${ARCH}\\b"; then
507-
# TODO: libssh2 is failing to compile on powerpc, mipsel and mips, need to fix it
508-
return
509-
fi
510505
echo "Compiling libssh2 ..."
511506

512507
local url
@@ -520,7 +515,8 @@ compile_libssh2() {
520515
PKG_CONFIG="pkg-config --static --with-path=${PREFIX}/lib/pkgconfig:${PREFIX}/lib64/pkgconfig" \
521516
LDFLAGS="-L${PREFIX}/lib -L${PREFIX}/lib64" \
522517
./configure --host="${TARGET}" --prefix="${PREFIX}" --enable-static --enable-shared=no \
523-
--with-crypto=openssl --with-libssl-prefix="${PREFIX}";
518+
--with-crypto=openssl --with-libssl-prefix="${PREFIX}" \
519+
--disable-examples-build;
524520
make -j "$(nproc)";
525521
make install;
526522

@@ -632,12 +628,7 @@ compile_zstd() {
632628

633629
curl_config() {
634630
echo "Configuring curl ..."
635-
local enable_libssh2 with_openssl_quic
636-
637-
enable_libssh2="--with-libssh2"
638-
if echo "${libssh2_unsupported_arch}" | grep -q "\\b${ARCH}\\b"; then
639-
enable_libssh2=""
640-
fi
631+
local with_openssl_quic
641632

642633
# --with-openssl-quic and --with-ngtcp2 are mutually exclusive
643634
with_openssl_quic=""
@@ -658,7 +649,7 @@ curl_config() {
658649
--enable-static --disable-shared \
659650
--with-openssl "${with_openssl_quic}" --with-brotli --with-zstd \
660651
--with-nghttp2 --with-nghttp3 \
661-
--with-libidn2 "${enable_libssh2}" \
652+
--with-libidn2 --with-libssh2 \
662653
--enable-hsts --enable-mime --enable-cookies \
663654
--enable-http-auth --enable-manual \
664655
--enable-proxy --enable-file --enable-http \

0 commit comments

Comments
 (0)