From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH] Makefile: Report error and stop if we can't set TARGET
Date: Fri, 20 Dec 2024 11:21:03 +1100 [thread overview]
Message-ID: <Z2S4b2zGKgKaZS68@zatzit> (raw)
In-Reply-To: <20241219163634.1558544-1-sbrivio@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]
On Thu, Dec 19, 2024 at 05:36:34PM +0100, Stefano Brivio wrote:
> 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>
Haven't hit that, but it does sound really annoying.
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Makefile b/Makefile
> index 1fce737..464eef1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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))
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2024-12-20 1:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 16:36 [PATCH] Makefile: Report error and stop if we can't set TARGET Stefano Brivio
2024-12-20 0:21 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z2S4b2zGKgKaZS68@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).