mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-71052: Add Android build script and instructions (#116426)
This commit is contained in:
parent
50f9b0b1e0
commit
3ec57307e7
7 changed files with 401 additions and 17 deletions
27
configure
generated
vendored
27
configure
generated
vendored
|
|
@ -17595,13 +17595,21 @@ fi
|
|||
if test "$ac_sys_system" = "Linux-android"; then
|
||||
# When these functions are used in an unprivileged process, they crash rather
|
||||
# than returning an error.
|
||||
privileged_funcs="chroot initgroups setegid seteuid setgid setregid setresgid
|
||||
setresuid setreuid setuid"
|
||||
blocked_funcs="chroot initgroups setegid seteuid setgid sethostname
|
||||
setregid setresgid setresuid setreuid setuid"
|
||||
|
||||
# These functions are unimplemented and always return an error.
|
||||
unimplemented_funcs="sem_open sem_unlink"
|
||||
# These functions are unimplemented and always return an error
|
||||
# (https://android.googlesource.com/platform/system/sepolicy/+/refs/heads/android13-release/public/domain.te#1044)
|
||||
blocked_funcs="$blocked_funcs sem_open sem_unlink"
|
||||
|
||||
for name in $privileged_funcs $unimplemented_funcs; do
|
||||
# Before API level 23, when fchmodat is called with the unimplemented flag
|
||||
# AT_SYMLINK_NOFOLLOW, instead of returning ENOTSUP as it should, it actually
|
||||
# follows the symlink.
|
||||
if test "$ANDROID_API_LEVEL" -lt 23; then
|
||||
blocked_funcs="$blocked_funcs fchmodat"
|
||||
fi
|
||||
|
||||
for name in $blocked_funcs; do
|
||||
as_func_var=`printf "%s\n" "ac_cv_func_$name" | $as_tr_sh`
|
||||
|
||||
eval "$as_func_var=no"
|
||||
|
|
@ -22156,6 +22164,10 @@ fi
|
|||
done
|
||||
fi
|
||||
|
||||
# On Android before API level 23, clock_nanosleep returns the wrong value when
|
||||
# interrupted by a signal (https://issuetracker.google.com/issues/216495770).
|
||||
if ! { test "$ac_sys_system" = "Linux-android" &&
|
||||
test "$ANDROID_API_LEVEL" -lt 23; }; then
|
||||
|
||||
for ac_func in clock_nanosleep
|
||||
do :
|
||||
|
|
@ -22166,7 +22178,7 @@ then :
|
|||
|
||||
else $as_nop
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_nanosleep in -lrt" >&5
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_nanosleep in -lrt" >&5
|
||||
printf %s "checking for clock_nanosleep in -lrt... " >&6; }
|
||||
if test ${ac_cv_lib_rt_clock_nanosleep+y}
|
||||
then :
|
||||
|
|
@ -22204,7 +22216,7 @@ printf "%s\n" "$ac_cv_lib_rt_clock_nanosleep" >&6; }
|
|||
if test "x$ac_cv_lib_rt_clock_nanosleep" = xyes
|
||||
then :
|
||||
|
||||
printf "%s\n" "#define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h
|
||||
printf "%s\n" "#define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
|
@ -22213,6 +22225,7 @@ fi
|
|||
fi
|
||||
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
for ac_func in nanosleep
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue