diff options
author | Chong Lu <Chong.Lu@windriver.com> | 2014-04-03 14:05:51 -0400 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2014-04-03 14:46:10 -0400 |
commit | 24b65f1bd7f9fd834066553f65c7264598d0abd2 (patch) | |
tree | 1956e7d57a11d8da532e71e93534bfaf20c06c09 | |
parent | a5c4a0951a2137eacb99d33d67dda84d86fd6ae6 (diff) | |
download | meta-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.inc | 2 | ||||
-rw-r--r-- | recipes-security/selinux/checkpolicy/checkpolicy-Do-not-link-against-libfl.patch | 44 |
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 | ||
14 | DEPENDS += "libsepol libselinux bison-native flex-native" | 14 | DEPENDS += "libsepol libselinux bison-native flex-native" |
15 | 15 | ||
16 | SRC_URI += "file://checkpolicy-Do-not-link-against-libfl.patch" | ||
17 | |||
16 | EXTRA_OEMAKE += "PREFIX=${D}" | 18 | EXTRA_OEMAKE += "PREFIX=${D}" |
17 | EXTRA_OEMAKE += "LEX='flex'" | 19 | EXTRA_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 @@ | |||
1 | checkpolicy: Don't link against libfl | ||
2 | |||
3 | In policy_scan.l file, we have already removed all references to yywrap by | ||
4 | adding "%option noyywrap" statements to each flex source file that doesn't | ||
5 | override yywrap. After this, we no longer need to link against libfl and so | ||
6 | no longer get errors about undefined references to yylex. | ||
7 | |||
8 | Upstream-status: Pending | ||
9 | |||
10 | Signed-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 | |||
16 | diff --git a/Makefile b/Makefile | ||
17 | index 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 | |||
29 | diff --git a/test/Makefile b/test/Makefile | ||
30 | index 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 | -- | ||
43 | 1.7.9.5 | ||
44 | |||