2018-11-19 13:08:36 +01:00
|
|
|
--- abuild-3.2.0/functions.sh.in 2018-06-22 10:24:10.000000000 +0300
|
2018-11-19 15:36:14 +01:00
|
|
|
+++ abuild-3.2.0.mod/functions.sh.in 2018-11-19 16:34:59.119607673 +0200
|
|
|
|
@@ -5,40 +5,20 @@
|
|
|
|
|
|
|
|
arch_to_hostspec() {
|
|
|
|
case "$1" in
|
|
|
|
- aarch64) echo "aarch64-alpine-linux-musl" ;;
|
|
|
|
- armel) echo "armv5-alpine-linux-musleabi" ;;
|
|
|
|
- armhf) echo "armv6-alpine-linux-muslgnueabihf" ;;
|
|
|
|
- armv7) echo "armv7-alpine-linux-musleabihf" ;;
|
|
|
|
- mips) echo "mips-alpine-linux-musl" ;;
|
|
|
|
- mips64) echo "mips64-alpine-linux-musl" ;;
|
|
|
|
- mipsel) echo "mipsel-alpine-linux-musl" ;;
|
|
|
|
- mips64el) echo "mips64el-alpine-linux-musl" ;;
|
|
|
|
- ppc) echo "powerpc-alpine-linux-musl" ;;
|
|
|
|
- ppc64) echo "powerpc64-alpine-linux-musl" ;;
|
|
|
|
- ppc64le) echo "powerpc64le-alpine-linux-musl" ;;
|
|
|
|
- s390x) echo "s390x-alpine-linux-musl" ;;
|
|
|
|
- x86) echo "i586-alpine-linux-musl" ;;
|
|
|
|
- x86_64) echo "x86_64-alpine-linux-musl" ;;
|
|
|
|
+ aarch64) echo "aarch64-linux-android" ;;
|
|
|
|
+ arm) echo "arm-linux-androideabi" ;;
|
|
|
|
+ i686) echo "i686-linux-android" ;;
|
|
|
|
+ x86_64) echo "x86_64-linux-android" ;;
|
|
|
|
*) echo "unknown" ;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
hostspec_to_arch() {
|
|
|
|
case "$1" in
|
|
|
|
- aarch64*-*-*-*) echo "aarch64" ;;
|
|
|
|
- arm*-*-*-*eabi) echo "armel" ;;
|
|
|
|
- armv6*-*-*-*eabihf) echo "armhf" ;;
|
|
|
|
- armv7*-*-*-*eabihf) echo "armv7" ;;
|
|
|
|
- i[0-9]86-*-*-*) echo "x86" ;;
|
|
|
|
- mips-*-*-*) echo "mips" ;;
|
|
|
|
- mips64-*-*-*) echo "mips64" ;;
|
|
|
|
- mipsel-*-*-*) echo "mipsel" ;;
|
|
|
|
- mips64el-*-*-*) echo "mips64el" ;;
|
|
|
|
- powerpc-*-*-*) echo "ppc" ;;
|
|
|
|
- powerpc64-*-*-*) echo "ppc64" ;;
|
|
|
|
- powerpc64le-*-*-*) echo "ppc64le" ;;
|
|
|
|
- s390x-*-*-*) echo "s390x" ;;
|
|
|
|
- x86_64-*-*-*) echo "x86_64" ;;
|
|
|
|
+ aarch64-*) echo "aarch64" ;;
|
|
|
|
+ arm-*) echo "arm" ;;
|
|
|
|
+ i686-*) echo "i686" ;;
|
|
|
|
+ x86_64-*) echo "x86_64" ;;
|
|
|
|
*) echo "unknown" ;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
@@ -114,7 +94,7 @@
|
2018-11-19 13:08:36 +01:00
|
|
|
PACKAGER=${_PACKAGER-$PACKAGER}
|
|
|
|
USE_COLORS=${_USE_COLORS-$USE_COLORS}
|
|
|
|
|
|
|
|
- [ -z "$CBUILD" ] && CBUILD="$(gcc -dumpmachine)"
|
|
|
|
+ [ -z "$CBUILD" ] && CBUILD="$(clang -dumpmachine)"
|
|
|
|
[ -z "$CHOST" ] && CHOST="$CBUILD"
|
|
|
|
[ -z "$CTARGET" ] && CTARGET="$CHOST"
|
|
|
|
[ "$(arch_to_hostspec $CBUILD)" != "unknown" ] && CBUILD="$(arch_to_hostspec $CBUILD)"
|
2018-11-19 15:36:14 +01:00
|
|
|
@@ -134,11 +114,11 @@
|
2018-11-19 13:12:52 +01:00
|
|
|
# setup build root
|
|
|
|
[ -z "$CBUILDROOT" ] && export CBUILDROOT="$HOME/sysroot-$CTARGET_ARCH/"
|
|
|
|
# prepare pkg-config for cross building
|
|
|
|
- [ -z "$PKG_CONFIG_PATH" ] && export PKG_CONFIG_PATH="${CBUILDROOT}/usr/lib/pkgconfig/"
|
|
|
|
+ [ -z "$PKG_CONFIG_PATH" ] && export PKG_CONFIG_PATH="${CBUILDROOT}/lib/pkgconfig/"
|
|
|
|
[ -z "$PKG_CONFIG_SYSROOT_DIR" ] && export PKG_CONFIG_SYSROOT_DIR="${CBUILDROOT}"
|
|
|
|
# libtool bug workaround for extra rpaths
|
|
|
|
[ -z "$lt_cv_sys_lib_dlsearch_path_spec" ] && \
|
|
|
|
- export lt_cv_sys_lib_dlsearch_path_spec="${CBUILDROOT}/lib ${CBUILDROOT}/usr/lib /usr/lib /lib /usr/local/lib"
|
|
|
|
+ export lt_cv_sys_lib_dlsearch_path_spec="${CBUILDROOT}/lib"
|
|
|
|
# setup cross-compiler
|
|
|
|
if [ -z "$CROSS_COMPILE" ]; then
|
|
|
|
export CROSS_COMPILE="${CHOST}-"
|
2018-11-19 15:36:14 +01:00
|
|
|
@@ -149,8 +129,8 @@
|
2018-11-19 13:08:36 +01:00
|
|
|
export HOSTCXXFLAGS="$CXXFLAGS"
|
|
|
|
export HOSTCFLAGS="$CFLAGS"
|
|
|
|
export HOSTLDFLAGS="$LDFLAGS"
|
|
|
|
- export CC=${CROSS_COMPILE}gcc
|
|
|
|
- export CXX=${CROSS_COMPILE}g++
|
|
|
|
+ export CC=${CROSS_COMPILE}clang
|
|
|
|
+ export CXX=${CROSS_COMPILE}clang++
|
|
|
|
export LD=${CROSS_COMPILE}ld
|
|
|
|
export CPPFLAGS="--sysroot=${CBUILDROOT} $CPPFLAGS"
|
|
|
|
export CXXFLAGS="--sysroot=${CBUILDROOT} $CXXFLAGS"
|