From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top
Subject: Re: [PATCH] Makefile: Honour LDFLAGS for binary targets
Date: Wed, 07 Sep 2022 10:39:23 +1000 [thread overview]
Message-ID: <YxfoO3igK/gMCP/n@yekko> (raw)
In-Reply-To: <20220906160321.2024001-1-sbrivio@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]
On Tue, Sep 06, 2022 at 06:03:21PM +0200, Stefano Brivio wrote:
> We don't set any, but we should use them if they are passed in the
> environment. On a Fedora Rawhide package build, annocheck
> (https://sourceware.org/annobin/) reports:
>
> Hardened: /usr/bin/passt: FAIL: bind-now test because not linked with -Wl,-z,now
>
> ...despite the build system exporting -Wl,-z,now in LDFLAGS.
>
> Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
Reviewed-by: David Gibson <david(a)gibson.dropbear.id.au>
> ---
> Makefile | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 26e64d5..644a541 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -105,11 +105,11 @@ seccomp.h: $(PASST_SRCS) $(PASST_HEADERS)
> @ EXTRA_SYSCALLS=$(EXTRA_SYSCALLS) ./seccomp.sh $^
>
> passt: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h
> - $(CC) $(CFLAGS) $(PASST_SRCS) -o passt
> + $(CC) $(CFLAGS) $(PASST_SRCS) -o passt $(LDFLAGS)
>
> passt.avx2: CFLAGS += -Ofast -mavx2 -ftree-vectorize -funroll-loops
> passt.avx2: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h
> - $(CC) $(filter-out -O2,$(CFLAGS)) $(PASST_SRCS) -o passt.avx2
> + $(CC) $(filter-out -O2,$(CFLAGS)) $(PASST_SRCS) -o passt.avx2 $(LDFLAGS)
>
> passt.avx2: passt
>
> @@ -117,7 +117,7 @@ pasta.avx2 pasta.1 pasta: pasta%: passt%
> ln -s $< $@
>
> qrap: $(QRAP_SRCS) passt.h
> - $(CC) $(CFLAGS) $(QRAP_SRCS) -o qrap
> + $(CC) $(CFLAGS) $(QRAP_SRCS) -o qrap $(LDFLAGS)
>
> valgrind: EXTRA_SYSCALLS="rt_sigprocmask rt_sigtimedwait rt_sigaction \
> getpid gettid kill clock_gettime mmap munmap open \
--
David Gibson | 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:[~2022-09-07 0:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 16:03 [PATCH] Makefile: Honour LDFLAGS for binary targets Stefano Brivio
2022-09-07 0:39 ` 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=YxfoO3igK/gMCP/n@yekko \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
/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).