Linux: Remove hardcoded lib path for x86 cross-compilation #84307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This breaks the build with our updated i686 Linux SDK which doesn't contain this path, and may not be needed at all.
This might need further work to be robust, and there's an open PR (#64366) already adding -march flags for all supported architectures, but for now we're playing it safe for 4.2.
I moved the code up to where #64366 puts it as it's more consistent with the rest of the config indeed.
#64366 is probably "better" but @hpvb and I need to double check what are the implications of adding those flags compared to letting the toolchain wrappers do the right thing, so that stays in scope for 4.3.
To be clear the only change here is the removal of
"-L/usr/lib/i386-linux-gnu"
and"-L/usr/lib/i686-linux-gnu"
linkflags when cross-compiling. Those date back toGODOT IS OPEN SOURCE
, and I assume they were for cross-compiling to i386 from x86_64 Ubuntu. The one withi686
seems bogus when cross-compiling from i386 Linux to x86_64.With these removals, I'm still able to cross-compile from x86_64 to i686 on Mageia 9:
This may break for some Debian/Ubuntu distros, would need testing. But the old flags can be restored manually by passing
LINKFLAGS="-L/usr/lib/i386-linux-gnu
toscons
.