Browse Source

Fix build under linux-aarch64

Signed-off-by: falkTX <falktx@falktx.com>
main
falkTX 5 months ago
parent
commit
ad26e682a2
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
5 changed files with 36 additions and 12 deletions
  1. +1
    -1
      .github/workflows/bootstrap.yml
  2. +21
    -5
      bootstrap-jack2.sh
  3. +4
    -2
      bootstrap-plugins.sh
  4. +1
    -1
      bootstrap-python.sh
  5. +9
    -3
      setup/functions.sh

+ 1
- 1
.github/workflows/bootstrap.yml View File

@@ -4,7 +4,7 @@ on:
push:

env:
CACHE_VERSION: 13
CACHE_VERSION: 14
DEBIAN_FRONTEND: noninteractive
PAWPAW_SKIP_TESTS: 1



+ 21
- 5
bootstrap-jack2.sh View File

@@ -56,16 +56,32 @@ download db "${DB_VERSION}" "${DB_URL}"

# based on build_autoconf
function build_custom_db() {
local name="${1}"
local pkgname="${1}"
local version="${2}"
local extraconfrules="${3}"

local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
local pkgdir="${PAWPAW_BUILDDIR}/${pkgname}-${version}"

if [ "${CROSS_COMPILING}" -eq 1 ]; then
if [ "${LINUX}" -eq 1 ] || [ "${WASM}" -eq 1 ]; then
extraconfrules+=" --build=$(uname -m)-linux-gnu ac_cv_build=$(uname -m)-linux-gnu"
fi

if [ "${LINUX}" -eq 1 ] && [ "$(uname -m)" != "x86_64" ]; then
extraconfrules+=" --host=$(uname -m)-linux-gnu ac_cv_host=$(uname -m)-linux-gnu"
elif [ "${WASM}" -eq 1 ]; then
extraconfrules+=" --host=i686-linux-gnu ac_cv_host=i686-linux-gnu"
elif [ -n "${TOOLCHAIN_PREFIX}" ]; then
extraconfrules+=" --host=${TOOLCHAIN_PREFIX} ac_cv_host=${TOOLCHAIN_PREFIX}"
fi

if echo "${extraconfrules}" | grep -q -e '--enable-debug' -e '--disable-debug'; then
true
elif [ -n "${PAWPAW_DEBUG}" ] && [ "${PAWPAW_DEBUG}" -eq 1 ]; then
extraconfrules+=" --enable-debug"
else
extraconfrules+=" --disable-debug"
fi

if [ "${MACOS}" -eq 1 ]; then
extraconfrules+=" --with-mutex=x86_64/gcc-assembly db_cv_atomic=x86/gcc-assembly"
fi
@@ -73,11 +89,11 @@ function build_custom_db() {
extraconfrules+=" --enable-mingw"
fi

_prebuild "${name}" "${pkgdir}"
_prebuild "${pkgname}" "${pkgdir}"

if [ ! -f "${pkgdir}/.stamp_configured" ]; then
pushd "${pkgdir}/build_unix"
../dist/configure --enable-static --disable-shared --disable-debug --disable-doc --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
../dist/configure --enable-static --disable-shared --disable-doc --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
touch ../.stamp_configured
popd
fi


+ 4
- 2
bootstrap-plugins.sh View File

@@ -385,8 +385,9 @@ fi
if [ -z "${PAWPAW_SKIP_GLIB}" ] || [ "${PAWPAW_SKIP_GLIB}" -eq 0 ]; then

if [ "${MACOS}" -eq 1 ] || [ "${WASM}" -eq 1 ] || [ "${WIN32}" -eq 1 ]; then
GLIB_EXTRAFLAGS="--disable-rebuilds"
GLIB_EXTRAFLAGS="--disable-profile"
GLIB_EXTRAFLAGS=""
GLIB_EXTRAFLAGS+=" --disable-rebuilds"
GLIB_EXTRAFLAGS+=" --disable-profile"

if [ "${WIN32}" -eq 1 ]; then
GLIB_EXTRAFLAGS+=" --with-threads=win32"
@@ -413,6 +414,7 @@ if [ "${MACOS}" -eq 1 ] || [ "${WASM}" -eq 1 ] || [ "${WIN32}" -eq 1 ]; then
patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_ARM/__aarch64__/'
patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_X86_64/__SSE2__/'
elif [ "${WASM}" -eq 1 ]; then
patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_I486/_G_ATOMIC_NOT_I486/'
patch_file glib ${GLIB_VERSION} "glib/gatomic.c" 's/G_ATOMIC_X86_64/_G_ATOMIC_NOT_X86_64/'
fi



+ 1
- 1
bootstrap-python.sh View File

@@ -80,7 +80,7 @@ function build_conf_openssl() {
fi
export RELEASE="whatever"
export BUILD="unknown"
elif [ "${MACOS_UNIVERSAL}" -eq 0 ] && [ "$(uname -m)" != "x86_64" ]; then
elif [ "${MACOS_UNIVERSAL}" -eq 0 ] && [ "$(uname -m)" = "x86_64" ]; then
export MACHINE="x86_64"
fi



+ 9
- 3
setup/functions.sh View File

@@ -221,10 +221,16 @@ function build_autoconf() {

local pkgdir="${PAWPAW_BUILDDIR}/${pkgname}-${version}"

if [ "${WASM}" -eq 1 ]; then
extraconfrules+=" --host=$(uname -m)-linux-gnu"
if [ "${LINUX}" -eq 1 ] || [ "${WASM}" -eq 1 ]; then
extraconfrules+=" --build=$(uname -m)-linux-gnu ac_cv_build=$(uname -m)-linux-gnu"
fi

if [ "${LINUX}" -eq 1 ] && [ "$(uname -m)" != "x86_64" ]; then
extraconfrules+=" --host=$(uname -m)-linux-gnu ac_cv_host=$(uname -m)-linux-gnu"
elif [ "${WASM}" -eq 1 ]; then
extraconfrules+=" --host=i686-linux-gnu ac_cv_host=i686-linux-gnu"
elif [ -n "${TOOLCHAIN_PREFIX}" ]; then
extraconfrules+=" --host=${TOOLCHAIN_PREFIX} ac_cv_build=$(uname -m)-linux-gnu ac_cv_host=${TOOLCHAIN_PREFIX}"
extraconfrules+=" --host=${TOOLCHAIN_PREFIX} ac_cv_host=${TOOLCHAIN_PREFIX}"
fi

if echo "${extraconfrules}" | grep -q -e '--enable-debug' -e '--disable-debug'; then


Loading…
Cancel
Save