Skip to content

Can build to x86 or x86_64 with NDK? #2768

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

Closed
diamondcm opened this issue Aug 11, 2020 · 4 comments
Closed

Can build to x86 or x86_64 with NDK? #2768

diamondcm opened this issue Aug 11, 2020 · 4 comments

Comments

@diamondcm
Copy link

I found target is only armv7 and arm64

Thanks a lot

@martin-frbg
Copy link
Collaborator

The wiki only describes building for arm and arm64 as these are the most often requested cases, but as far as I know there are
NDK toolchains targeting x86 and x86_64 that can be used in the same way, just with a TARGET like NEHALEM and/or setting DYNAMIC_ARCH=1 to get optimized support for a range of x86 cpus.

@martin-frbg
Copy link
Collaborator

Rearranged the wiki page to move all the dust and cobwebs to the bottom. Have not yet tried if an x86 NDK build actually works the way I think it should though.

@martin-frbg
Copy link
Collaborator

Tested an x86 build with the current NDK (r21d) - compile-tested only as I have no Android tablet or similar to run this on.

export PATH=/opt/android-ndk-r21d/toolchains/x86-4.9/prebuilt/linux-x86_64/bin:/opt/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
export LDFLAGS="-L/opt/android-ndk-r21d/toolchains/x86-4.9/prebuilt/linux-x86_64/i686-linux-android/lib/"
make TARGET=NEHALEM NOFORTRAN=1 CC=clang HOSTCC=gcc

@martin-frbg
Copy link
Collaborator

Thanks to @lemberh the wiki page just got updated with a new section detailing compilation for ARM and X86

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

No branches or pull requests

2 participants