Skip to content
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

gdb: Use correct arguments for static linking #2056

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

cpackham
Copy link
Contributor

As of version 13.x GDB uses libtool for linking instead of g++ these take different arguments for static linking. Commit 6146b5a ("use -all-static when building a static gdb") attempted to deal with this but had the effect of causing older GDB versions to fail to build statically. Add a new internal flag GDB_CC_LD_LIBTOOL and use this to decide whether to pass -static or -all-static.

Fixes #2053
Signed-off-by: Chris Packham judge.packham@gmail.com

As of version 13.x GDB uses libtool for linking instead of g++ these
take different arguments for static linking.  Commit 6146b5a ("use
-all-static when building a static gdb") attempted to deal with this but
had the effect of causing older GDB versions to fail to build
statically. Add a new internal flag GDB_CC_LD_LIBTOOL and use this to
decide whether to pass `-static` or `-all-static`.

Fixes crosstool-ng#2053
Signed-off-by: Chris Packham <judge.packham@gmail.com>
@cpackham cpackham merged commit daf19e1 into crosstool-ng:master Nov 2, 2023
50 checks passed
@cpackham cpackham deleted the gdb-static branch November 2, 2023 07:49
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.

GDB fails to build with static linking
1 participant