[issue26851] android compilation and link flags

Xavier de Gaye report at bugs.python.org
Sun Jul 24 12:41:12 EDT 2016


Xavier de Gaye added the comment:

The previous patch was using awkwardly, a 'host_cpu' configure argument to specify the arm ABI and missed setting LDFLAGS for the armv7 ABI.
This patch instead uses the __ARM_ARCH macro defined by each compiler of the Android toolchains:

    echo | ./clang -target armv7-none-linux-androideabi -dM -E - | grep ARM_ARCH
      #define __ARM_ARCH 7
      #define __ARM_ARCH_7A__ 1
    echo | ./clang -target armv5te-none-linux-androideabi -dM -E - | grep ARM_ARCH
      #define __ARM_ARCH 5
      #define __ARM_ARCH_5TE__ 1
    echo | ./arm-linux-androideabi-gcc -march=armv7-a -dM -E - | grep ARM_ARCH
      #define __ARM_ARCH 7
      #define __ARM_ARCH_7A__ 1
    echo | ./arm-linux-androideabi-gcc -dM -E - | grep ARM_ARCH
      #define __ARM_ARCH_5TE__ 1
      #define __ARM_ARCH 5

Python built with clang for the armv5te target crashes as reported in issue 27606.

----------
assignee:  -> xdegaye
nosy: +doko, haypo, martin.panter
stage:  -> patch review
Added file: http://bugs.python.org/file43868/build-flags_2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26851>
_______________________________________


More information about the Python-bugs-list mailing list