diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2024-12-19 17:27:44 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2025-01-05 23:48:37 +0100 |
commit | 2385b69a66807e32dca5ae17ab64686888e4c682 (patch) | |
tree | 0a1e48696e9275dee51c796aca2d4134b9b2f21f | |
parent | e5ba8adef71ec53e192373ed1267dc338719dda0 (diff) | |
download | passt-2385b69a66807e32dca5ae17ab64686888e4c682.tar passt-2385b69a66807e32dca5ae17ab64686888e4c682.tar.gz passt-2385b69a66807e32dca5ae17ab64686888e4c682.tar.bz2 passt-2385b69a66807e32dca5ae17ab64686888e4c682.tar.lz passt-2385b69a66807e32dca5ae17ab64686888e4c682.tar.xz passt-2385b69a66807e32dca5ae17ab64686888e4c682.tar.zst passt-2385b69a66807e32dca5ae17ab64686888e4c682.zip |
Makefile: Report error and stop if we can't set TARGET
I don't think it's necessarily productive to check all the possible
error conditions in the Makefile, but this one is annoying: issue
'make' without a C compiler, then install one, and build again.
Then run passt and it will mysteriously terminate on epoll_wait(),
because seccomp.h is good enough to build against, but the resulting
seccomp filter doesn't allow any system call. Not really fun to debug.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -16,6 +16,7 @@ VERSION ?= $(shell git describe --tags HEAD 2>/dev/null || echo "unknown\ versio DUAL_STACK_SOCKETS := 1 TARGET ?= $(shell $(CC) -dumpmachine) +$(if $(TARGET),,$(error Failed to get target architecture)) # Get 'uname -m'-like architecture description for target TARGET_ARCH := $(firstword $(subst -, ,$(TARGET))) TARGET_ARCH := $(patsubst [:upper:],[:lower:],$(TARGET_ARCH)) |