diff options
author | Jens Rehsack <sno@netbsd.org> | 2018-11-18 19:36:46 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-20 10:32:16 +0000 |
commit | 1d8a8e36b99827e01aaa834f39be6db17a05a4bf (patch) | |
tree | 571a99953ad4e82ca955fbac0cd30e627f9ac2b1 /meta | |
parent | e234be1befd8dc205fff093a46de9177018b209e (diff) | |
download | poky-1d8a8e36b99827e01aaa834f39be6db17a05a4bf.tar.gz |
pseudo: fix link of sqlite3 using pkg-config
If sqlite3 is built with FTS5 it uses log() from libm, it sqlite3 is built
with READLINE it uses tgetent from a curses lib and readline from libreadline,
if it is built using deflate from libz ... , but all that linkage is lost
if we manually statically link so explicitely extract extra static linking
options from pkg-config and force them into pseudo as well.
This commit obsoletes (so include the implicit revert)
e39fec613d pseudo: fix link with new sqlite3
(From OE-Core rev: 042af406583acc091ef82c3d1dcedd41315046de)
Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/pseudo/files/libm.patch | 33 | ||||
-rw-r--r-- | meta/recipes-devtools/pseudo/pseudo.inc | 19 | ||||
-rw-r--r-- | meta/recipes-devtools/pseudo/pseudo_git.bb | 1 |
3 files changed, 16 insertions, 37 deletions
diff --git a/meta/recipes-devtools/pseudo/files/libm.patch b/meta/recipes-devtools/pseudo/files/libm.patch deleted file mode 100644 index 1a82979313..0000000000 --- a/meta/recipes-devtools/pseudo/files/libm.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | If sqlite3 is built with FTS5 enabled then it links to libm.so for log(), but if | ||
2 | we statically link to libsqlite3.a then this linkage is lost. | ||
3 | |||
4 | Work around this by always linking to libm.so. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
8 | |||
9 | From 4633a8750f0966621d258548fba82bc6aa5aa997 Mon Sep 17 00:00:00 2001 | ||
10 | From: Ross Burton <ross.burton@intel.com> | ||
11 | Date: Tue, 6 Nov 2018 12:13:17 +0000 | ||
12 | Subject: [PATCH] Makefile: sqlite can need libm | ||
13 | |||
14 | --- | ||
15 | Makefile.in | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/Makefile.in b/Makefile.in | ||
19 | index ad6541b..28b5ecb 100644 | ||
20 | --- a/Makefile.in | ||
21 | +++ b/Makefile.in | ||
22 | @@ -73,7 +73,7 @@ WRAPOBJS=pseudo_wrappers.o | ||
23 | |||
24 | # needed for anything that links with pseduo_client.o, pretty much | ||
25 | CLIENT_LDFLAGS=-ldl -lpthread | ||
26 | -DB_LDFLAGS=@SQLITE_LDARG@ -lpthread | ||
27 | +DB_LDFLAGS=@SQLITE_LDARG@ -lpthread -lm | ||
28 | |||
29 | PSEUDO=$(BIN)/pseudo | ||
30 | PSEUDODB=$(BIN)/pseudodb | ||
31 | -- | ||
32 | 2.11.0 | ||
33 | |||
diff --git a/meta/recipes-devtools/pseudo/pseudo.inc b/meta/recipes-devtools/pseudo/pseudo.inc index cdc2a5823f..8b05735bb1 100644 --- a/meta/recipes-devtools/pseudo/pseudo.inc +++ b/meta/recipes-devtools/pseudo/pseudo.inc | |||
@@ -17,7 +17,7 @@ PROVIDES += "virtual/fakeroot" | |||
17 | 17 | ||
18 | MAKEOPTS = "" | 18 | MAKEOPTS = "" |
19 | 19 | ||
20 | inherit siteinfo | 20 | inherit siteinfo pkgconfig |
21 | 21 | ||
22 | do_configure () { | 22 | do_configure () { |
23 | : | 23 | : |
@@ -30,10 +30,23 @@ PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback --enable-ep | |||
30 | 30 | ||
31 | # Compile for the local machine arch... | 31 | # Compile for the local machine arch... |
32 | do_compile () { | 32 | do_compile () { |
33 | SQLITE_LDADD='$(SQLITE)/$(SQLITE_LIB)/libsqlite3.a' | ||
34 | for sqlite_link_opt in $(pkg-config sqlite3 --libs --static) | ||
35 | do | ||
36 | case "$sqlite_link_opt" in | ||
37 | -lsqlite3) | ||
38 | ;; | ||
39 | -l*) | ||
40 | SQLITE_LDADD="${SQLITE_LDADD} ${sqlite_link_opt}" | ||
41 | ;; | ||
42 | *) | ||
43 | ;; | ||
44 | esac | ||
45 | done | ||
33 | if [ "${SITEINFO_BITS}" = "64" ]; then | 46 | if [ "${SITEINFO_BITS}" = "64" ]; then |
34 | ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath | 47 | ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --with-static-sqlite="$SQLITE_LDADD" --without-rpath |
35 | else | 48 | else |
36 | ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath | 49 | ${S}/configure ${PSEUDO_EXTRA_OPTS} --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite-lib=${baselib} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --with-static-sqlite="$SQLITE_LDADD" --without-rpath |
37 | fi | 50 | fi |
38 | oe_runmake ${MAKEOPTS} | 51 | oe_runmake ${MAKEOPTS} |
39 | } | 52 | } |
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index c9a4ecd2e2..79e0b6bd21 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb | |||
@@ -2,7 +2,6 @@ require pseudo.inc | |||
2 | 2 | ||
3 | SRC_URI = "git://git.yoctoproject.org/pseudo \ | 3 | SRC_URI = "git://git.yoctoproject.org/pseudo \ |
4 | file://0001-configure-Prune-PIE-flags.patch \ | 4 | file://0001-configure-Prune-PIE-flags.patch \ |
5 | file://libm.patch \ | ||
6 | file://fallback-passwd \ | 5 | file://fallback-passwd \ |
7 | file://fallback-group \ | 6 | file://fallback-group \ |
8 | file://moreretries.patch \ | 7 | file://moreretries.patch \ |