Commit b2048179 authored by Tuukka Pasanen's avatar Tuukka Pasanen Committed by Andrew Hutchings

MDEV-34261: Detect if build is running under 32-bit container

When building on 64-bit kernel machine in 32-bit docker container
CMake falsely (but it works as expected) detects that container
runtime in also 64-bits. Use linux32 command to change runtime
enviroment to 32-bit and then CMake will correctly disable for
example ColumnStore and not try to build it

This commit only works with debian/autobake-debs.sh
parent 58a0e1e3
......@@ -62,6 +62,7 @@ replace_uring_with_aio()
}
architecture=$(dpkg-architecture -q DEB_BUILD_ARCH)
uname_machine=$(uname -m)
# Parse release name and number from Linux standard base release
# Example:
......@@ -161,6 +162,14 @@ then
BUILDPACKAGE_DPKGCMD+=("eatmydata")
fi
# If running autobake-debs.sh inside docker/podman host machine which
# has 64 bits cpu but container image is 32 bit make sure that we set
# correct arch with linux32 for 32 bit enviroment
if [ "$architecture" = "i386" ] && [ "$uname_machine" = "x86_64" ]
then
BUILDPACKAGE_DPKGCMD+=("linux32")
fi
BUILDPACKAGE_DPKGCMD+=("dpkg-buildpackage")
# Using dpkg-buildpackage args
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment