-
Notifications
You must be signed in to change notification settings - Fork 253
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
libc++ linker scripts incorrect for LP32 API 21+ #672
Comments
While uglier implementation-wise than generating fresh linker scripts, I think we're better off having |
https://android-review.googlesource.com/c/platform/ndk/+/665595 is the r17 fix for this. Moving the cleanup to r18. |
Cleanup merged into master for r18. There's now a set of libc++.so.$API_LEVEL scripts. |
We were using the same libc++ linker script regardless of API level, and for 21+ we don't copy libandroid_support since it is not needed. In this case, rewrite the linker script after we copy it into the standalone toolchain. We should investigate a different fix for r18, but I don't think we should be making a more disruptive change this late in the r17 release. Test: ./run_tests.py --rebuild Bug: android/ndk#672 Change-Id: Ia3db77194953c5b72b12b6b4a9320444e2df3ab3 (cherry picked from commit bf1f432b543a22989e11d9e14daba0620cd4d030)
Since we only ship one libc++ linker script set (one shared, one static) in the NDK, this script no longer works for the case where libandroid_support is not used for the target API level.
make_standalone_toolchain.py
won't copy libandroid_support for android-21+ since it is not needed, but the LP32 linker scripts assume it is needed because it is for earlier API levels.I think the right solution here is to either ship multiple linker scripts (libc++.so.16, libc++.so.17, etc) for each supported API level, or to just remove them from the NDK distribution and let
make_standalone_toolchain.py
generate them.Since we're so late in the r17 release cycle, I don't think we should alter the existing linker scripts since it seems likely that non-standalone toolchain users of them already have libandroid_support on the path, and in the short term we should avoid breaking their use case since the downsides of linking libandroid_support when it is not needed are small.
For r17, we'll switch to having
make_standalone_toolchain.py
generating its own linker scripts but also preserve the existing linker scripts in the NDK. For r18 we'll either remove them or generate one per API level.The text was updated successfully, but these errors were encountered: