summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Lu <Chong.Lu@windriver.com>2014-04-03 14:05:51 -0400
committerJoe MacDonald <joe@deserted.net>2014-04-03 14:46:10 -0400
commit24b65f1bd7f9fd834066553f65c7264598d0abd2 (patch)
tree1956e7d57a11d8da532e71e93534bfaf20c06c09
parenta5c4a0951a2137eacb99d33d67dda84d86fd6ae6 (diff)
downloadmeta-selinux-24b65f1bd7f9fd834066553f65c7264598d0abd2.tar.gz
checkpolicy: Don't link against libfl
In policy_scan.l file, we have already removed all references to yywrap by adding "%option noyywrap" statements to each flex source file that doesn't override yywrap. After this, we no longer need to link against libfl and so no longer get errors about undefined references to yylex. Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r--recipes-security/selinux/checkpolicy.inc2
-rw-r--r--recipes-security/selinux/checkpolicy/checkpolicy-Do-not-link-against-libfl.patch44
2 files changed, 46 insertions, 0 deletions
diff --git a/recipes-security/selinux/checkpolicy.inc b/recipes-security/selinux/checkpolicy.inc
index 096f938..54edc11 100644
--- a/recipes-security/selinux/checkpolicy.inc
+++ b/recipes-security/selinux/checkpolicy.inc
@@ -13,6 +13,8 @@ LICENSE = "GPLv2+"
13 13
14DEPENDS += "libsepol libselinux bison-native flex-native" 14DEPENDS += "libsepol libselinux bison-native flex-native"
15 15
16SRC_URI += "file://checkpolicy-Do-not-link-against-libfl.patch"
17
16EXTRA_OEMAKE += "PREFIX=${D}" 18EXTRA_OEMAKE += "PREFIX=${D}"
17EXTRA_OEMAKE += "LEX='flex'" 19EXTRA_OEMAKE += "LEX='flex'"
18 20
diff --git a/recipes-security/selinux/checkpolicy/checkpolicy-Do-not-link-against-libfl.patch b/recipes-security/selinux/checkpolicy/checkpolicy-Do-not-link-against-libfl.patch
new file mode 100644
index 0000000..6fcf459
--- /dev/null
+++ b/recipes-security/selinux/checkpolicy/checkpolicy-Do-not-link-against-libfl.patch
@@ -0,0 +1,44 @@
1checkpolicy: Don't link against libfl
2
3In policy_scan.l file, we have already removed all references to yywrap by
4adding "%option noyywrap" statements to each flex source file that doesn't
5override yywrap. After this, we no longer need to link against libfl and so
6no longer get errors about undefined references to yylex.
7
8Upstream-status: Pending
9
10Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
11---
12 Makefile | 2 +-
13 test/Makefile | 2 +-
14 2 files changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/Makefile b/Makefile
17index e5fae3d..14ac70e 100644
18--- a/Makefile
19+++ b/Makefile
20@@ -19,7 +19,7 @@ CHECKOBJS = y.tab.o lex.yy.o queue.o module_compiler.o parse_util.o \
21 CHECKPOLOBJS = $(CHECKOBJS) checkpolicy.o
22 CHECKMODOBJS = $(CHECKOBJS) checkmodule.o
23
24-LDLIBS=$(LIBDIR)/libsepol.a -lfl
25+LDLIBS=$(LIBDIR)/libsepol.a
26
27 GENERATED=lex.yy.c y.tab.c y.tab.h
28
29diff --git a/test/Makefile b/test/Makefile
30index 63b4d24..0f19a8a 100644
31--- a/test/Makefile
32+++ b/test/Makefile
33@@ -9,7 +9,7 @@ INCLUDEDIR ?= $(PREFIX)/include
34 CFLAGS ?= -g -Wall -W -Werror -O2 -pipe
35 override CFLAGS += -I$(INCLUDEDIR)
36
37-LDLIBS=-lfl -lselinux $(LIBDIR)/libsepol.a -L$(LIBDIR)
38+LDLIBS=-lselinux $(LIBDIR)/libsepol.a -L$(LIBDIR)
39
40 all: dispol dismod
41
42--
431.7.9.5
44