Commit Graph

263 Commits

Author SHA1 Message Date
Romain Naour
bd17127b4a package/{binutils, gdb}: switch to https urls for archives hashes
FTP urls doesn't work anymore with Firefox [1] and Google Chrome [2],
switch to https urls.

[1] https://blog.mozilla.org/addons/2020/04/13/what-to-expect-for-the-upcoming-deprecation-of-ftp-in-firefox/
[2] https://chromestatus.com/feature/6246151319715840

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-07-01 23:03:20 +02:00
Romain Naour
3fed683035 package/gdb: disable gdb for or1k builds with musl libc
The or1k musl port is incomplete, elf_gregset_t definition is missing
(user.h is empty) [1]. It fail to build gdbserver and the full gdb.

[1] https://git.musl-libc.org/cgit/musl/tree/arch/or1k/bits/user.h?h=v1.2.3

Fixes:
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/4202276569

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Stafford Horne <shorne@gmail.com>
[yann.morin.1998@free.fr: simplify condition, add comment]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-05-07 15:12:07 +02:00
Fabrice Fontaine
3341ceb1e5 package/gdb: zlib is mandatory, not optional
zlib is a mandatory dependency of gdb and by default, gdb will use its
internal one. Moreover, --with-zlib has been replaced by
--with-system-zlib since version 7.10 and
fa1f5da0b6

Fixes:
 - https://bugs.buildroot.org/show_bug.cgi?id=15131

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-12-04 12:56:19 +01:00
Romain Naour
382d33dfa6 package/gdb: enable host-gdb and gdbserver support for or1k with gdb 12.1
The gdbserver support for or1k is available since 12.1 release, since
commit [1]. Restrict the gdb version choice for or1k to 12.1 for
simplicity. Also enable host-gdb to connect to the gdbserver on the
target.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=4933265c3f71b9134363d0c05f09542d5cc677f4

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Stafford Horne <shorne@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-10-25 23:07:57 +02:00
Peter Korsgaard
be914b97ad Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-09-11 09:57:08 +02:00
Romain Naour
4765efb222 package/gdb: include gdbarch.h in xtensa-linux-nat.c
It seems that gdb doesn't build for xtensa since a while, indeed commit
[1] merged in gdb 9 introduced a few number of build issues on several
architectures:

[Fix gdb build on macOS]
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=b1c896b365f2dbcd14145a88d103623244cf0fb0

[gdb: Fix gdb build on mips64-linux]
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=2208ee917050bcc901c7faefdee257ffbf8ef2ab

[gdb: Fix native build on Linux/Alpha.]
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=7a27b85f6d9b5eea9bd1493f903158fbea4b2231

[Include gdbarch.h in m68k-linux-nat.c]
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=a7cdaa914f4b937544d8f102679bb5129bb1ef08

[gdb: include gdbarch.h in hppa-linux-nat.c]
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=ad75efa628656716982f2674008952bfd2c268af

Most of them has been fixed before the gdb 9 release but it seems
that xtensa is the last one on this list and still unfixed with
gdb 11 (not even noticed by Buildroot autobuilders).

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=0d12e84cfc9bd36b7bbda01a3c8f83f65a832398

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-09-06 17:48:07 +02:00
Romain Naour
d16db6d8a4 package/gdb: prevent gdbserver being selected for or1k builds
There is currently no version of gdbserver for or1k. Until this
is implemented we will prevent both the direct and indirect
selection of gdbserver for or1k builds. In practice this means
that 'cross gdb for the host' cannot be selected and that
'full debugger' must be automatically selected for the gdb target
package.

This partially reverts commit 991b7b990a
which claimed that gdbserver for or1k was already supported before
version 8.3. That is not true - the commit that adds gdbserver support
for or1k [1] was only merged for version 12.1, which hasn't been
integrated in Buildroot yet.

Without that support, the build of gdbserver fails with

/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/or1k-buildroot-linux-musl/11.2.0/../../../../or1k-buildroot-linux-musl/bin/ld: server.o: in function `main':
server.cc:(.text.startup+0x6dc): undefined reference to `initialize_low()'
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/or1k-buildroot-linux-musl/11.2.0/../../../../or1k-buildroot-linux-musl/bin/ld: remote-utils.o: in function `prepare_resume_reply(char*, ptid_t, target_waitstatus*)':
remote-utils.cc:(.text+0x28a8): undefined reference to `using_threads'
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/or1k-buildroot-linux-musl/11.2.0/../../../../or1k-buildroot-linux-musl/bin/ld: remote-utils.cc:(.text+0x28b0): undefined reference to `using_threads'

Fixes: http://autobuild.buildroot.net/results/b3c/b3c0df53d09d9facaf0c3c2bc4529f9fcf7737ee

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=4933265c3f71b9134363d0c05f09542d5cc677f4

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Stafford Horne <shorne@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2022-08-30 22:58:01 +02:00
Thomas Petazzoni
3ae900bcf9 package/gdb: remove BR2_PACKAGE_GDB_TOPLEVEL
This option was needed to build versions of GDB < 10.x. As we just
dropped support for GDB 9.x, this logic can now be removed.

The special case to configure just gdbserver was only valid for gdb<10,
but was guarded by !GDB_TOPLEVEL (which was equivalent to gdb<10).
GDB_TOPLEVEL is now always true, so we can't hit that special case
anymore.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: add little blurb about gdbserver]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-08-14 18:03:39 +02:00
Yann E. MORIN
c4eddacad7 package/gdb: switch to GDB 11.x as the
Now that GDB 12.x has been added, and GDB 9.x removed, we can make GDB
11.x the default version.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: split off to its own patch]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-08-14 17:56:56 +02:00
Thomas Petazzoni
7b977af16e package/gdb: invert the logic to add the dependency on gmp
The handling of the GMP dependency needs a bit of change. Until now,
the GMP dependency was needed when building full GDB (host or target)
in version 11.x or 12.x, so we were explicitly checking whether those
versions were enabled.

Now that only GDB 10.x and the ARC-specific version of GDB are the
only remaining ones not needing GMP, we invert the logic: only those
two versions do not trigger the addition of the GMP dependency.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: split off to its own patch]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-08-14 17:56:40 +02:00
Thomas Petazzoni
5c89b00a20 package/gdb: remove support for 9.2
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-08-14 17:53:41 +02:00
Thomas Petazzoni
a493f6288b package/gdb: add support for version 12.1
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-08-14 17:53:38 +02:00
Stafford Horne
991b7b990a package/gdb: Enable OpenRISC GDB support
The OpenRiSC gdb port has supported native debugging since version 8.3
and remote debugging since before that.  So it is now safe to enabled
this.

This patch removes the conditions blocking gdb from being built on or1k
architecture builds.

Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-07-30 16:46:56 +02:00
Yann E. MORIN
84fe8e694e package: drop csky support in toolchain-related packages
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Guo Ren <ren_guo@c-sky.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-07-27 17:00:30 +02:00
Thomas Petazzoni
793ee1011e Remove support for the NDS32 architecture
The support for this architecture has been removed from the upstream
Linux kernel, as of commit:

  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aec499c75cf8e0b599be4d559e6922b613085f8f

Which states:

  The nds32 architecture, also known as AndeStar V3, is a custom
  32-bit RISC target designed by Andes Technologies. Support was added
  to the kernel in 2016 as the replacement RISC-V based V5 processors
  were already announced, and maintained by (current or former) Andes
  employees.

  As explained by Alan Kao, new customers are now all using RISC-V,
  and all known nds32 users are already on longterm stable kernels
  provided by Andes, with no development work going into mainline
  support any more.

There has also been little to no maintenance done in Buildroot for
this architecture in recent times, so let's follow the Linux kernel
community decision and drop support for this CPU architecture.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-06-19 18:30:45 +02:00
John Keeping
9fa5d641ac package/gdb: fix when gmp is installed on the host machine
gdb's AC_LIB_HAVE_LINKFLAGS macro hardcodes a search starting with
/usr/lib/ which can lead to libgmp from the wrong architecture with the
result that the test fails.  Even if a libgmp is found there it is now
the one that should be used.

This is the same macro used for expat and lzma for which there are
already specific CONF_OPTS flags added here.  Add the same flag for
libgmp and move the handling down so that it is logically grouped with
the other similar options.

Note that there is no --with(out)-gmp flag to configure, as the
dependency is mandatory, so only the --with-libgmp-prefix option is
specified.

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-03-07 22:43:45 +01:00
Thomas Petazzoni
8cfbda109f package/gdb: bump 11.x version to 11.2
This is a minor corrective release over GDB 11.1, fixing the following issues:

  PR sim/28302 (gdb fails to build with glibc 2.34)
  PR build/28318 (std::thread support configure check does not use
  CXX_DIALECT)
  PR gdb/28405 (arm-none-eabi: internal-error: ptid_t
  remote_target::select_thread_for_ambiguous_stop_reply(const
  target_waitstatus*): Assertion `first_resumed_thread != nullptr'
  failed)
  PR tui/28483 ([gdb/tui] breakpoint creation not displayed)
  PR build/28555 (uclibc compile failure since commit 4655f8509fd44e6efabefa373650d9982ff37fd6)
  PR rust/28637 (Rust characters will be encoded using DW_ATE_UTF)
  PR gdb/28758 (GDB 11 doesn't work correctly on binaries with a SHT_RELR (.relr.dyn) section)
  PR gdb/28785 (Support SHT_RELR (.relr.dyn) section)

Drop patch 0006-sim-filter-out-SIGSTKSZ-PR-sim-28302.patch, which was
merged upstream as commit 17d6f2152b583cdc7defafa7813b727a304bac5b.

Drop patch 0008-Fix-build-on-rhES5.patch, which was merged upstream as
commit df9ebc472a162306dee8ba6e02b99963c2babb7c?

Drop patch 0009-gdbserver-aarch64-support.patch, which was merged
upstream as commit eb79b2318066cafb75ffdce310e3bbd44f7c79e3.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-03-05 15:06:29 +01:00
Joachim Wiberg
4353c71646 package/gdb: backport fix for gdbserver 11.1 on aarch64
Backported from upstream GDB geb79b23, with ChangeLogs stripped so the
patch applies properly on Buildroot.

    https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eb79b23

Fixes the following issue:

    # gdbserver /dev/hvc1 inadyn -n -l debug
    Process inadyn created; pid = 675
    Remote debugging using /dev/hvc1
    ../../gdbserver/regcache.cc:257: A problem internal to GDBserver has been detected.
    Unknown register tag_ctl requested

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
[yann.morin.1998@free.fr: add SoB in patch, provided live on IRC]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2022-02-03 21:56:17 +01:00
Adam Duskett
a607efc6d3 package/gdb: remove python2 support
Since at least gdb 7.8, python3 support has been available. As part of
the progressive retiring of python2 support, it is time to drop its
support in gdb by:

- Removing BR2_PACKAGE_HOST_GDB_PYTHON in package/gdb/Config.in.host
  and removing the choice to leave just a BR2_PACKAGE_HOST_GDB_PYTHON3
  option.

- Adding BR2_PACKAGE_HOST_GDB_PYTHON to Config.in.legacy

- Changing depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 to
  depends on BR2_PACKAGE_PYTHON3 in package/gdb/Config.in

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-13 21:27:34 +01:00
Fabrice Fontaine
2da1267c1e package/gdb: fix NLS build
Fix the following build failure raised since version 10.1 and
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9a665d62266e75f0519f3a663784c458885b5c63:

  CXXLD  libinproctrace.so
/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: gdbsupport/tdesc-ipa.o: in function `print_xml_feature::visit(tdesc_type_builtin const*)':
/home/buildroot/autobuild/instance-2/output-1/build/gdb-10.2/build/gdbserver/../../gdbserver/../gdbsupport/tdesc.cc:310: undefined reference to `libintl_gettext'

Fixes:
 - http://autobuild.buildroot.org/results/faacc874fe9d32b74cb3d3dea988ef661cb0e3d0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-11-22 21:46:32 +01:00
Peter Seiderer
b86d9c661d package/gdb: gdb-11.1 compile for uclibc (ADDR_NO_RANDOMIZE related)
- add upstream patch ([1]) to fix the ADDR_NO_RANDOMIZE compile failure
  introduced with commit [2] (see [3] for details)

Fixes:

  ../../gdbserver/../gdb/nat/linux-personality.c: In constructor ‘maybe_disable_address_space_randomization::maybe_disable_address_space_randomization(int)’:
  ../../gdbserver/../gdb/nat/linux-personality.c:36:48: error: ‘ADDR_NO_RANDOMIZE’ was not declared in this scope
     36 |       if (errno == 0 && !(m_personality_orig & ADDR_NO_RANDOMIZE))
        |                                                ^~~~~~~~~~~~~~~~~
  ../../gdbserver/../gdb/nat/linux-personality.c:42:37: error: ‘ADDR_NO_RANDOMIZE’ was not declared in this scope
     42 |     && !(personality (0xffffffff) & ADDR_NO_RANDOMIZE)))
        |                                     ^~~~~~~~~~~~~~~~~

[1] https://sourceware.org/git/?p=binutils-gdb.git;h=0b03c6f03d51f441d999e0cee92f81af543d9373
[2] https://sourceware.org/git/?p=binutils-gdb.git;h=4655f8509fd44e6efabefa373650d9982ff37fd6
[3] https://sourceware.org/bugzilla/show_bug.cgi?id=28555

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-11-16 20:59:23 +01:00
Peter Seiderer
b7eff63bc8 package/gdb: fix gdb-11.1 compile for uclibc < v1.0.35 (getrandom related)
- fix getrandom compile for uclibc < v1.0.35, add missing stddef.h
  include (fixed in uclibc since v1.0.35, see [1])

Fixes:

  .../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name ‘size_t’
     27 | extern int getrandom(void *__buf, size_t count, unsigned int flags)
        |                                   ^~~~~~

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-11-16 20:56:11 +01:00
Fabrice Fontaine
9d77dae557 package/gdb: fix musl build on riscv
Fix the following build failure raised since gdb 10.1 and
bf84f70666:

../../gdbserver/linux-riscv-low.cc: In function 'void riscv_fill_fpregset(regcache*, void*)':
../../gdbserver/linux-riscv-low.cc:140:19: error: 'ELF_NFPREG' was not declared in this scope; did you mean 'ELF_NGREG'?
  140 |   for (i = 0; i < ELF_NFPREG - 1; i++, regbuf += flen)
      |                   ^~~~~~~~~~
      |                   ELF_NGREG

musl fixed the issue with
e5d2823631

Fixes:
 - http://autobuild.buildroot.org/results/16b19198980ce9c81a618b3f6e8dc9fe28247a28

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[yann.morin.1998@free.fr: use upstream repository for commit references]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-11-11 22:24:01 +01:00
Peter Seiderer
2f7598034c package/gdb: fix gdb-10.2 compile for uclibc < v1.0.35 (getrandom related)
- fix getrandom compile for uclibc < v1.0.35, add missing stddef.h
  include (fixed in uclibc since v1.0.35, see [1])

Fixes:

  - http://autobuild.buildroot.net/results/6d4a62c703c85dd993ddb2d90ebe1f6cad24e0b0

  .../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name ‘size_t’
     27 | extern int getrandom(void *__buf, size_t count, unsigned int flags)
        |                                   ^~~~~~

[1] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=00972c02c2b6e0a95d5def4a71bdfb188e091782t

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-11-06 11:50:05 +01:00
Peter Seiderer
35870e2078 package/gdb: fix host gdb-11.1 compile with simulator enabled and glibc >= 2.34
- add upstream patch to avoid host gdb-11.1 compile failure with simulator
  enabled and glibc >= 2.34

Fixes:

  targ-map.c:412:17: error: initializer element is not constant
    412 |   { "SIGSTKSZ", SIGSTKSZ, TARGET_SIGSTKSZ },
        |                 ^~~~~~~~

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-11-06 11:49:48 +01:00
Thomas Petazzoni
5b2a5cd386 package/gdb: drop support for version 8.3.x
Now that gdb 11.x has been added, that 10.x is the default, we can
drop version 8.3.x.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-10-10 19:40:18 +02:00
Thomas Petazzoni
02972acf3f package/gdb: switch to gdb 10.x as the default
When doing this, we can simplify the RISC-V related logic. Indeed, as
there was no support for RISC-V in gdb 9.x, which was the current
default, we had some trickery in the Config.in file to ensure gdb 10.x
was used by default on RISC-V. However now that 10.x is the default
for everybody, this trickery is no longer needed.

Also, we now needs to enable BR2_PACKAGE_GDB_TOPLEVEL when host-gdb is
not built, as the default target gdb version is 10.x, and threfore
requires BR2_PACKAGE_GDB_TOPLEVEL=y.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-10-10 19:37:45 +02:00
Michael Fischer
bc7322fe54 package/gdb: add support for gdb 11.x
All patch from gdb 10.2 are kept.

Starting from version 11.x, gdb needs the gmp library. The target
variant needs a bit of care: if BR2_GDB_VERSION_11 is not set, either
the host gdb is not enabled, in which case the default for the target
gdb is 9.x, or the host gdb is enabled, and another version is selected.

Signed-off-by: Michael Fischer <mf@go-sys.de>
[Thomas:
 - fix how the gmp dependency is handled
 - set BR2_PACKAGE_GDB_TOPLEVEL to y for gdb 11.x
 - fix how BR2_GDB_VERSION is set for gdb 11.x]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr:
  - only select target gmp if using gdb 11
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-10-10 19:35:40 +02:00
Thomas Petazzoni
97f3ad7af3 package/gdb: append to dependencies in conditional
Repeat after me: "Forcing the value of <pkg>_DEPENDENCIES inside a
conditional is the root of all evil."

Repeat after me: "Forcing the value of <pkg>_DEPENDENCIES inside a
conditional is the root of all evil."

Repeat after me: "Forcing the value of <pkg>_DEPENDENCIES inside a
conditional is the root of all evil."

Repeat after me: "Forcing the value of <pkg>_DEPENDENCIES inside a
conditional is the root of all evil."

Enough? :-)

Due to this mistake, any other GDB_DEPENDENCIES defined before this
assignment were lost. For example, the host-flex host-bison added
inside the GDB_FROM_GIT==y condition were ignored if
BR2_PACKAGE_GDB_DEBUGGER.

Fixes the build of all ARC configurations that have
BR2_PACKAGE_GDB_DEBUGGER enabled.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-10-10 10:44:33 +02:00
Fabrice Fontaine
709004563b package/gdb: fix build of gdb on riscv
Build of gdb on riscv without host-gdb is broken since commit
4ecd247ead because BR2_GDB_VERSION_10 is
never defined if BR2_PACKAGE_HOST_GDB is not selected resulting in the
following build failure:

/bin/bash: line 0: cd: /tmp/instance-0/output-1/build/gdb-10.1/gdb/gdbserver: No such file or directory

So add a BR2_PACKAGE_GDB_TOPLEVEL hidden option as suggested by Thomas
Petazzoni.

Fixes:
 - http://autobuild.buildroot.org/results/ce47d616ee79d5f735779570ebc3b4a9c0f64c6a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-08-19 22:53:22 +02:00
Michael Fischer
2ee1063136 package/gdb: bump version 10.x to 10.2
Signed-off-by: Michael Fischer <mf@go-sys.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-08-19 22:51:46 +02:00
Thomas De Schampheleire
5609c63f0b package/gdb: fix gdb segfault with Python 3.9 support
When enabling Python 3 support in gdb < 10, gdb segfaults at startup.

The issue is was resolved by the following upstream gdb commit,
present since gdb 10.1:

    commit c47bae859a5af0d95224d90000df0e529f7c5aa0
    Author: Kevin Buettner <kevinb@redhat.com>
    Date:   Wed May 27 20:05:40 2020 -0700

        Fix Python3.9 related runtime problems
        [...]

This commit backports this fix to all relevant gdb versions supported
in Buildroot.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-07-25 22:34:26 +02:00
Romain Naour
4ecd247ead package/gdb: enable gdbserver support for riscv
It turn out that gdbserver support for riscv is available since 10.1 release, since commit [1].

Restrict the gdb version choice for riscv to 10.1 for simplicity [2].

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=bf84f7066626c78884436e1c39fb60f04c665f21
[2] http://lists.busybox.net/pipermail/buildroot/2021-June/312681.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-07-18 13:54:38 +02:00
Romain Naour
4de251ea41 package/gdb: improve gdb version choice comment
The comment has been introduced by commit [1] where the latest
gdb version has been used when cross-gdb is not enabled.

But since then the gdb package doesn't use the latest gdb version when
cross-gdb is not enabled. It's the "stable" version.

[1] https://git.buildroot.net/buildroot/commit/?id=fda818390b5e6a585608f4523356eafa0c587f53

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-06-13 12:15:47 +02:00
Romain Naour
8eac45e6cf package/gdb: enable nios2
It turn out that gdb/gdbserver support for nios2 is available since 7.7 release, since commit [1] [2].

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=a1217d97c4b0449d052fad3d2df2ab58b48f918c
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=68f5f83833e21b8c8466fe852b403b81db227ce4

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2021-06-13 12:09:52 +02:00
Fabrice Fontaine
8d7ac28707 package/gdb: fix gdbserver build with m68k and uclibc
Allow to build gdbserver with m68k and uclibc. This patch is not needed
for version above 9.2 because build_gdbserver as been
moved to its own file since
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=919adfe8409211c726c1d05b47ca59890ee648f1

This new file (gdbserver/configure.srv) does not seem to be affected by
this issue

Fixes:
 - http://autobuild.buildroot.org/results/f4d6d9d8418c0da48a3db4ad5a82e19bd16eae34

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-05-27 17:25:02 +02:00
Matt Weber
63332c33aa package: provide CPE ID details for numerous packages
This patch adds CPE ID information for a significant number of
packages.

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-01-04 21:43:54 +01:00
Titouan Christophe
ae18c6bbaf package/gdb: enable python3 support
gdb python support now uses Python3 if python3 is selected, otherwise
uses python(2) as before.

Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
[yann.morin.1998@free.fr: drop the gdb-python-config duplication]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-12-31 14:44:04 +01:00
Yann E. MORIN
8f6e333f96 package/gdb: do not hard-code python version in gdb-python-config
The gdb-python-config simulates a python-2.7, with a hard-coded 2.7
version.

gdb also supports running with python3 nowadays, so prepare the wrapper
to return appropriate values.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-12-31 14:44:03 +01:00
Yann E. MORIN
7fe40110e8 package/gdb: cleanup in gdb-python-config
There was a mix of leading spaces and TABs. Szitch to using only spaces.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-12-31 14:44:01 +01:00
Thomas Petazzoni
86c779ee0d package/gdb: drop gdb 8.2
With the introduction of gdb 10.1, we now have four versions of gdb
supported, so let's drop support for the oldest.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-12-29 22:43:14 +01:00
Thomas Petazzoni
1e0a56c370 package/gdb: make gdb 9.2 the default version
Now that we have added gdb 10.1, let's switch to using gdb 9.2 as the
default version.

Noe that there previously was a discrepancy between the default when a
host gdb was enabled, and when it was not: in the ofrmer case, the
default was 8.3.x, while for the latter it was 8.2.x. Now both are
aligned to 9.2.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: add blurb about previous version discrepancy]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-12-29 22:41:17 +01:00
Thomas Petazzoni
39267b5b1e package/gdb: add support for gdb 10.x
All patches from gdb 9.2 are kept, except
0006-sim-ppc-Fix-linker-error-with-fno-common.patch which is
upstream. The other patches are rebased to accommodate some code
re-organization in gdb 10.x, especially the move of the gdbserver code
from gdb/gdbserver/ to gdbserver/.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-12-29 22:40:36 +01:00
Evgeniy Didin
0791abfba0 toolchain: update ARC tools to arc-2020.09-release
This commit bumps ARC toolchain to arc-2020.09-release.

ARC GNU tools of version arc-2020.09-release bring some quite significant
changes like:
* Binutils 2.34.50 with additional ARC patches
* GCC 10.0.2 with additional ARC patches
* GDB 10.0.50 with additional ARC patches

Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: arc-buildroot@synopsys.com
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-11-03 20:10:08 +01:00
Thomas Petazzoni
71719b91ee package/gdb: also disable gprof
When gdb is built from sources fetched from Git, it contains both the
gdb and the binutils code base. In order to really build only gdb, we
disable a number of binutils components in the
GDB_DISABLE_BINUTILS_CONF_OPTS variable: --disable-binutils,
--disable-ld, --disable-gas, etc. However, gprof was still being
built, so disable it as well.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-09-30 22:47:10 +02:00
Thomas Petazzoni
81ef52b630 package/gdb: fix build of gdbserver-only on the ARC gdb version
The GDB version used on ARC is based on a recent gdb code base, post
gdb 9.2. This recent gdb code base, which pre-figures what will be in
gdb 10, has a significant change: gdbserver is not longer in
gdb/gdbserver, but at the top-level, and the mechanism to build
gdbserver only has changed. Due to this change, a build of ARC GDB for
gdbserver only fails with:

/bin/bash: line 0: cd: /opt/output/build/gdb-arc-2020.03-release-gdb/gdb/gdbserver: No such file or directory

This commit adjusts gdb.mk to support four cases:

 - "old" gdb, gdbserver only
 - "old" gdb, with the gdb debugger (and optionally gdbserver as well)
 - "new" gdb, gdbserver only
 - "new" gdb, with the gdb debugger (and optionally gdbserver as well)

A boolean GDB_GDBSERVER_TOPLEVEL is introduced to differentiate
between the old and new gdb, it is set to "y" for gdb versions that
have the gdbserver code at the top-level. For now, only the ARC
version sets it, but in the future, upstream gdb version 10 will also
have to set it.

Here is the behavior, for each case:

 (1) "old" gdb, gdbserver only

     We set GDB_SUBDIR to gdb/gdbserver, so only the configure script
     in this folder gets called.

     --enable-gdbserver --disable-gdb are passed in CONF_OPTS.

 (2) "old" gdb, with the gdb debugger (and optionally gdbserver as well)

     We set GDB_SUBDIR to build/, an empty directory which allows to
     do an out of tree build, which is mandatory for a full gdb build
     since gdb 9.x.

     --enable-gdb is passed in CONF_OPTS as well as --enable-gdbserver
     or --disable-gdbserver depending on whether gdbserver is enabled
     as well.

 (3) "new" gdb, gdbserver only

     We set GDB_SUBDIR to build/, an empty directory which allows to
     do an out of tree build, which is mandatory for a full gdb build
     since gdb 9.x.

     --enable-gdbserver --disable-gdb are passed in CONF_OPTS.

 (4) "new" gdb, with the gdb debugger (and optionally gdbserver as well)

     We set GDB_SUBDIR to build/, an empty directory which allows to
     do an out of tree build, which is mandatory for a full gdb build
     since gdb 9.x.

     --enable-gdb is passed in CONF_OPTS as well as --enable-gdbserver
     or --disable-gdbserver depending on whether gdbserver is enabled
     as well.

In addition to these changes, some related changes are done as well:

 - We re-enable building both gdb and gdbserver on ARC, as it works
   again.

 - We only pass --with-curses when curses is really provided, i.e when
   the full debugger is being built.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Tested-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-09-30 22:47:09 +02:00
Maxim Kochetkov
44b2b68ebe package/gdb: fix gdb 9.2 build with gcc 10 on ppc
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-09-27 09:06:48 +02:00
Thomas Petazzoni
a57e123b83 package/gdb: drop support for gdb 8.1
Now that gdb 9.2 has been introduced, and gdb 8.3 is the default gdb
version, we can drop the oldest gdb version, 8.1.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-08-17 12:04:46 +02:00
Thomas Petazzoni
259c9a488a package/gdb: switch to gdb 8.3 as the default
Now that we have added support for gdb 9.2, let's switch to gdb 8.3 as
the default.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-08-17 12:04:46 +02:00
Maxim Kochetkov
5377f8de7a package/gdb: bump to version 9.2
The in-tree build restriction has been added after the move of gnulib
to top level [1] [2].  This restriction has been added as a workaround
a build issue with gdbserver that still uses its own copy of gnulib.

gnulib is configured a second time if we build in-tree gdb and gdbserver:

    configure: error: source directory already configured; run "make distclean" there first
    configure: error: .././../../gnulib/configure failed for build-gnulib-gdbserver
    configure: error: ./configure failed for gdbserver

Use the same pre-configure-hook as gcc package.

Older gdb version support building out of tree even if it's not
required.

There is no in-tree build restriction of we only build gdbserver for
the target.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=73cc72729a184f00bf6fc4d74684a8516ba6b683
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=043a0010933a6b55081535ecaf7fde9cc1491be0

See:
https://sourceware.org/pipermail/gdb-announce/2020/000122.html
https://sourceware.org/pipermail/gdb-announce/2020/000123.html

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
[Romain:
    - add in-tree build support
    - improve commit log]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-08-17 12:04:46 +02:00