From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: Re: [PATCH] Makefile: Honour LDFLAGS for binary targets Date: Wed, 07 Sep 2022 10:39:23 +1000 Message-ID: In-Reply-To: <20220906160321.2024001-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0138236857868431436==" --===============0138236857868431436== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: >=20 > Hardened: /usr/bin/passt: FAIL: bind-now test because not linked with -Wl= ,-z,now >=20 > ...despite the build system exporting -Wl,-z,now in LDFLAGS. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > Makefile | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > 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=3D$(EXTRA_SYSCALLS) ./seccomp.sh $^ > =20 > passt: $(PASST_SRCS) $(PASST_HEADERS) seccomp.h > - $(CC) $(CFLAGS) $(PASST_SRCS) -o passt > + $(CC) $(CFLAGS) $(PASST_SRCS) -o passt $(LDFLAGS) > =20 > passt.avx2: CFLAGS +=3D -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) > =20 > passt.avx2: passt > =20 > @@ -117,7 +117,7 @@ pasta.avx2 pasta.1 pasta: pasta%: passt% > ln -s $< $@ > =20 > qrap: $(QRAP_SRCS) passt.h > - $(CC) $(CFLAGS) $(QRAP_SRCS) -o qrap > + $(CC) $(CFLAGS) $(QRAP_SRCS) -o qrap $(LDFLAGS) > =20 > valgrind: EXTRA_SYSCALLS=3D"rt_sigprocmask rt_sigtimedwait rt_sigaction \ > getpid gettid kill clock_gettime mmap munmap open \ --=20 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 --===============0138236857868431436== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUVCQ0FBZEZpRUVvVUx4V3U0L1dz MGRCK1h0Z3lwWTRnRXdZU0lGQW1NWDZDUUFDZ2tRZ3lwWTRnRXcKWVNKK2hBLy9mYWxzUXNpVFZB R1ZMWUc1ZkFzbHpua1FnV3FJclhudmc3Z3ovWW10V3BOMW5mMFFveUtqSys5WApmenhNRnBrQllE OU80aWt3QnJFQXNZNlZKMTJRajRTTS84UHJGYWtBTW1XRnBkaExVOTBlUkxXSnFjRHRzdHJFClRJ SVVVVWp5aVpaM3BLZ2d4M0Npa0Q0cE1EekdtWmVjTEVTQ0sxWlcyd3dxNGFrNzM0aUl4UUE0bUQv M1p2NUoKZmZTaUx0NzNzRjhhdDB1U0I0cmFzQXdWMnBMOGxsU21VVThtNUFpSkpPTENia3VIZyto Z01KVVVvSCsxNUNxSAo3MktwUGZUQUFORkNEbmdobmF0NGluV0VPemtzV1BGdTNhUFlDeStLVTJr RXIwTlVPN2VwYUVGUWVzY0VZN0c1CnQ3S1RKVzRIMkROR1pvTGJWdU83Q0g0MTlkSFlnUHBjL29w OU5XVkpaSmFJQ0txZUM3RE5JNXdwVlhSM3YzTkgKc013SVIrenROYzJ4SExDTnRWb1NIWXFtR0dC dmZJaUhsL0Jia0xjSlZ3QUZ4UzFMciszY1Z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