@@ -3818,20 +3818,37 @@ AC_MSG_RESULT([$SHLIBS])
38183818dnl perf trampoline is Linux and macOS specific and requires an arch-specific
38193819dnl trampoline in assembly.
38203820AC_MSG_CHECKING ( [ perf trampoline] )
3821+ PERF_TRAMPOLINE_OBJ=""
38213822AS_CASE ( [ $PLATFORM_TRIPLET] ,
3822- [ x86_64-linux-gnu] , [ perf_trampoline=yes] ,
3823- [ aarch64-linux-gnu] , [ perf_trampoline=yes] ,
3823+ [ x86_64-linux-gnu] , [ perf_trampoline=yes
3824+ PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_x86_64.o] ,
3825+ [ aarch64-linux-gnu] , [ perf_trampoline=yes
3826+ PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_aarch64.o] ,
38243827 [ darwin] , [ AS_CASE ( [ $MACOSX_DEPLOYMENT_TARGET] ,
38253828 [ [ 10.[ 0-9] |10.1[ 0-1] ] ] , [ perf_trampoline=no] ,
3826- [ perf_trampoline=yes]
3829+ [ perf_trampoline=yes
3830+ if test "${enable_universalsdk}" && test "$UNIVERSAL_ARCHS" = "universal2"; then
3831+ PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_universal2.o
3832+ else
3833+ case "$host_cpu" in
3834+ x86_64)
3835+ PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_x86_64.o
3836+ ;;
3837+ aarch64|arm64)
3838+ PERF_TRAMPOLINE_OBJ=Python/asm_trampoline_aarch64.o
3839+ ;;
3840+ *)
3841+ perf_trampoline=no
3842+ ;;
3843+ esac
3844+ fi]
38273845 ) ] ,
38283846 [ perf_trampoline=no]
38293847)
38303848AC_MSG_RESULT ( [ $perf_trampoline] )
38313849
38323850AS_VAR_IF ( [ perf_trampoline] , [ yes] , [
38333851 AC_DEFINE ( [ PY_HAVE_PERF_TRAMPOLINE] , [ 1] , [ Define to 1 if you have the perf trampoline.] )
3834- PERF_TRAMPOLINE_OBJ=Python/asm_trampoline.o
38353852] )
38363853AC_SUBST ( [ PERF_TRAMPOLINE_OBJ] )
38373854
0 commit comments