Skip to content

Commit

Permalink
Makefile: Only include cc_platform.mk when not using runc_nodmz
Browse files Browse the repository at this point in the history
One of the reasons to have a build tag to disable runc-dmz is to get rid
of possible compile issues introduced by it (it needs to cross-compile a
C program).

We were not being strict enough to include this file only when needed.
This patch includes it only when not using runc_nodmz.

While we want to fix the compilation issues of runc-dmz in another
commit, let's make when using runc_nodmz we don't include more than
needed to compile.

Signed-off-by: Rodrigo Campos <[email protected]>
  • Loading branch information
rata committed Jul 12, 2024
1 parent 3778ae6 commit 54df9a3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ SHELL = /bin/bash
CONTAINER_ENGINE := docker
GO ?= go

# Get CC values for cross-compilation.
include cc_platform.mk

PREFIX ?= /usr/local
BINDIR := $(PREFIX)/sbin
MANDIR := $(PREFIX)/share/man
Expand All @@ -17,6 +14,12 @@ PROJECT := github.com/opencontainers/runc
BUILDTAGS ?= seccomp urfave_cli_no_docs
BUILDTAGS += $(EXTRA_BUILDTAGS)

# Only include the CC values for cross-compilation when the runc_nodmz build tag is not set.
# We want to leave everything as untouched as possible when it is not set.
ifneq (runc_nodmz,$(filter runc_nodmz, $(BUILDTAGS)))
include cc_platform.mk
endif

COMMIT ?= $(shell git describe --dirty --long --always)
VERSION ?= $(shell cat ./VERSION)
LDFLAGS_COMMON := -X main.gitCommit=$(COMMIT) -X main.version=$(VERSION)
Expand Down

0 comments on commit 54df9a3

Please sign in to comment.