All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Iooss <nicolas.iooss@m4x.org>
To: selinux@tycho.nsa.gov
Subject: [PATCH 3/4] checkpolicy: remove -lfl from LDLIBS
Date: Mon, 28 Nov 2016 22:40:17 +0100	[thread overview]
Message-ID: <20161128214018.7861-3-nicolas.iooss@m4x.org> (raw)
In-Reply-To: <20161128214018.7861-1-nicolas.iooss@m4x.org>

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.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 checkpolicy/Makefile      | 2 +-
 checkpolicy/test/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/checkpolicy/Makefile b/checkpolicy/Makefile
index 53a307453282..875cf008cae0 100644
--- a/checkpolicy/Makefile
+++ b/checkpolicy/Makefile
@@ -20,7 +20,7 @@ CHECKOBJS = y.tab.o lex.yy.o queue.o module_compiler.o parse_util.o \
 CHECKPOLOBJS = $(CHECKOBJS) checkpolicy.o
 CHECKMODOBJS = $(CHECKOBJS) checkmodule.o
 
-LDLIBS=$(LIBDIR)/libsepol.a -lfl
+LDLIBS=$(LIBDIR)/libsepol.a
 
 GENERATED=lex.yy.c y.tab.c y.tab.h
 
diff --git a/checkpolicy/test/Makefile b/checkpolicy/test/Makefile
index c2367e191fe3..e7bd717a7c9a 100644
--- a/checkpolicy/test/Makefile
+++ b/checkpolicy/test/Makefile
@@ -9,7 +9,7 @@ INCLUDEDIR ?= $(PREFIX)/include
 CFLAGS ?= -g -Wall -W -Werror -O2 -pipe
 override CFLAGS += -I$(INCLUDEDIR)
 
-LDLIBS=-lfl $(LIBDIR)/libsepol.a -L$(LIBDIR)
+LDLIBS=$(LIBDIR)/libsepol.a -L$(LIBDIR)
 
 all: dispol dismod
 
-- 
2.10.2

  parent reply	other threads:[~2016-11-28 21:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28 21:40 [PATCH 1/4] mcstrans/utils: make "make all" use $DESTDIR Nicolas Iooss
2016-11-28 21:40 ` [PATCH 2/4] libsepol/tests: use LDFLAGS when linking Nicolas Iooss
2016-11-28 21:40 ` Nicolas Iooss [this message]
2016-11-28 21:40 ` [PATCH 4/4] libsepol,libsemanage: write file name in flex output Nicolas Iooss
2016-11-29 13:59   ` Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161128214018.7861-3-nicolas.iooss@m4x.org \
    --to=nicolas.iooss@m4x.org \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.