checkpolicy: add patch to fix flex related build failure
authorAdam Duskett <Adamduskett@outlook.com>
Tue, 23 May 2017 13:50:39 +0000 (15:50 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 23 May 2017 13:50:39 +0000 (15:50 +0200)
commitb869760f11f148a06027e63c0d0bbccb55a217f3
treec94aa47fda11950645ad942f4b32dab9a75879a0
parent41ee484bafe402cfadcf1d480b7c8b44bf206af1
checkpolicy: add patch to fix flex related build failure

When building checkpolicy/test, the linker reports the following error:

    cc   dispol.o  -lfl /usr/src/selinux/DESTDIR/usr/lib/libsepol.a -L/usr/src/selinux/DESTDIR/usr/lib -o dispol
    /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../lib/libfl.so: undefined reference to `yylex'
    collect2: error: ld returned 1 exit status

According to flex documentation
(https://github.com/westes/flex/blob/master/doc/flex.texi), -lfl is used
to provide an implementation for yywrap(). However every flex file now
uses "%option noyywrap", which makes -lfl no longer mandatory. Remove
this option from checkpolicy Makefiles.

Patch taken from https://patchwork.kernel.org/patch/9450549/

Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/checkpolicy/0001-checkpolicy-remove-lfl-from-LDLIBS.patch [new file with mode: 0644]