[oe-commits] [openembedded-core] 05/07: gdb: fix builds with internal readline and no static libraries
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 3 23:23:51 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit c5d5f2511c519b25ab296653d2f51311c7a92c89
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Thu Mar 3 21:01:13 2016 +0000
gdb: fix builds with internal readline and no static libraries
If gdb was configured to use the internal readline but static libraries were
disabled, gdb wouldn't dutifully not build libreadline.a which was a problem
when it tried to link with that library.
Solve this by ensuring --enable-static is passed to the readline configure.
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-devtools/gdb/gdb.inc | 1 +
.../gdb/gdb/force-readline-static.patch | 37 ++++++++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
index 1dd6551..507f274 100644
--- a/meta/recipes-devtools/gdb/gdb.inc
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -7,6 +7,7 @@ SRC_URI += "file://0002-Change-order-of-CFLAGS.patch \
file://0001-Use-exported-definitions-of-SIGRTMIN.patch \
file://0001-include-sys-types.h-for-mode_t.patch \
file://0001-use-asm-sgidefs.h.patch \
+ file://force-readline-static.patch \
"
#LDFLAGS_append = " -s"
#export CFLAGS_append=" -L${STAGING_LIBDIR}"
diff --git a/meta/recipes-devtools/gdb/gdb/force-readline-static.patch b/meta/recipes-devtools/gdb/gdb/force-readline-static.patch
new file mode 100644
index 0000000..d34ee8c
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/force-readline-static.patch
@@ -0,0 +1,37 @@
+If gdb is configured with --disable-static then this is dutifully passed to
+readline which then disables libreadline.a, which causes a problem when gdb
+tries to link against that.
+
+To ensure that readline always builds static libraries, pass --enable-static to
+the sub-configure.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton at intel.com>
+
+diff --git a/Makefile.def b/Makefile.def
+index 4394188..05c661a 100644
+--- a/Makefile.def
++++ b/Makefile.def
+@@ -100,7 +100,8 @@ host_modules= { module= libiconv;
+ missing= install-html;
+ missing= install-info; };
+ host_modules= { module= m4; };
+-host_modules= { module= readline; };
++host_modules= { module= readline;
++ extra_configure_flags='--enable-static';};
+ host_modules= { module= sid; };
+ host_modules= { module= sim; };
+ host_modules= { module= texinfo; no_install= true; };
+diff --git a/Makefile.in b/Makefile.in
+index 61e0ab6..837f36e 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -24971,7 +24971,7 @@ configure-readline:
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+- --target=${target_alias} \
++ --target=${target_alias} --enable-static \
+ || exit 1
+ @endif readline
+
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list