-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
$CPP invocation in configure must use $CPPFLAGS #71640
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
Comments
Motivation: Android NDK is deprecating GCC and moving ot Clang/LLVM. From [1]: We strongly recommend switching to Clang. This patch fixes the only one problem when migrating GCC to Clang. In my build script, With such a configuration, most Python parts builds well. Just something wrong - extensions as built as xyz.cpython-36m-x86_64-linux-gnu.so. My patch just fixes $(PLATFORM_TRIPLET) detection. [1] https://developer.android.com/ndk/downloads/revision_history.html |
With configure run as './configure CC="$(CC)" ...' and when CC is set to: and building for armv7 on android-21, then configure runs $CPP as: checking for CPP... clang --sysroot=/opt/android-ndk/platforms/android-21/arch-arm -target armv7-none-linux-androideabi -gcc-toolchain /opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -E as can be seen by inserting in configure.ac: and the shared libraries are named 'module_name.cpython-36m-arm-linux-gnueabi.so'. OTOH, the 'configure' script runs its own preprocessings with the following idiom: where 'ac_cpp' is set to ac_cpp='$CPP $CPPFLAGS'. PLATFORM_TRIPLETs are specific to multiarch systems such as debian and should not be relied upon on Android, but they should not be entirely wrong of course. |
Several days ago I have once tried to set |
ndk-clang-preprocessor.patch LGTM. |
New changeset 4cb94e561e2d by Xavier de Gaye in branch '3.5': New changeset 92b3ce7ca95c by Xavier de Gaye in branch 'default': |
Thanks for the patch Chi Hsuan Yen! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: