Skip to content

crosstool-ng: Pull in the missing patches for 1.27 #974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

stephanosio
Copy link
Member

Add back the patches from zephyr-crosstool-ng-1.25.0 that were missed while porting to crosstool-ng 1.27.0.

In particular, "gdb: Add CT_GDB_CROSS_STATIC_LIBSTDCXX configuration" is absolutely critical in making the GDB executable self-contained on all host systems and usable on Windows.

Also note that the "gdb: Refactor cross GDB build step" patch initially ported by Anas is reverted because it messed up the file indentation by mixing spaces and tabs -- I have done another iteration of this with the correct indentation in this series.

"cross-gdb: Add LZMA support configuration " and "cross-gdb: Add Guile scripting support configuration" are ported as well because they are still relevant and useful. These will be eventually upstreamed.


crosstool-ng PR: zephyrproject-rtos/crosstool-ng#38

Fixes #972

Add back the patches from zephyr-crosstool-ng-1.25.0 that were missed
while porting to crosstool-ng 1.27.0.

In particular, "gdb: Add CT_GDB_CROSS_STATIC_LIBSTDCXX configuration" is
absolutely critical in making the GDB executable self-contained on all
host systems and usable on Windows.

Also note that the "gdb: Refactor cross GDB build step" patch initially
ported by Anas is reverted because it messed up the file indentation by
mixing spaces and tabs -- I have done another iteration of this with the
correct indentation in this series.

"cross-gdb: Add LZMA support configuration " and "cross-gdb: Add Guile
scripting support configuration" are ported as well because they are
still relevant and useful. These will be eventually upstreamed.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
@stephanosio stephanosio added the DNM DO NOT MERGE label Jul 22, 2025
@stephanosio
Copy link
Member Author

DNM until zephyrproject-rtos/crosstool-ng#38 is merged

@stephanosio stephanosio marked this pull request as ready for review July 22, 2025 11:49
Copy link
Member Author

@stephanosio stephanosio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that the Linux GDB executable no longer links against shared libgcc and libstdc++ after this change:

$ ldd aarch64-zephyr-elf-gdb
        linux-vdso.so.1 (0x00007a3c7628e000)
        libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6 (0x00007a3c76220000)
        libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007a3c761e8000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007a3c761e3000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007a3c75509000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007a3c761de000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007a3c75200000)
        /lib64/ld-linux-x86-64.so.2 (0x00007a3c76290000)

@stephanosio stephanosio removed the DNM DO NOT MERGE label Jul 22, 2025
@stephanosio stephanosio merged commit 9b54b7f into zephyrproject-rtos:main Jul 22, 2025
128 of 130 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SDK 0.18.0-alpha4 GDB links against shared libgcc and libstdc++
1 participant