toolchain/gdb: backport patch for macOS to fix invalid range
authorJosef Schlehofer <pepe.schlehofer@gmail.com>
Sun, 28 Apr 2024 21:04:03 +0000 (23:04 +0200)
committerRISCi_ATOM <bob@bobcall.me>
Wed, 15 May 2024 15:37:36 +0000 (11:37 -0400)
commit5653a7f40aabc75123d36336a848b1db1bfe9589
treefe740e9938db440ea518db0812287e4e0fea4987
parent5e46fcf2aaa121d260643a948f3e5b3aa2ec8573
toolchain/gdb: backport patch for macOS to fix invalid range

With the recent macOS update to Ventura, it looks like gdb could not be
compiled with clang16 and newer version, because it fails with:
./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
    integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
                                                   ^
./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 1] for this enumeration type [-Wenum-constexpr-conversion]
./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
4 errors generated.

- Upstream bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=30423

- Backported upstream commit:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae61525fcf456ab395d55c45492a106d1275873a

Fixes: https://github.com/openwrt/openwrt/issues/15314

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15315
Signed-off-by: Robert Marko <robimarko@gmail.com>
toolchain/gdb/patches/0001-gdbsupport-ignore-Wenum-constexpr-conversion-in-enum.patch [new file with mode: 0644]