-
Notifications
You must be signed in to change notification settings - Fork 258
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
Standalone toolchain for mips is missing a system include dir on ndk r14 #310
Comments
Sorry, I'd typed out a response to this before I left work yesterday but forgot to hit send. I'm going to give r14 a few more days to gather feedback before I kick off r14b. I think you can work around this for now by reverting the following two patches (didn't have time to test this yesterday, but it should work): Another workaround would be to use |
@DanAlbert I am from #312. I updated my build script to use
I checked the generated toolchain directory, and the file is there. Probably the same issue? |
@davidshen84 I guess the CFLAG to pass is |
@N-Bz Tried I switched back to r13b, and my builds work well. |
I've just uploaded a stack of patches to revert the broken pieces and increase our test coverage. If you want to apply the revert locally, https://android-review.googlesource.com/c/349275/ is the change that contains the fix. |
Cherry-picked into r14. |
This lets us import from the NDK's python library, so we can abstract some of this away rather than duplicating it in every similar test. This also allows our pylintrc to apply to each test. Test: ./validate.py --filter standalone_toolchain* Bug: android/ndk#310 Change-Id: Ib112cca91b56009c838bc1712c8a9285a40976c1 (cherry picked from commit 4b25333)
Test: ./validate.py --filter standalone_toolchain* Bug: android/ndk#310 Change-Id: Ie65713b0cbad177b1531ebf355e6df9baafab458 (cherry picked from commit 69b99f3)
https://android-review.googlesource.com/c/247064/ We need to drop this because neither Clang nor GCC is able to correctly find the gnustl headers if only the 32-bit ones are present. This might be worth revisiting at some point, but for now I'm just moving standalone toolchains back to the 32-bit toolchain to get things back into working condition. This change is working fine for cmake and ndk-build though, so it's only a partial revert. Tests are in the next commit so we don't accidentally revert the tests if we revisit this. Test: ./validate.py --filter standalone_toolchain_gnustl* Bug: android/ndk#310 Change-Id: I2df811c5a67db9a64d3d352e08d60f660e075012 (cherry picked from commit 40d8abb)
Test: ./validate.py --filter standalone_toolchain_gnustl* Bug: android/ndk#310 Change-Id: If40213bc55091898a8f9181228b6921882f0a5fa (cherry picked from commit 78612a5)
This lets us import from the NDK's python library, so we can abstract some of this away rather than duplicating it in every similar test. This also allows our pylintrc to apply to each test. Test: ./validate.py --filter standalone_toolchain* Bug: android/ndk#310 Change-Id: Ib112cca91b56009c838bc1712c8a9285a40976c1
Test: ./validate.py --filter standalone_toolchain* Bug: android/ndk#310 Change-Id: Ie65713b0cbad177b1531ebf355e6df9baafab458
https://android-review.googlesource.com/c/247064/ We need to drop this because neither Clang nor GCC is able to correctly find the gnustl headers if only the 32-bit ones are present. This might be worth revisiting at some point, but for now I'm just moving standalone toolchains back to the 32-bit toolchain to get things back into working condition. This change is working fine for cmake and ndk-build though, so it's only a partial revert. Tests are in the next commit so we don't accidentally revert the tests if we revisit this. Test: ./validate.py --filter standalone_toolchain_gnustl* Bug: android/ndk#310 Change-Id: I2df811c5a67db9a64d3d352e08d60f660e075012
Test: ./validate.py --filter standalone_toolchain_gnustl* Bug: android/ndk#310 Change-Id: If40213bc55091898a8f9181228b6921882f0a5fa
Description
Standalone mips 32bits c++ toolchains are missing a system include dir.
Compiling this simple c++ program with standalone mips toolchain with ndk-r14 fails:
Toolchains were generated with the following command lines:
./build/tools/make-standalone-toolchain.sh --arch=mips64 --install-dir=/tmp/toolchain_mips64/ --platform=android-21
for the mips64 toolchain (working reference)./build/tools/make-standalone-toolchain.sh --arch=mips --install-dir=/tmp/toolchain_mips/ --platform=android-21
for the mips32 toolchain (with the build issue)Program was built with the following command line:
/tmp/toolchain_mips64/bin/mips64el-linux-android-clang++ /tmp/test.cpp -o /tmp/64.out
: This causes no issue./tmp/toolchain_mips/bin/mips64el-linux-android-clang++ /tmp/test.cpp -o /tmp/32.out
: This fails with the following error (adding-mips32
flag does not change the result):When looking at the system include paths (by adding
-Wp,-v
to the build lines), we notice that the mips32 toolchain is lacking theinclude/c++/4.9.x/mips64el-linux-android
directory.Here is an output of the build with
-Wp,-v
mips64 toolchain:And the same for the mips32 toolchain:
This issue is not present on the ndk-r13b (Pkg.Revision = 13.1.3345770), which did not use the mips64el toolchain but the mipsel toolchain for 32 bits mips.
Environment Details
The text was updated successfully, but these errors were encountered: