-
-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Linux: Build with use_static_cpp=yes by default #45629
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ah I did document the issue in the commit log: godotengine/godot-build-scripts@3319757 The problem is that it seemed to cause crashes on Ubuntu 18.04 i386 for some reason: #31743 (comment). |
This enables `-static-libgcc -static-libstdc++` which help make custom Linux builds more portable (official builds have been using this option for years). For some obscure reason Ubuntu 18.04 i386 crashes when using the option for i386 builds, so let's play it safe and enable for x86_64 only for now.
9e95595
to
1ebd66d
Compare
I amended the commit to apply that change only to 64-bit, as we still need to figure out why it would crash on Ubuntu 18.04 i386 with that option. Likely a Ubuntu bug, but nasty enough not to make this the default for i386. I was lazy so this outright forces |
Cherry-picked for 3.2.4. |
After further testing it seems to work fine now when building binaries with GCC 5 on Ubuntu 16.04 (previously we were using GCC 9 on Ubuntu 14.04). Follow-up to godotengine#45629.
This enables
-static-libgcc -static-libstdc++
which help make custom Linuxbuilds more portable (official builds have been using this option for years).
Note: I need to do some tests before merging as for official builds on Ubuntu 14.04 i386 I'm actually not using those, I probably ran into issues in the past and forgot to document them...
https://github.com/godotengine/godot-build-scripts/blob/master/build-linux/build.sh#L15-L17
Edit: "Solved", see below.
Note: Distro packagers should typically set this option to
no
to keep using the distro-provided shared libgcc and libstdc++. This option is only for builds that need to be shared with users on other distros (which is the main use case for custom Godot builds, but not the one Linux distro packages).