summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-03-03 21:01:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-07 00:11:38 +0000
commit37f5fb944a0b282a1eec3ee6451fa00dfa64b7e9 (patch)
tree2513a5f522d1fce3b5cac89571d578ef57d1b0e5 /meta/recipes-devtools/gdb
parent6518db4707c458a434c46e7d60cf1ff40ca8ada6 (diff)
downloadpoky-37f5fb944a0b282a1eec3ee6451fa00dfa64b7e9.tar.gz
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. (From OE-Core rev: 1490caa07d72af81c7e515e4ff7b4905da840d7d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gdb')
-rw-r--r--meta/recipes-devtools/gdb/gdb.inc1
-rw-r--r--meta/recipes-devtools/gdb/gdb/force-readline-static.patch37
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
index 1dd655180d..507f274fd8 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 \
7 file://0001-Use-exported-definitions-of-SIGRTMIN.patch \ 7 file://0001-Use-exported-definitions-of-SIGRTMIN.patch \
8 file://0001-include-sys-types.h-for-mode_t.patch \ 8 file://0001-include-sys-types.h-for-mode_t.patch \
9 file://0001-use-asm-sgidefs.h.patch \ 9 file://0001-use-asm-sgidefs.h.patch \
10 file://force-readline-static.patch \
10 " 11 "
11#LDFLAGS_append = " -s" 12#LDFLAGS_append = " -s"
12#export CFLAGS_append=" -L${STAGING_LIBDIR}" 13#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 0000000000..d34ee8cee9
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/force-readline-static.patch
@@ -0,0 +1,37 @@
1If gdb is configured with --disable-static then this is dutifully passed to
2readline which then disables libreadline.a, which causes a problem when gdb
3tries to link against that.
4
5To ensure that readline always builds static libraries, pass --enable-static to
6the sub-configure.
7
8Upstream-Status: Pending
9Signed-off-by: Ross Burton <ross.burton@intel.com>
10
11diff --git a/Makefile.def b/Makefile.def
12index 4394188..05c661a 100644
13--- a/Makefile.def
14+++ b/Makefile.def
15@@ -100,7 +100,8 @@ host_modules= { module= libiconv;
16 missing= install-html;
17 missing= install-info; };
18 host_modules= { module= m4; };
19-host_modules= { module= readline; };
20+host_modules= { module= readline;
21+ extra_configure_flags='--enable-static';};
22 host_modules= { module= sid; };
23 host_modules= { module= sim; };
24 host_modules= { module= texinfo; no_install= true; };
25diff --git a/Makefile.in b/Makefile.in
26index 61e0ab6..837f36e 100644
27--- a/Makefile.in
28+++ b/Makefile.in
29@@ -24971,7 +24971,7 @@ configure-readline:
30 $$s/$$module_srcdir/configure \
31 --srcdir=$${topdir}/$$module_srcdir \
32 $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
33- --target=${target_alias} \
34+ --target=${target_alias} --enable-static \
35 || exit 1
36 @endif readline
37