From da2d9ab813b46f633b53ec4bb94b434f659eb98a Mon Sep 17 00:00:00 2001 From: Jakob Naucke Date: Mon, 7 Jun 2021 17:32:05 +0200 Subject: [PATCH 1/2] osbuilder: Remove CC=gcc for Fedora s390x since that was required specifically for the Go agent Fixes: #1973 Signed-off-by: Jakob Naucke --- tools/osbuilder/rootfs-builder/rootfs.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 9fbe49bad1..51126f96e3 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -562,10 +562,6 @@ EOT -e '/^\[Unit\]/a ConditionPathExists=\/dev\/ptp0' ${chrony_systemd_service} fi - # The CC on s390x for fedora needs to be manually set to gcc when the golang is downloaded from the main page. - # See issue: https://github.com/kata-containers/osbuilder/issues/217 - [ "$distro" == "fedora" ] && [ "$ARCH" == "s390x" ] && export CC=gcc - AGENT_DIR="${ROOTFS_DIR}/usr/bin" AGENT_DEST="${AGENT_DIR}/${AGENT_BIN}" From 7593ebf9478b6f257a39da07d973ce647809a84f Mon Sep 17 00:00:00 2001 From: Jakob Naucke Date: Mon, 7 Jun 2021 17:32:18 +0200 Subject: [PATCH 2/2] runtime: Use CC=gcc on Fedora s390x This was fixed for the Go agent back in https://github.com/kata-containers/osbuilder/issues/217, but is also required for the runtime. Fixes: #1973 Signed-off-by: Jakob Naucke --- src/runtime/arch/s390x-options.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/runtime/arch/s390x-options.mk b/src/runtime/arch/s390x-options.mk index f54c064572..9a1b377415 100644 --- a/src/runtime/arch/s390x-options.mk +++ b/src/runtime/arch/s390x-options.mk @@ -11,3 +11,10 @@ MACHINEACCELERATORS := CPUFEATURES := QEMUCMD := qemu-system-s390x + +# See https://github.com/kata-containers/osbuilder/issues/217 +FEDORA_LIKE = $(shell grep -E "\" /etc/os-release 2> /dev/null) +ifneq (,$(FEDORA_LIKE)) + CC := gcc + export CC +endif