From 150d2fa114d626761a67e529959433226793e733 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 17 Jul 2007 20:39:27 +0000 Subject: Modify method of linking against libs. Now we fisrt try all specified libs, and if it succeeds, we try to remove them one-by-one. If link succeeds, then library is thrown out. Should solve the problem with SELinux linking in libsepol even when not needed. --- Makefile.flags | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Makefile.flags') diff --git a/Makefile.flags b/Makefile.flags index b54679047..d8817bed6 100644 --- a/Makefile.flags +++ b/Makefile.flags @@ -59,18 +59,25 @@ ifeq ($(CONFIG_STATIC),y) LDFLAGS += -static endif +BBOX_LIB_LIST = m crypt ifeq ($(CONFIG_SELINUX),y) -LDLIBS += -lselinux -lsepol +#LDLIBS += -lselinux -lsepol +BBOX_LIB_LIST += selinux sepol endif ifeq ($(CONFIG_EFENCE),y) -LDLIBS += -lefence +#LDLIBS += -lefence +BBOX_LIB_LIST += efence endif ifeq ($(CONFIG_DMALLOC),y) -LDLIBS += -ldmalloc +#LDLIBS += -ldmalloc +BBOX_LIB_LIST += dmalloc endif +# For scripts/trylink +export BBOX_LIB_LIST + #LDFLAGS += -nostdlib LDFLAGS_ELF2FLT = -Wl,-elf2flt -- cgit v1.2.3