1 From 67eb23d2be8aba3c474dac81a15b0fa11e5847b7 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Mon, 25 Nov 2013 22:51:53 +0100
4 Subject: [PATCH] Makefile.flags: strip non -l arguments returned by pkg-config
6 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8 Makefile.flags | 4 +++-
9 1 file changed, 3 insertions(+), 1 deletion(-)
11 diff --git a/Makefile.flags b/Makefile.flags
12 index 307afa7..885e323 100644
15 @@ -141,7 +141,9 @@ ifeq ($(CONFIG_SELINUX),y)
16 SELINUX_PC_MODULES = libselinux libsepol
17 $(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES)))
18 CPPFLAGS += $(SELINUX_CFLAGS)
19 -LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%))
20 +LDLIBS += $(if $(SELINUX_LIBS),\
21 + $(patsubst -l%,%,$(filter -l%,$(SELINUX_LIBS))),\
22 + $(SELINUX_PC_MODULES:lib%=%))
25 ifeq ($(CONFIG_EFENCE),y)