]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
gdb: actually disable gdbserver if BR2_PACKAGE_GDB_SERVER is unset
authorAnssi Hannula <anssi.hannula@bitwise.fi>
Tue, 15 May 2018 13:34:42 +0000 (16:34 +0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 19 May 2018 12:07:10 +0000 (14:07 +0200)
The gdb configure script is given --enable-gdbserver when
BR2_PACKAGE_GDB_SERVER is set, but it is not given --disable-gdbserver
when BR2_PACKAGE_GDB_SERVER is unset.

gdb gdb/configure.ac defaults to enabling gdbserver in "native"
(host=target) cases, which is always the case when buildroot builds a
gdb which runs on the target hardware. The gdbserver will overwrite
BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY gdbserver, if any.

Fix that by passing --disable-gdbserver when BR2_PACKAGE_GDB_SERVER is
unset.

Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/gdb/gdb.mk

index 215f473cc01ec188d7ef3184ce6e1d375ea35edd..5661b4a46543d6b2c2c98a92ecedeebf1805319e 100644 (file)
@@ -109,7 +109,7 @@ GDB_CONF_OPTS = \
        --without-x \
        --disable-sim \
        $(GDB_DISABLE_BINUTILS_CONF_OPTS) \
-       $(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver) \
+       $(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver,--disable-gdbserver) \
        --with-curses \
        --without-included-gettext \
        --disable-werror \