Skip to content

Commit

Permalink
Add MULTIARCH detection for android targets in configure.ac.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaditya-chandrasekhar committed Aug 27, 2022
1 parent 408a2b1 commit 3c08108
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,10 @@ fi

AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
cat >> conftest.c <<EOF
#if __has_include(<features.h>)
#if !defined(__ANDROID__) && __has_include(<features.h>)
#include <features.h>
#endif
#if __has_include(<TargetConditionals.h>)
#if defined(__APPLE__) && __has_include(<TargetConditionals.h>)
#include <TargetConditionals.h>
#endif
#undef bfin
Expand All @@ -756,7 +756,27 @@ cat >> conftest.c <<EOF
#undef sparc
#undef unix
#if defined(__ANDROID__)
# Android is not a multiarch system.
# if defined(__aarch64__)
aarch64-linux-android
# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
# if defined(__ARMEL__)
arm-linux-androideabihf
# else
armeb-linux-androideabihf
# endif
# elif defined(__nocona__)
i786-linux-android
# elif defined(__i686__)
i686-linux-android
# elif defined(__i586__)
i586-linux-android
# elif defined(__i486__)
i486-linux-android
# elif defined(__i386__)
i386-linux-android
# elif defined(__x86_64__)
x86_64-linux-android
# endif
#elif defined(__linux__) && !defined(__GLIBC__)
# if defined(__aarch64__)
aarch64-linux-musl
Expand Down

0 comments on commit 3c08108

Please sign in to comment.