From defb64334694cfb0649b7c121592e2553d482976 Mon Sep 17 00:00:00 2001 From: Amulyam24 Date: Thu, 27 Apr 2023 14:56:11 +0530 Subject: [PATCH] runtime: remove overriding ARCH value by default for ppc64le Currently, ARCH value is being set to powerpc64le by default. powerpc64le is only right in context of rust and any operation which might use this variable for a different purpose would fail on ppc64le. Fixes: #6741 Signed-off-by: Amulyam24 --- src/agent/Makefile | 8 ++++++-- src/runtime-rs/Makefile | 4 ++++ src/tools/agent-ctl/Makefile | 4 ++++ src/tools/runk/Makefile | 4 ++++ src/tools/trace-forwarder/Makefile | 4 ++++ utils.mk | 1 - 6 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/agent/Makefile b/src/agent/Makefile index 51da58d3a7..69423eddae 100644 --- a/src/agent/Makefile +++ b/src/agent/Makefile @@ -33,6 +33,12 @@ ifeq ($(SECCOMP),yes) override EXTRA_RUSTFEATURES += seccomp endif +include ../../utils.mk + +ifeq ($(ARCH), ppc64le) + override ARCH = powerpc64le +endif + ##VAR STANDARD_OCI_RUNTIME=yes|no define if agent enables standard oci runtime feature STANDARD_OCI_RUNTIME := no @@ -45,8 +51,6 @@ ifneq ($(EXTRA_RUSTFEATURES),) override EXTRA_RUSTFEATURES := --features "$(EXTRA_RUSTFEATURES)" endif -include ../../utils.mk - TARGET_PATH = target/$(TRIPLE)/$(BUILD_TYPE)/$(TARGET) ##VAR DESTDIR= is a directory prepended to each installed target file diff --git a/src/runtime-rs/Makefile b/src/runtime-rs/Makefile index 599949bb07..afe974bf96 100644 --- a/src/runtime-rs/Makefile +++ b/src/runtime-rs/Makefile @@ -17,6 +17,10 @@ CONTAINERD_RUNTIME_NAME = io.containerd.kata.v2 include ../../utils.mk +ifeq ($(ARCH), ppc64le) + override ARCH = powerpc64le +endif + ARCH_DIR = arch ARCH_FILE_SUFFIX = -options.mk ARCH_FILE = $(ARCH_DIR)/$(ARCH)$(ARCH_FILE_SUFFIX) diff --git a/src/tools/agent-ctl/Makefile b/src/tools/agent-ctl/Makefile index 980e47ccb4..fe56fa0982 100644 --- a/src/tools/agent-ctl/Makefile +++ b/src/tools/agent-ctl/Makefile @@ -5,6 +5,10 @@ include ../../../utils.mk +ifeq ($(ARCH), ppc64le) + override ARCH = powerpc64le + endif + .DEFAULT_GOAL := default default: build diff --git a/src/tools/runk/Makefile b/src/tools/runk/Makefile index d025b6a893..cd9a24a8b1 100644 --- a/src/tools/runk/Makefile +++ b/src/tools/runk/Makefile @@ -8,6 +8,10 @@ LIBC ?= gnu include ../../../utils.mk +ifeq ($(ARCH), ppc64le) + override ARCH = powerpc64le + endif + TARGET = runk TARGET_PATH = target/$(TRIPLE)/$(BUILD_TYPE)/$(TARGET) AGENT_SOURCE_PATH = ../../agent diff --git a/src/tools/trace-forwarder/Makefile b/src/tools/trace-forwarder/Makefile index 5a529e2117..3bdd5d53a5 100644 --- a/src/tools/trace-forwarder/Makefile +++ b/src/tools/trace-forwarder/Makefile @@ -5,6 +5,10 @@ include ../../../utils.mk +ifeq ($(ARCH), ppc64le) + override ARCH = powerpc64le + endif + .DEFAULT_GOAL := default default: build diff --git a/utils.mk b/utils.mk index 27768809c8..f382990dc2 100644 --- a/utils.mk +++ b/utils.mk @@ -146,7 +146,6 @@ ifneq ($(LIBC),musl) endif ifeq ($(ARCH), ppc64le) - override ARCH = powerpc64le override LIBC = gnu $(warning "WARNING: powerpc64le-unknown-linux-musl target is unavailable") endif