|
Message-Id: <54ae0e1f8928160c1c4120263ea21c8133aa3ec4.1641398395.git.fweimer@redhat.com> Date: Wed, 05 Jan 2022 17:03:15 +0100 From: Florian Weimer <fweimer@...hat.com> To: "Andy Lutomirski" <luto@...nel.org> Cc: linux-arch@...r.kernel.org, "Linux API" <linux-api@...r.kernel.org>, linux-x86_64@...r.kernel.org, kernel-hardening@...ts.openwall.com, linux-mm@...ck.org, "the arch/x86 maintainers" <x86@...nel.org>, musl@...ts.openwall.com, <libc-alpha@...rceware.org>, <linux-kernel@...r.kernel.org>, "Dave Hansen" <dave.hansen@...el.com>, "Kees Cook" <keescook@...omium.org>, Andrei Vagin <avagin@...il.com> Subject: [PATCH v3 2/3] selftests/x86/Makefile: Support per-target $(LIBS) configuration And avoid compiling PCHs by accident. Signed-off-by: Florian Weimer <fweimer@...hat.com> --- v3: Patch split out. tools/testing/selftests/x86/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile index 8a1f62ab3c8e..0993d12f2c38 100644 --- a/tools/testing/selftests/x86/Makefile +++ b/tools/testing/selftests/x86/Makefile @@ -72,10 +72,12 @@ all_64: $(BINARIES_64) EXTRA_CLEAN := $(BINARIES_32) $(BINARIES_64) $(BINARIES_32): $(OUTPUT)/%_32: %.c helpers.h - $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl -lm + $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $(filter-out %.h, $^) \ + $(or $(LIBS), -lrt -ldl -lm) $(BINARIES_64): $(OUTPUT)/%_64: %.c helpers.h - $(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl + $(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $(filter-out %.h, $^) \ + $(or $(LIBS), -lrt -ldl -lm) # x86_64 users should be encouraged to install 32-bit libraries ifeq ($(CAN_BUILD_I386)$(CAN_BUILD_X86_64),01) -- 2.33.1
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.