aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2025-02-14 20:53:47 -0500
committerFlorin Coras <florin.coras@gmail.com>2025-02-18 22:56:47 +0000
commitaa4dfccc98dce64393f390201ea49152d2cb9d87 (patch)
tree4169bac0a02456abc5ac75b4dc2dce03e69d2601 /Makefile
parent8b76a623446129596c7c44c5c65651bfbefb6c2d (diff)
build: make clang the default compiler for build targets
- fixes compiler version for hs-test and other CI jobs which default to CC=cc in make - not all build targets compile successfully with clang (e.g. libmemif, xdp-tools) which are hard-coded to use gcc for now Type: fix Change-Id: I505e67a08687f17fd4e26e1a3c236fb7c54ff49d Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 10 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 5cfc0ccfea9..c3a114bd95e 100644
--- a/Makefile
+++ b/Makefile
@@ -90,7 +90,7 @@ endif
DEB_DEPENDS = curl build-essential autoconf automake ccache
DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-python
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
-DEB_DEPENDS += gcovr lcov chrpath autoconf libnuma-dev
+DEB_DEPENDS += clang gcovr lcov chrpath autoconf libnuma-dev
DEB_DEPENDS += python3-all python3-setuptools check
DEB_DEPENDS += libffi-dev python3-ply libunwind-dev
DEB_DEPENDS += cmake ninja-build python3-jsonschema python3-yaml
@@ -560,12 +560,12 @@ test-cov:
.PHONY: test-cov-hs
test-cov-hs: build-gcov
- @$(MAKE) -C extras/hs-test test-cov \
+ @$(MAKE) CC=$(CC) -C extras/hs-test test-cov \
VPP_BUILD_DIR=$(BR)/build-vpp_gcov-native/vpp
.PHONY: test-cov-post-standalone
test-cov-post-standalone:
- $(MAKE) -C test cov-post VPP_BUILD_DIR=$(BR)/build-vpp_gcov-native/vpp
+ $(MAKE) CC=$(CC) -C test cov-post VPP_BUILD_DIR=$(BR)/build-vpp_gcov-native/vpp
.PHONY: test-cov-both
test-cov-both:
@@ -795,14 +795,14 @@ pkg-srpm: dist
.PHONY: install-ext-deps
install-ext-deps:
- $(MAKE) -C build/external install-$(PKG)
+ $(MAKE) CC=$(CC) -C build/external install-$(PKG)
.PHONY: install-ext-dep
install-ext-dep: install-ext-deps
.PHONY: install-opt-deps
install-opt-deps:
- $(MAKE) -C build/optional install-$(PKG)
+ $(MAKE) CC=$(CC) -C build/optional install-$(PKG)
.PHONY: json-api-files
json-api-files:
@@ -928,13 +928,13 @@ docs:
.PHONY: pkg-verify
pkg-verify: install-dep $(BR)/.deps.ok install-ext-deps
$(call banner,"Building for PLATFORM=vpp")
- @$(MAKE) -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
+ @$(MAKE) CC=$(CC) -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
$(call banner,"Building sample-plugin")
- @$(MAKE) -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
+ @$(MAKE) CC=$(CC) -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
$(call banner,"Building libmemif")
- @$(MAKE) -C build-root PLATFORM=vpp TAG=vpp libmemif-install
+ @$(MAKE) CC=gcc -C build-root PLATFORM=vpp TAG=vpp libmemif-install
$(call banner,"Building $(PKG) packages")
- @$(MAKE) pkg-$(PKG)
+ @$(MAKE) CC=$(CC) pkg-$(PKG)
# Note: 'make verify' target is not used by ci-management scripts
MAKE_VERIFY_GATE_OS ?= ubuntu-22.04
@@ -944,7 +944,7 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),$(MAKE_VERIFY_GATE_OS))
$(call banner,"Testing vppapigen")
@src/tools/vppapigen/test_vppapigen.py
$(call banner,"Running tests")
- @$(MAKE) COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test
+ @$(MAKE) CC=$(CC) COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test
else
$(call banner,"Skipping tests. Tests under 'make verify' supported on $(MAKE_VERIFY_GATE_OS)")
endif