From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] Makefile: Honour LDFLAGS for binary targets Date: Tue, 06 Sep 2022 18:03:21 +0200 Message-ID: <20220906160321.2024001-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7328885096662223812==" --===============7328885096662223812== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 --- 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=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 2.35.1 --===============7328885096662223812==--