Don't use konan cross compiling as it's not bundled anymore
This commit is contained in:
parent
3c5e91d8c9
commit
761b4649c8
@ -1,50 +1,57 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## and then borrowed and slightly modified from https://github.com/datkt/sodium/configure
|
### and then borrowed and slightly modified from https://github.com/datkt/sodium/configure
|
||||||
## borrowed from https://github.com/sodium-friends/sodium-native/blob/master/configure
|
### borrowed from https://github.com/sodium-friends/sodium-native/blob/master/configure
|
||||||
PREFIX="${PREFIX:-$PWD/static-linux-x86-64}"
|
#PREFIX="${PREFIX:-$PWD/static-linux-x86-64}"
|
||||||
KONAN="${KONAN:-$HOME/.konan}"
|
#KONAN="${KONAN:-$HOME/.konan}"
|
||||||
ARCH=${ARCH:-$(uname -m)}
|
#ARCH=${ARCH:-$(uname -m)}
|
||||||
echo $PREFIX
|
#echo $PREFIX
|
||||||
echo $KONAN
|
#echo $KONAN
|
||||||
echo $ARCH
|
#echo $ARCH
|
||||||
|
#cd libsodium
|
||||||
|
#
|
||||||
|
#./autogen.sh -s -f
|
||||||
|
#
|
||||||
|
#if [ -z "$SYSROOT" ]; then
|
||||||
|
# case $(uname -a) in
|
||||||
|
# **Linux*x86_64**)
|
||||||
|
# echo "Linux env"
|
||||||
|
# GCC=${GCC:-gcc}
|
||||||
|
# GCC=gcc
|
||||||
|
# export CC=$(find $KONAN/dependencies -wholename *${ARCH/_/-}/bin/*$GCC | head -n1)
|
||||||
|
# ;;
|
||||||
|
#
|
||||||
|
# **Linux*aarch64**)
|
||||||
|
# echo "Linux ARM env"
|
||||||
|
# GCC=${GCC:-gcc}
|
||||||
|
# GCC=gcc
|
||||||
|
# export CC=$(find $KONAN/dependencies -wholename *${ARCH/_/-}/bin/*$GCC | head -n1)
|
||||||
|
# ;;
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# **Darwin*x86_64**)
|
||||||
|
# echo "Darwin env"
|
||||||
|
# GCC=${GCC:-clang}
|
||||||
|
# export CC=$(find $KONAN/dependencies -wholename *${ARCH/_/-}/bin/*$GCC | head -n1)
|
||||||
|
# ;;
|
||||||
|
#
|
||||||
|
# **MSYS*x86_64**)
|
||||||
|
# echo "Msys env"
|
||||||
|
# GCC=clang.exe
|
||||||
|
# export CC=$(find $KONAN/dependencies -wholename *${ARCH}*/bin/*$GCC | head -n1)
|
||||||
|
# ;;
|
||||||
|
#
|
||||||
|
# esac
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# echo "CC"
|
||||||
|
# echo $CC
|
||||||
|
#fi
|
||||||
|
#
|
||||||
|
#./configure --prefix=$PREFIX "$@"
|
||||||
|
|
||||||
|
#! /bin/sh
|
||||||
|
export PREFIX="$(pwd)/static-linux-x86-64"
|
||||||
|
export CC=gcc
|
||||||
cd libsodium
|
cd libsodium
|
||||||
|
|
||||||
./autogen.sh -s -f
|
./autogen.sh -s -f
|
||||||
|
|
||||||
if [ -z "$SYSROOT" ]; then
|
|
||||||
case $(uname -a) in
|
|
||||||
**Linux*x86_64**)
|
|
||||||
echo "Linux env"
|
|
||||||
GCC=${GCC:-gcc}
|
|
||||||
GCC=gcc
|
|
||||||
export CC=$(find $KONAN/dependencies -wholename *${ARCH/_/-}/bin/*$GCC | head -n1)
|
|
||||||
;;
|
|
||||||
|
|
||||||
**Linux*aarch64**)
|
|
||||||
echo "Linux ARM env"
|
|
||||||
GCC=${GCC:-gcc}
|
|
||||||
GCC=gcc
|
|
||||||
export CC=$(find $KONAN/dependencies -wholename *${ARCH/_/-}/bin/*$GCC | head -n1)
|
|
||||||
;;
|
|
||||||
|
|
||||||
|
|
||||||
**Darwin*x86_64**)
|
|
||||||
echo "Darwin env"
|
|
||||||
GCC=${GCC:-clang}
|
|
||||||
export CC=$(find $KONAN/dependencies -wholename *${ARCH/_/-}/bin/*$GCC | head -n1)
|
|
||||||
;;
|
|
||||||
|
|
||||||
**MSYS*x86_64**)
|
|
||||||
echo "Msys env"
|
|
||||||
GCC=clang.exe
|
|
||||||
export CC=$(find $KONAN/dependencies -wholename *${ARCH}*/bin/*$GCC | head -n1)
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
echo "CC"
|
|
||||||
echo $CC
|
|
||||||
fi
|
|
||||||
|
|
||||||
./configure --prefix=$PREFIX "$@"
|
./configure --prefix=$PREFIX "$@"
|
||||||
|
@ -1,13 +1,21 @@
|
|||||||
|
##! /bin/sh
|
||||||
|
#export PREFIX="$(pwd)/static-arm64"
|
||||||
|
#export CLANG_BIN=$HOME/.konan/dependencies/clang-llvm-8.0.0-linux-x86-64/bin
|
||||||
|
#export CC=$HOME/.konan/dependencies/clang-llvm-8.0.0-linux-x86-64/bin/clang
|
||||||
|
#export SYSROOT=$HOME/.konan/dependencies/target-sysroot-1-linux-glibc-arm64
|
||||||
|
#export TOOLCHAIN=$HOME/.konan/dependencies/target-gcc-toolchain-3-linux-x86-64/x86_64-unknown-linux-gnu
|
||||||
|
##export CFLAGS="-O3 -target aarch64-unknown-linux-gnu --sysroot $SYSROOT -gcc-toolchain $TOOLCHAIN -fuse-ld=$CLANG_BIN/ld.lld -B$CLANG_BIN"
|
||||||
|
#export CFLAGS="-O3 -target aarch64-unknown-linux-gnu --sysroot $SYSROOT -fuse-ld=$CLANG_BIN/ld.lld"
|
||||||
|
#export LDFLAGS="-fuse-ld=$CLANG_BIN/ld.lld"
|
||||||
|
#cd libsodium
|
||||||
|
#./autogen.sh -s -f
|
||||||
|
#./configure --prefix=$PREFIX --with-sysroot=$SYSROOT --host=aarch64-unknown-linux-gnu "$@"
|
||||||
|
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
export PREFIX="$(pwd)/static-arm64"
|
export PREFIX="$(pwd)/static-arm64"
|
||||||
export CLANG_BIN=$HOME/.konan/dependencies/clang-llvm-8.0.0-linux-x86-64/bin
|
export CC=aarch64-linux-gnu-gcc
|
||||||
export CC=$HOME/.konan/dependencies/clang-llvm-8.0.0-linux-x86-64/bin/clang
|
|
||||||
export SYSROOT=$HOME/.konan/dependencies/target-sysroot-1-linux-glibc-arm64
|
|
||||||
export TOOLCHAIN=$HOME/.konan/dependencies/target-gcc-toolchain-3-linux-x86-64/x86_64-unknown-linux-gnu
|
|
||||||
#export CFLAGS="-O3 -target aarch64-unknown-linux-gnu --sysroot $SYSROOT -gcc-toolchain $TOOLCHAIN -fuse-ld=$CLANG_BIN/ld.lld -B$CLANG_BIN"
|
|
||||||
export CFLAGS="-O3 -target aarch64-unknown-linux-gnu --sysroot $SYSROOT -fuse-ld=$CLANG_BIN/ld.lld"
|
|
||||||
export LDFLAGS="-fuse-ld=$CLANG_BIN/ld.lld"
|
|
||||||
cd libsodium
|
cd libsodium
|
||||||
./autogen.sh -s -f
|
./autogen.sh -s -f
|
||||||
./configure --prefix=$PREFIX --with-sysroot=$SYSROOT --host=aarch64-unknown-linux-gnu "$@"
|
./configure --prefix=$PREFIX --host=aarch64-unknown-linux-gnu "$@"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit a016aea61214668827e18c6278ac25b0bbc98ca5
|
Subproject commit 7d67f1909bfa6e1225469dbcdb0229c5a9bbf8e2
|
Loading…
x
Reference in New Issue
Block a user