Some packages do not link successfully using shared libraries.
When link something to libfl.so, we will get this:

        libfl.so: undefined reference to `yylex'

So we only build static libraries to fix this issue.

Signed-off-by: Chong Lu <[email protected]>
---
 .../files/flex-not-to-build-shared-libraries.patch | 39 ++++++++++++++++++++++
 meta/recipes-devtools/flex/flex.inc                |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 
meta/recipes-devtools/flex/files/flex-not-to-build-shared-libraries.patch

diff --git 
a/meta/recipes-devtools/flex/files/flex-not-to-build-shared-libraries.patch 
b/meta/recipes-devtools/flex/files/flex-not-to-build-shared-libraries.patch
new file mode 100644
index 0000000..a50569f
--- /dev/null
+++ b/meta/recipes-devtools/flex/files/flex-not-to-build-shared-libraries.patch
@@ -0,0 +1,39 @@
+flex: not to build shared libraries
+
+Some packages do not link successfully using shared libraries.
+When link something to libfl.so, we will get this:
+
+       libfl.so: undefined reference to `yylex'
+
+So we only build static libraries to fix this issue.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chong Lu <[email protected]>
+---
+ Makefile.am |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 1f90356..f3638aa 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -73,13 +73,13 @@ libfl_la_SOURCES = \
+       libmain.c \
+       libyywrap.c
+ 
+-libfl_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
++libfl_la_LDFLAGS = -all-static -no-undefined -version-info 
@SHARED_VERSION_INFO@
+ 
+ libfl_pic_la_SOURCES = \
+       libmain.c \
+       libyywrap.c
+ 
+-libfl_pic_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
++libfl_pic_la_LDFLAGS = -all-static -no-undefined -version-info 
@SHARED_VERSION_INFO@
+ 
+ noinst_HEADERS = \
+       flexdef.h \
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-devtools/flex/flex.inc 
b/meta/recipes-devtools/flex/flex.inc
index 75c10ef..616f4d7 100644
--- a/meta/recipes-devtools/flex/flex.inc
+++ b/meta/recipes-devtools/flex/flex.inc
@@ -7,6 +7,7 @@ SECTION = "devel"
 LICENSE = "BSD"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
+           file://flex-not-to-build-shared-libraries.patch \
            file://run-ptest \
 "
 
-- 
1.8.1.2

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to