* [PATCH] gdb: fix builds with internal readline and no static libraries
@ 2016-03-03 21:01 Ross Burton
2016-03-04 14:02 ` Martin Jansa
0 siblings, 1 reply; 5+ messages in thread
From: Ross Burton @ 2016-03-03 21:01 UTC (permalink / raw)
To: openembedded-core
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@intel.com>
---
meta/recipes-devtools/gdb/gdb.inc | 1 +
.../gdb/gdb/force-readline-static.patch | 37 ++++++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 meta/recipes-devtools/gdb/gdb/force-readline-static.patch
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@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
+
--
2.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] gdb: fix builds with internal readline and no static libraries
2016-03-03 21:01 [PATCH] gdb: fix builds with internal readline and no static libraries Ross Burton
@ 2016-03-04 14:02 ` Martin Jansa
2016-03-04 14:01 ` Burton, Ross
2016-03-04 14:04 ` Martin Jansa
0 siblings, 2 replies; 5+ messages in thread
From: Martin Jansa @ 2016-03-04 14:02 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 4978 bytes --]
On Thu, Mar 03, 2016 at 09:01:13PM +0000, Ross Burton wrote:
> 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.
Somehow this caused hardfloat builds to fail
| checking for options to get soft-float... no
| configure: error: could not force soft-float
| NOTE: The following config.log files may provide further information.
| WARNING: exit code 1 from a shell command.
from config.log:
configure:25055: arm-oe-linux-gnueabi-gcc -march=armv7ve -mthumb
-mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -mtune=cortex-a7
-rdynamic
--sysroot=<sysroot>
-c -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts
-Wcomment -Wdeprecated-declarations -Wdisabled-optimization
-Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security
-Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int
-Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar
-Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare
-Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function
-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable
-Wwrite-strings -Wnested-externs -Wstrict-prototypes -g
-Wredundant-decls -Wmissing-prototypes -Wmissing-declarations
-Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self
-Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers
-Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing
-Wvariadic-macros -Wvolatile-register-var -Wpointer-sign
-Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations
-Wformat=2 -freg-struct-return -msoft-float -Werror -Wall -W
-DGRUB_MACHINE_UBOOT=1 -DGRUB_MACHINE=ARM_UBOOT conftest.c >&5
arm-oe-linux-gnueabi-gcc: error: -mfloat-abi=soft and
-mfloat-abi=hard may not be used together
configure:25055: $? = 1
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
> meta/recipes-devtools/gdb/gdb.inc | 1 +
> .../gdb/gdb/force-readline-static.patch | 37 ++++++++++++++++++++++
> 2 files changed, 38 insertions(+)
> create mode 100644 meta/recipes-devtools/gdb/gdb/force-readline-static.patch
>
> 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@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
> +
> --
> 2.7.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] gdb: fix builds with internal readline and no static libraries
2016-03-04 14:02 ` Martin Jansa
@ 2016-03-04 14:01 ` Burton, Ross
2016-03-04 14:04 ` Martin Jansa
1 sibling, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2016-03-04 14:01 UTC (permalink / raw)
To: Martin Jansa; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
On 4 March 2016 at 14:02, Martin Jansa <martin.jansa@gmail.com> wrote:
> Somehow this caused hardfloat builds to fail
>
Can you verify that removing --disable-static from gdb fixes this?
Ross
[-- Attachment #2: Type: text/html, Size: 612 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gdb: fix builds with internal readline and no static libraries
2016-03-04 14:02 ` Martin Jansa
2016-03-04 14:01 ` Burton, Ross
@ 2016-03-04 14:04 ` Martin Jansa
2016-03-04 14:03 ` Burton, Ross
1 sibling, 1 reply; 5+ messages in thread
From: Martin Jansa @ 2016-03-04 14:04 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 5398 bytes --]
On Fri, Mar 04, 2016 at 03:02:12PM +0100, Martin Jansa wrote:
> On Thu, Mar 03, 2016 at 09:01:13PM +0000, Ross Burton wrote:
> > 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.
>
Ups, sorry for noise
grub != gdb, I need more coffee.
> Somehow this caused hardfloat builds to fail
>
> | checking for options to get soft-float... no
> | configure: error: could not force soft-float
> | NOTE: The following config.log files may provide further information.
> | WARNING: exit code 1 from a shell command.
>
> from config.log:
>
> configure:25055: arm-oe-linux-gnueabi-gcc -march=armv7ve -mthumb
> -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -mtune=cortex-a7
> -rdynamic
> --sysroot=<sysroot>
> -c -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts
> -Wcomment -Wdeprecated-declarations -Wdisabled-optimization
> -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security
> -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int
> -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar
> -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare
> -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function
> -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable
> -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g
> -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations
> -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self
> -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers
> -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing
> -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign
> -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations
> -Wformat=2 -freg-struct-return -msoft-float -Werror -Wall -W
> -DGRUB_MACHINE_UBOOT=1 -DGRUB_MACHINE=ARM_UBOOT conftest.c >&5
> arm-oe-linux-gnueabi-gcc: error: -mfloat-abi=soft and
> -mfloat-abi=hard may not be used together
> configure:25055: $? = 1
>
> > Signed-off-by: Ross Burton <ross.burton@intel.com>
> > ---
> > meta/recipes-devtools/gdb/gdb.inc | 1 +
> > .../gdb/gdb/force-readline-static.patch | 37 ++++++++++++++++++++++
> > 2 files changed, 38 insertions(+)
> > create mode 100644 meta/recipes-devtools/gdb/gdb/force-readline-static.patch
> >
> > 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@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
> > +
> > --
> > 2.7.0
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
> --
> Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-04 14:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 21:01 [PATCH] gdb: fix builds with internal readline and no static libraries Ross Burton
2016-03-04 14:02 ` Martin Jansa
2016-03-04 14:01 ` Burton, Ross
2016-03-04 14:04 ` Martin Jansa
2016-03-04 14:03 ` Burton, Ross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox