Konan does still bundle sysroot and crosscompiler, use that otherwise gold complains
This commit is contained in:
parent
761b4649c8
commit
cd41c428a3
@ -1,57 +1,15 @@
|
|||||||
#!/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
|
||||||
|
|
||||||
|
export CC=$HOME/.konan/dependencies/x86_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2/bin/x86_64-unknown-linux-gnu-gcc
|
||||||
|
|
||||||
./autogen.sh -s -f
|
./autogen.sh -s -f
|
||||||
./configure --prefix=$PREFIX "$@"
|
./configure --prefix=$PREFIX "$@"
|
||||||
|
@ -1,21 +1,13 @@
|
|||||||
##! /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 CC=aarch64-linux-gnu-gcc
|
export CLANG_BIN=$HOME/.konan/dependencies/aarch64-unknown-linux-gnu-gcc-8.3.0-glibc-2.25-kernel-4.9-2/bin/
|
||||||
|
export CC=$HOME/.konan/dependencies/aarch64-unknown-linux-gnu-gcc-8.3.0-glibc-2.25-kernel-4.9-2/bin/aarch64-unknown-linux-gnu-gcc
|
||||||
|
export SYSROOT=$HOME/.konan/dependencies/qemu-aarch64-static-5.1.0-linux-2
|
||||||
|
#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"
|
||||||
|
export LDFLAGS=""
|
||||||
cd libsodium
|
cd libsodium
|
||||||
./autogen.sh -s -f
|
./autogen.sh -s -f
|
||||||
./configure --prefix=$PREFIX --host=aarch64-unknown-linux-gnu "$@"
|
./configure --prefix=$PREFIX --with-sysroot=$SYSROOT --host=aarch64-unknown-linux-gnu "$@"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user