Skip to contentSkip to conversation

crash: build bundled GDB with GNU C++17

PATCH In review Wang Mingyu 2 participants 3 messages Jun 16 – Jun 24

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crash: build bundled GDB with GNU C++17

From: Wang Mingyu <[email protected]>

The GDB 10.2 sources still rely on std::allocator::construct, which was removed in C++20.

This causes the build to fail with errors such as:

default-init-alloc.h:52:12: error:
'construct' has not been declared in 'class std::allocator<...>'

Explicitly build the C++ sources with GNU C++17 to retain compatibility with the bundled GDB sources.

---
 meta-oe/recipes-kernel/crash/crash.inc | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/crash/crash.inc +1 -0
index 3c9a99ae4a..cd40ffb9e0 100644
@@ -44,6 +44,7 @@ COMPATIBLE_HOST:riscv32 = "null"
 COMPATIBLE_HOST:mipsarchn64 = "null"
 COMPATIBLE_HOST:mipsarchn32 = "null"
 
+CXXFLAGS += "-std=gnu++17"
 
 EXTRA_OEMAKE = 'RPMPKG="${PV}" \
                 GDB_TARGET="${TARGET_SYS}" \
Signature · 1 line
2.43.0
#1 lore raw

I submitted a small patch.
I would greatly appreciate it if someone could take a quick look and let me know if there is any issue with the patch, or if it can be merged. I’m happy to revise it if needed.

--
Best Regards
---------------------------------------------------
Wang Mingyu
FUJITSU NANJING SOFTWARE TECHNOLOGY CO., LTD. (FNST) No.6 Wenzhu Road, Nanjing, 210012, China TEL:+86+25-86630566--8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]

Quoted 40 lines

-----Original Message-----
From: Wang Mingyu <[email protected]>
Sent: Tuesday, June 16, 2026 2:54 PM
To: [email protected]
Cc: Wang, Mingyu/王 鸣瑜 <[email protected]>
Subject: [oe] [meta-oe] [PATCH] crash: build bundled GDB with GNU C++17

From: Wang Mingyu <[email protected]>

The GDB 10.2 sources still rely on std::allocator::construct, which was removed in C++20.

This causes the build to fail with errors such as:

default-init-alloc.h:52:12: error:
'construct' has not been declared in 'class std::allocator<...>'

Explicitly build the C++ sources with GNU C++17 to retain compatibility with the bundled GDB sources.

---
 meta-oe/recipes-kernel/crash/crash.inc | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/crash/crash.inc +1 -1
index 3c9a99ae4a..cd40ffb9e0 100644
@@ -44,6 +44,7 @@ COMPATIBLE_HOST:riscv32 = "null"
 COMPATIBLE_HOST:mipsarchn64 = "null"
 COMPATIBLE_HOST:mipsarchn32 = "null"
 
+CXXFLAGS += "-std=gnu++17"
 
 EXTRA_OEMAKE = 'RPMPKG="${PV}" \
                 GDB_TARGET="${TARGET_SYS}" \
--

2.43.0

#2 lore raw

I was watching, https://github.com/openembedded/meta-openembedded/pull/1056
and expecting this to be ready before considering this patch as it is a workaround. But sadly it is still not ready
meanwhile it would make sense to take this in.

Quoted 71 lines · wangmy via lists.openembedded.org

I submitted a small patch.
I would greatly appreciate it if someone could take a quick look and let me know if there is any issue with the patch, or if it can be merged. I’m happy to revise it if needed.

--
Best Regards
---------------------------------------------------
Wang Mingyu
FUJITSU NANJING SOFTWARE TECHNOLOGY CO., LTD. (FNST) No.6 Wenzhu Road, Nanjing, 210012, China TEL:+86+25-86630566--8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: [email protected]

Quoted 10 lines

-----Original Message-----
From: Wang Mingyu <[email protected]>
Sent: Tuesday, June 16, 2026 2:54 PM
To: [email protected]
Cc: Wang, Mingyu/王 鸣瑜 <[email protected]>
Subject: [oe] [meta-oe] [PATCH] crash: build bundled GDB with GNU C++17

From: Wang Mingyu <[email protected]>

The GDB 10.2 sources still rely on std::allocator::construct, which was

removed

Quoted 8 lines

in C++20.

This causes the build to fail with errors such as:

default-init-alloc.h:52:12: error:
'construct' has not been declared in 'class std::allocator<...>'

Explicitly build the C++ sources with GNU C++17 to retain compatibility

with the

Quoted 21 lines

bundled GDB sources.

---
 meta-oe/recipes-kernel/crash/crash.inc | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-kernel/crash/crash.inc +1 -1
index 3c9a99ae4a..cd40ffb9e0 100644
@@ -44,6 +44,7 @@ COMPATIBLE_HOST:riscv32 = "null"
 COMPATIBLE_HOST:mipsarchn64 = "null"
 COMPATIBLE_HOST:mipsarchn32 = "null"
 
+CXXFLAGS += "-std=gnu++17"
 
 EXTRA_OEMAKE = 'RPMPKG="${PV}" \
                 GDB_TARGET="${TARGET_SYS}" \
--
Quoted 1 line

2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#127702):
https://lists.openembedded.org/g/openembedded-devel/message/127702
Mute This Topic: https://lists.openembedded.org/mt/119829667/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-