diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-09-06 17:44:57 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-09-07 11:01:10 +0200 |
commit | b2ee37ad38fe6629b4648e18ca4dd338ac9c017d (patch) | |
tree | 2bf0882a4017f3e697f98cf86b9d0fdaad2023a2 | |
parent | c8807478834a27315a6c3af68acf1016f81d79c5 (diff) | |
download | passt-b2ee37ad38fe6629b4648e18ca4dd338ac9c017d.tar passt-b2ee37ad38fe6629b4648e18ca4dd338ac9c017d.tar.gz passt-b2ee37ad38fe6629b4648e18ca4dd338ac9c017d.tar.bz2 passt-b2ee37ad38fe6629b4648e18ca4dd338ac9c017d.tar.lz passt-b2ee37ad38fe6629b4648e18ca4dd338ac9c017d.tar.xz passt-b2ee37ad38fe6629b4648e18ca4dd338ac9c017d.tar.zst passt-b2ee37ad38fe6629b4648e18ca4dd338ac9c017d.zip |
Makefile: Honour LDFLAGS for binary targets
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@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 \ |