Fix X11 and rust build on arm64
This commit is contained in:
parent
f29d3b5662
commit
9c766b0b33
16 changed files with 64 additions and 24 deletions
|
@ -52,11 +52,8 @@ Available targets:
|
||||||
|
|
||||||
The linuxarm64 target will not build some dependencies due to lack of arm64 (aarch64) architecture support or cross-compiling restrictions.
|
The linuxarm64 target will not build some dependencies due to lack of arm64 (aarch64) architecture support or cross-compiling restrictions.
|
||||||
|
|
||||||
* `libx11` and dependencies: libx11 and its dependencies don't seem to support cross-compiling.
|
|
||||||
* `SDL`: Because it depends on libx11.
|
|
||||||
* `davs2` and `xavs2`: aarch64 support is broken.
|
* `davs2` and `xavs2`: aarch64 support is broken.
|
||||||
* `libmfx` and `libva`: Library for Intel QSV, so there is no aarch64 support.
|
* `libmfx` and `libva`: Library for Intel QSV, so there is no aarch64 support.
|
||||||
* `ffplay` binary: Because it depends on libx11 and SDL.
|
|
||||||
|
|
||||||
Available:
|
Available:
|
||||||
* `gpl` Includes all dependencies, even those that require full GPL instead of just LGPL.
|
* `gpl` Includes all dependencies, even those that require full GPL instead of just LGPL.
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBX11_COMMIT="3a30ada60c5217ada37b143b541c8e6f6284c7fa"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +27,12 @@ ffbuild_dockerbuild() {
|
||||||
--enable-ipv6
|
--enable-ipv6
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ $TARGET == linuxarm64 ]]; then
|
||||||
|
myconf+=(
|
||||||
|
--disable-malloc0returnsnull
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
myconf+=(
|
myconf+=(
|
||||||
--host="$FFBUILD_TOOLCHAIN"
|
--host="$FFBUILD_TOOLCHAIN"
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBXEXT_COMMIT="47904063048fa6ef6e8e16219ddef4d14d5d9a4b"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +25,12 @@ ffbuild_dockerbuild() {
|
||||||
--without-lint
|
--without-lint
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ $TARGET == linuxarm64 ]]; then
|
||||||
|
myconf+=(
|
||||||
|
--disable-malloc0returnsnull
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
myconf+=(
|
myconf+=(
|
||||||
--host="$FFBUILD_TOOLCHAIN"
|
--host="$FFBUILD_TOOLCHAIN"
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBXFIXES_COMMIT="6fe3bd64dd82f704ed91478acb4c99ab5c00be16"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBXI_COMMIT="f24d7f43ab4d97203e60677a3d42e11dbc80c8b4"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +21,12 @@ ffbuild_dockerbuild() {
|
||||||
--with-pic
|
--with-pic
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ $TARGET == linuxarm64 ]]; then
|
||||||
|
myconf+=(
|
||||||
|
--disable-malloc0returnsnull
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
myconf+=(
|
myconf+=(
|
||||||
--host="$FFBUILD_TOOLCHAIN"
|
--host="$FFBUILD_TOOLCHAIN"
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBXINERAMA_COMMIT="c5187f076d16601c15c59c5a2f05c0513d9f042b"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +21,12 @@ ffbuild_dockerbuild() {
|
||||||
--with-pic
|
--with-pic
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ $TARGET == linuxarm64 ]]; then
|
||||||
|
myconf+=(
|
||||||
|
--disable-malloc0returnsnull
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
myconf+=(
|
myconf+=(
|
||||||
--host="$FFBUILD_TOOLCHAIN"
|
--host="$FFBUILD_TOOLCHAIN"
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBXRENDER_COMMIT="bce0618839fc33f44edd8b5498b8e33d167806ff"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +21,12 @@ ffbuild_dockerbuild() {
|
||||||
--with-pic
|
--with-pic
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ $TARGET == linuxarm64 ]]; then
|
||||||
|
myconf+=(
|
||||||
|
--disable-malloc0returnsnull
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
myconf+=(
|
myconf+=(
|
||||||
--host="$FFBUILD_TOOLCHAIN"
|
--host="$FFBUILD_TOOLCHAIN"
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBXSCRNSAVER_COMMIT="aa9fd5061d0a8832480ad0c1acc9d2e864e807f4"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +21,12 @@ ffbuild_dockerbuild() {
|
||||||
--with-pic
|
--with-pic
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ $TARGET == linuxarm64 ]]; then
|
||||||
|
myconf+=(
|
||||||
|
--disable-malloc0returnsnull
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
myconf+=(
|
myconf+=(
|
||||||
--host="$FFBUILD_TOOLCHAIN"
|
--host="$FFBUILD_TOOLCHAIN"
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBXXF86VM_COMMIT="7f43cd2a905e7b93b83c9ce81dabb768f6fa2bc7"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +21,12 @@ ffbuild_dockerbuild() {
|
||||||
--with-pic
|
--with-pic
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ $TARGET == linuxarm64 ]]; then
|
||||||
|
myconf+=(
|
||||||
|
--disable-malloc0returnsnull
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
myconf+=(
|
myconf+=(
|
||||||
--host="$FFBUILD_TOOLCHAIN"
|
--host="$FFBUILD_TOOLCHAIN"
|
||||||
|
|
|
@ -5,7 +5,6 @@ GLVND_COMMIT="8e5f0f16467cc8ce870789d9a5b6a2c3f58921c9"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBXCURSOR_COMMIT="27adb16027fa99d83818a0ed9f6623cb03f0c574"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBXRANDR_COMMIT="55dcda4518eda8ae03ef25ea29d3c994ad71eb0a"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +21,12 @@ ffbuild_dockerbuild() {
|
||||||
--with-pic
|
--with-pic
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ $TARGET == linuxarm64 ]]; then
|
||||||
|
myconf+=(
|
||||||
|
--disable-malloc0returnsnull
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
myconf+=(
|
myconf+=(
|
||||||
--host="$FFBUILD_TOOLCHAIN"
|
--host="$FFBUILD_TOOLCHAIN"
|
||||||
|
|
|
@ -5,7 +5,6 @@ LIBXV_COMMIT="03a6f599d060591a9a7cd8558bd2143a1c7c70d7"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET != linux* ]] && return -1
|
[[ $TARGET != linux* ]] && return -1
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
[[ $ADDINS_STR == *4.4* ]] && return -1
|
[[ $ADDINS_STR == *4.4* ]] && return -1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -24,6 +23,12 @@ ffbuild_dockerbuild() {
|
||||||
--without-lint
|
--without-lint
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ $TARGET == linuxarm64 ]]; then
|
||||||
|
myconf+=(
|
||||||
|
--disable-malloc0returnsnull
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
myconf+=(
|
myconf+=(
|
||||||
--host="$FFBUILD_TOOLCHAIN"
|
--host="$FFBUILD_TOOLCHAIN"
|
||||||
|
|
|
@ -25,11 +25,7 @@ ffbuild_dockerbuild() {
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For some reason, RUSTFLAGS, CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER,
|
export CC="${FFBUILD_CROSS_PREFIX}gcc"
|
||||||
# and .cargo/config.toml can't work, so have to put a symbolic link
|
|
||||||
if [[ $TARGET == linuxarm64 ]]; then
|
|
||||||
ln -s /opt/ct-ng/bin/aarch64-ffbuild-linux-gnu-gcc /opt/ct-ng/bin/aarch64-linux-gnu-gcc
|
|
||||||
fi
|
|
||||||
|
|
||||||
cargo cinstall "${myconf[@]}"
|
cargo cinstall "${myconf[@]}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ SDL_REPO="https://github.com/libsdl-org/SDL.git"
|
||||||
SDL_COMMIT="0a93ac129475ab3ce11af95969f767d60e98233a"
|
SDL_COMMIT="0a93ac129475ab3ce11af95969f767d60e98233a"
|
||||||
|
|
||||||
ffbuild_enabled() {
|
ffbuild_enabled() {
|
||||||
[[ $TARGET == linuxarm64 ]] && return -1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,18 @@ ffbuild_dockerbuild() {
|
||||||
|
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
|
|
||||||
local disable_sse2=""
|
local mycmake=(
|
||||||
|
-DBUILD_SHARED_LIBS=OFF
|
||||||
|
-DUSE_OMP=ON
|
||||||
|
)
|
||||||
|
|
||||||
if [[ $TARGET == *arm64 ]]; then
|
if [[ $TARGET == *arm64 ]]; then
|
||||||
disable_sse2=-DSSE2_FOUND=FALSE
|
mycmake+=(
|
||||||
|
-DSSE2_FOUND=FALSE
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_SHARED_LIBS=OFF -DUSE_OMP=ON $disable_sse2 ..
|
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" "${mycmake[@]}" ..
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue