Skip to content

Commit

Permalink
Add gcc to clang containers
Browse files Browse the repository at this point in the history
Easy cross-compiling of the Linux kernel requires both toolchains
  • Loading branch information
a13xp0p0v committed Sep 4, 2021
1 parent 1b8695f commit 748e1e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build_containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,19 @@ build_gcc_container ${GCC_VERSION} ${UBUNTU_VERSION}

build_clang_container ()
{
echo -e "\nBuilding a container with CLANG_VERSION=$1 from UBUNTU_VERSION=$2"
echo -e "\nBuilding a container with CLANG_VERSION=$1 and GCC_VERSION=$2 from UBUNTU_VERSION=$3"
$SUDO_CMD docker build \
--build-arg CLANG_VERSION=$1 \
--build-arg UBUNTU_VERSION=$2 \
--build-arg GCC_VERSION=$2 \
--build-arg UBUNTU_VERSION=$3 \
--build-arg UNAME=$(id -nu) \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
-t kernel-build-container:clang-${CLANG_VERSION} .
}

CLANG_VERSION="12"
GCC_VERSION="10"
UBUNTU_VERSION="21.04"
build_clang_container ${CLANG_VERSION} ${UBUNTU_VERSION}
build_clang_container ${CLANG_VERSION} ${GCC_VERSION} ${UBUNTU_VERSION}

0 comments on commit 748e1e7

Please sign in to comment.