2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
#
|
|
|
|
# gdb
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
|
|
|
|
GDB_VERSION = $(call qstrip,$(BR2_GDB_VERSION))
|
.mk files: bulk aligment and whitespace cleanup of assignments
The Buildroot coding style defines one space around make assignments and
does not align the assignment symbols.
This patch does a bulk fix of offending packages. The package
infrastructures (or more in general assignments to calculated variable
names, like $(2)_FOO) are not touched.
Alignment of line continuation characters (\) is kept as-is.
The sed command used to do this replacement is:
find * -name "*.mk" | xargs sed -i \
-e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*$#\1 \2#'
-e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\]\+\)$#\1 \2 \3#'
-e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\s*\([^\\ \t]\+\s*\\\)\s*$#\1 \2 \3#'
-e 's#^\([A-Z0-9a-z_]\+\)\s*\([?:+]\?=\)\(\s*\\\)#\1 \2\3#'
Brief explanation of this command:
^\([A-Z0-9a-z_]\+\) a regular variable at the beginning of the line
\([?:+]\?=\) any assignment character =, :=, ?=, +=
\([^\\]\+\) any string not containing a line continuation
\([^\\ \t]\+\s*\\\) string, optional whitespace, followed by a
line continuation character
\(\s*\\\) optional whitespace, followed by a line
continuation character
Hence, the first subexpression handles empty assignments, the second
handles regular assignments, the third handles regular assignments with
line continuation, and the fourth empty assignments with line
continuation.
This expression was tested on following test text: (initial tab not
included)
FOO = spaces before
FOO = spaces before and after
FOO = tab before
FOO = tab and spaces before
FOO = tab after
FOO = tab and spaces after
FOO = spaces and tab after
FOO = \
FOO = bar \
FOO = bar space \
FOO = \
GENIMAGE_DEPENDENCIES = host-pkgconf libconfuse
FOO += spaces before
FOO ?= spaces before and after
FOO :=
FOO =
FOO =
FOO =
FOO =
$(MAKE1) CROSS_COMPILE=$(TARGET_CROSS) -C
AT91BOOTSTRAP3_DEFCONFIG = \
AXEL_DISABLE_I18N=--i18n=0
After this bulk change, following manual fixups were done:
- fix line continuation alignment in cegui06 and spice (the sed
expression leaves the number of whitespace between the value and line
continuation character intact, but the whitespace before that could have
changed, causing misalignment.
- qt5base was reverted, as this package uses extensive alignment which
actually makes the code more readable.
Finally, the end result was manually reviewed.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Cc: Yann E. Morin <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-10-07 09:06:03 +02:00
|
|
|
GDB_SITE = $(BR2_GNU_MIRROR)/gdb
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
|
2013-07-30 11:37:13 +02:00
|
|
|
ifeq ($(BR2_arc),y)
|
2014-08-21 19:33:56 +02:00
|
|
|
GDB_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(GDB_VERSION))
|
2013-12-05 18:20:47 +01:00
|
|
|
GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
|
2013-12-05 18:20:59 +01:00
|
|
|
GDB_FROM_GIT = y
|
2013-07-30 11:37:13 +02:00
|
|
|
endif
|
|
|
|
|
2013-12-05 18:20:55 +01:00
|
|
|
ifeq ($(BR2_microblaze),y)
|
|
|
|
GDB_SITE = $(call github,Xilinx,gdb,$(GDB_VERSION))
|
|
|
|
GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
|
2013-12-05 18:20:59 +01:00
|
|
|
GDB_FROM_GIT = y
|
2013-12-05 18:20:55 +01:00
|
|
|
endif
|
|
|
|
|
2013-04-13 06:09:10 +02:00
|
|
|
ifeq ($(GDB_VERSION),6.7.1-avr32-2.1.5)
|
2014-07-31 10:46:58 +02:00
|
|
|
GDB_SITE = ftp://www.at91.com/pub/buildroot
|
2013-04-13 06:09:10 +02:00
|
|
|
endif
|
|
|
|
|
2014-12-29 14:43:29 +01:00
|
|
|
# Starting from 7.8.x, bz2 tarballs no longer available, use .tar.xz
|
|
|
|
# instead.
|
|
|
|
ifneq ($(filter 7.8.%,$(GDB_VERSION)),)
|
2014-09-15 22:50:03 +02:00
|
|
|
GDB_SOURCE = gdb-$(GDB_VERSION).tar.xz
|
|
|
|
endif
|
|
|
|
|
2013-12-05 18:20:47 +01:00
|
|
|
GDB_SOURCE ?= gdb-$(GDB_VERSION).tar.bz2
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
GDB_LICENSE = GPLv2+ LGPLv2+ GPLv3+ LGPLv3+
|
|
|
|
GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB
|
|
|
|
|
|
|
|
# We only want gdbserver and not the entire debugger.
|
|
|
|
ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),)
|
|
|
|
GDB_SUBDIR = gdb/gdbserver
|
|
|
|
HOST_GDB_SUBDIR = .
|
|
|
|
else
|
|
|
|
GDB_DEPENDENCIES = ncurses
|
|
|
|
endif
|
|
|
|
|
|
|
|
# For the host variant, we really want to build with XML support,
|
2014-09-15 22:50:06 +02:00
|
|
|
# which is needed to read XML descriptions of target architectures. We
|
|
|
|
# also need ncurses.
|
|
|
|
HOST_GDB_DEPENDENCIES = host-expat host-ncurses
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
|
|
|
|
# Apply the Xtensa specific patches
|
|
|
|
XTENSA_CORE_NAME = $(call qstrip, $(BR2_XTENSA_CORE_NAME))
|
|
|
|
ifneq ($(XTENSA_CORE_NAME),)
|
|
|
|
define GDB_XTENSA_PRE_PATCH
|
|
|
|
tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(XTENSA_CORE_NAME).tar \
|
|
|
|
-C $(@D) --strip-components=1 gdb
|
|
|
|
endef
|
2013-05-27 15:03:45 +02:00
|
|
|
GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
HOST_GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH
|
|
|
|
endif
|
|
|
|
|
binutils, gdb: support unified binutils-gdb git repository
If Binutils and/or GDB are fetched from the unified binutils-gdb
repository, then the tarball will contain both Binutils and GDB
sources, unlike the "normal" tarballs that contain only the titular
package. To keep packages separated in Buildroot we need to disable
undesired components when configuring.
Binutils and GDB migrated to a common Git repository in the October
2013 [1]. Previous Git repositories were incomplete copies of CVS
repository which copied only the relevant files (no binutils files in
GDB, and vice versa). In the new binutils-gdb repository there is no
such separation and a result all files exist in directory after
checkout. So if "configure" and "make" are used without explicit
targets, all projects will be built: binutils, ld, gas, bfd, opcodes,
gdb, etc. In case of Buildroot this would mean that selecting Binutils
only, still will build both Binutils and GDB. And if GDB is selected
as well, then both packages will be built two times, and Binutils from
GDB directory will overwrite initial build of Binutils (or vice versa
if Binutils will be built after the GDB). This is a serious problem,
because binutils and GDB use separate branches in this common
repository. In case of Buildroot this means that separate Git commits
(or tags) should be used when downloading source from Git.
This affects only Git repositories, because GNU release tarballs still
contain only relevant packages.
This change is backward compatible, because if "normal" tarball is
used (without extra directories), than --disable-* configure options
are just ignored by configure.
[1] https://sourceware.org/ml/gdb/2013-10/msg00071.html
[Thomas: use variables to factorize options, and add comments in the
relevant .mk files to explain what's going on.]
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-29 14:54:37 +02:00
|
|
|
# When gdb sources are fetched from the binutils-gdb repository, they
|
|
|
|
# also contain the binutils sources, but binutils shouldn't be built,
|
|
|
|
# so we disable it.
|
2014-09-27 21:32:44 +02:00
|
|
|
GDB_DISABLE_BINUTILS_CONF_OPTS = \
|
binutils, gdb: support unified binutils-gdb git repository
If Binutils and/or GDB are fetched from the unified binutils-gdb
repository, then the tarball will contain both Binutils and GDB
sources, unlike the "normal" tarballs that contain only the titular
package. To keep packages separated in Buildroot we need to disable
undesired components when configuring.
Binutils and GDB migrated to a common Git repository in the October
2013 [1]. Previous Git repositories were incomplete copies of CVS
repository which copied only the relevant files (no binutils files in
GDB, and vice versa). In the new binutils-gdb repository there is no
such separation and a result all files exist in directory after
checkout. So if "configure" and "make" are used without explicit
targets, all projects will be built: binutils, ld, gas, bfd, opcodes,
gdb, etc. In case of Buildroot this would mean that selecting Binutils
only, still will build both Binutils and GDB. And if GDB is selected
as well, then both packages will be built two times, and Binutils from
GDB directory will overwrite initial build of Binutils (or vice versa
if Binutils will be built after the GDB). This is a serious problem,
because binutils and GDB use separate branches in this common
repository. In case of Buildroot this means that separate Git commits
(or tags) should be used when downloading source from Git.
This affects only Git repositories, because GNU release tarballs still
contain only relevant packages.
This change is backward compatible, because if "normal" tarball is
used (without extra directories), than --disable-* configure options
are just ignored by configure.
[1] https://sourceware.org/ml/gdb/2013-10/msg00071.html
[Thomas: use variables to factorize options, and add comments in the
relevant .mk files to explain what's going on.]
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-29 14:54:37 +02:00
|
|
|
--disable-binutils \
|
|
|
|
--disable-ld \
|
|
|
|
--disable-gas
|
|
|
|
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
GDB_CONF_ENV = \
|
|
|
|
ac_cv_type_uintptr_t=yes \
|
|
|
|
gt_cv_func_gettext_libintl=yes \
|
|
|
|
ac_cv_func_dcgettext=yes \
|
|
|
|
gdb_cv_func_sigsetjmp=yes \
|
|
|
|
bash_cv_func_strcoll_broken=no \
|
|
|
|
bash_cv_must_reinstall_sighandlers=no \
|
|
|
|
bash_cv_func_sigsetjmp=present \
|
|
|
|
bash_cv_have_mbstate_t=yes \
|
|
|
|
gdb_cv_func_sigsetjmp=yes
|
|
|
|
|
2014-12-17 22:37:05 +01:00
|
|
|
# The shared only build is not supported by gdb, so enable static build for
|
|
|
|
# build-in libraries with --enable-static.
|
2014-09-27 21:32:44 +02:00
|
|
|
GDB_CONF_OPTS = \
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
--without-uiout \
|
|
|
|
--disable-gdbtk \
|
|
|
|
--without-x \
|
|
|
|
--disable-sim \
|
2014-09-27 21:32:44 +02:00
|
|
|
$(GDB_DISABLE_BINUTILS_CONF_OPTS) \
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
$(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver) \
|
|
|
|
--with-curses \
|
|
|
|
--without-included-gettext \
|
2014-12-17 22:37:05 +01:00
|
|
|
--disable-werror \
|
|
|
|
--enable-static
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
|
2014-09-15 22:50:07 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_GDB_TUI),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
GDB_CONF_OPTS += --enable-tui
|
2014-09-15 22:50:07 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
GDB_CONF_OPTS += --disable-tui
|
2014-09-15 22:50:07 +02:00
|
|
|
endif
|
|
|
|
|
2014-09-15 22:50:10 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_GDB_PYTHON),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
GDB_CONF_OPTS += --with-python=$(TOPDIR)/package/gdb/gdb-python-config
|
2014-09-15 22:50:10 +02:00
|
|
|
GDB_DEPENDENCIES += python
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
GDB_CONF_OPTS += --without-python
|
2014-09-15 22:50:10 +02:00
|
|
|
endif
|
|
|
|
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
# This removes some unneeded Python scripts and XML target description
|
|
|
|
# files that are not useful for a normal usage of the debugger.
|
|
|
|
define GDB_REMOVE_UNNEEDED_FILES
|
|
|
|
$(RM) -rf $(TARGET_DIR)/usr/share/gdb
|
|
|
|
endef
|
|
|
|
|
|
|
|
GDB_POST_INSTALL_TARGET_HOOKS += GDB_REMOVE_UNNEEDED_FILES
|
|
|
|
|
2013-04-07 02:04:35 +02:00
|
|
|
# This installs the gdbserver somewhere into the $(HOST_DIR) so that
|
|
|
|
# it becomes an integral part of the SDK, if the toolchain generated
|
|
|
|
# by Buildroot is later used as an external toolchain. We install it
|
|
|
|
# in debug-root/usr/bin/gdbserver so that it matches what Crosstool-NG
|
|
|
|
# does.
|
|
|
|
define GDB_SDK_INSTALL_GDBSERVER
|
|
|
|
$(INSTALL) -D -m 0755 $(TARGET_DIR)/usr/bin/gdbserver \
|
|
|
|
$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/debug-root/usr/bin/gdbserver
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
|
|
|
|
GDB_POST_INSTALL_TARGET_HOOKS += GDB_SDK_INSTALL_GDBSERVER
|
|
|
|
endif
|
|
|
|
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
# A few notes:
|
|
|
|
# * --target, because we're doing a cross build rather than a real
|
|
|
|
# host build.
|
|
|
|
# * --enable-static because gdb really wants to use libbfd.a
|
|
|
|
# * --disable-shared, otherwise the old 6.7 version specific to AVR32
|
|
|
|
# doesn't build because it wants to link a shared libbfd.so against
|
|
|
|
# non-PIC liberty.a.
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_GDB_CONF_OPTS = \
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--enable-static --disable-shared \
|
|
|
|
--without-uiout \
|
|
|
|
--disable-gdbtk \
|
|
|
|
--without-x \
|
|
|
|
--enable-threads \
|
|
|
|
--disable-werror \
|
|
|
|
--without-included-gettext \
|
2014-09-27 21:32:44 +02:00
|
|
|
$(GDB_DISABLE_BINUTILS_CONF_OPTS) \
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
--disable-sim
|
|
|
|
|
2014-08-29 21:42:31 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HOST_GDB_TUI),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_GDB_CONF_OPTS += --enable-tui
|
2014-08-29 21:42:31 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_GDB_CONF_OPTS += --disable-tui
|
2014-08-29 21:42:31 +02:00
|
|
|
endif
|
|
|
|
|
2014-09-15 22:50:09 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON),y)
|
2014-12-01 09:38:10 +01:00
|
|
|
HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/usr/bin/python2
|
2014-09-15 22:50:09 +02:00
|
|
|
HOST_GDB_DEPENDENCIES += host-python
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_GDB_CONF_OPTS += --without-python
|
2014-09-15 22:50:09 +02:00
|
|
|
endif
|
|
|
|
|
2013-12-05 18:20:59 +01:00
|
|
|
ifeq ($(GDB_FROM_GIT),y)
|
|
|
|
HOST_GDB_DEPENDENCIES += host-texinfo
|
2014-05-27 11:02:56 +02:00
|
|
|
else
|
|
|
|
# don't generate documentation
|
|
|
|
GDB_CONF_ENV += ac_cv_prog_MAKEINFO=missing
|
|
|
|
HOST_GDB_CONF_ENV += ac_cv_prog_MAKEINFO=missing
|
2013-12-05 18:20:59 +01:00
|
|
|
endif
|
|
|
|
|
2013-04-11 23:09:13 +02:00
|
|
|
# legacy $arch-linux-gdb symlink
|
|
|
|
define HOST_GDB_ADD_SYMLINK
|
|
|
|
cd $(HOST_DIR)/usr/bin && \
|
|
|
|
ln -snf $(GNU_TARGET_NAME)-gdb $(ARCH)-linux-gdb
|
|
|
|
endef
|
|
|
|
|
|
|
|
HOST_GDB_POST_INSTALL_HOOKS += HOST_GDB_ADD_SYMLINK
|
|
|
|
|
2014-05-05 11:25:50 +02:00
|
|
|
HOST_GDB_POST_INSTALL_HOOKS += gen_gdbinit_file
|
|
|
|
|
gdb: convert to the package infrastructure
This commit converts gdb to the package infrastructure, and therefore
moves it from toolchain/gdb to package/gdb.
The target package is now visible in "Package selection for the
target" => "Debugging, profiling and benchmark". The main option,
"gdb", forcefully selects the "gdbserver" sub-option by
default. Another sub-option, "full debugger" allows to install the
complete gdb on the target. When this option is enabled, then
"gdbserver" is no longer forcefully selected. This ensures that at
least gdbserver or the full debugger gets built/installed, so that the
package is not a no-op.
The host debugger is still enabled through a configuration option in
"Toolchain". It is now visible regardless of the toolchain type (it
used to be hidden for External Toolchains). The configuration options
relative to the host debugger are now in package/gdb/Config.in.host,
similar to how we have package/binutils/Config.in.host.
Since gdb is now a proper package, it is no longer allowed to 'select
BR2_PTHREADS_DEBUG' to ensure thread debugging is available when
needed. Instead, it now 'depends on
BR2_TOOLCHAIN_HAS_THREADS_DEBUG'. This option, in turn, is selected by
the different toolchain backends when appropriate. The
'BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED' option is removed, since
we no longer need to know when it is allowed to 'select
BR2_PTHREADS_DEBUG'. Also, the 'BR2_PTHREADS_DEBUG' option is moved to
appear right below the thread implementation selection (in the case of
the Buildroot toolchain backend).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-07 02:04:33 +02:00
|
|
|
$(eval $(autotools-package))
|
|
|
|
$(eval $(host-autotools-package))
|