]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-109054: Don't use libatomic on cross-compilation (#109211)
authorVictor Stinner <vstinner@python.org>
Sun, 10 Sep 2023 16:21:13 +0000 (18:21 +0200)
committerGitHub <noreply@github.com>
Sun, 10 Sep 2023 16:21:13 +0000 (18:21 +0200)
configure no longer uses libatomic by default when Python is
cross-compiled. The LIBATOMIC variable can be set manually in this
case:

    ./configure LIBATOMIC="-latomic" (...)

configure
configure.ac

index c78c45d11260f6e0ca9b3ee0c6a20c4ccd1e3e79..8326a1db06c2da06c228cd863e6cf7cf19be80f7 100755 (executable)
--- a/configure
+++ b/configure
@@ -27774,7 +27774,7 @@ then :
 else $as_nop
   if test "$cross_compiling" = yes
 then :
-  ac_cv_libatomic_needed=yes
+    ac_cv_libatomic_needed=no
 else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -27811,17 +27811,14 @@ int main()
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-
   ac_cv_libatomic_needed=no
-
 else $as_nop
-  ac_cv_libatomic_needed=yes
+    ac_cv_libatomic_needed=yes
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libatomic_needed" >&5
 printf "%s\n" "$ac_cv_libatomic_needed" >&6; }
index f833755a46601250d0be1e0f9827bb7643847983..843f2b267a5253118279166126f96cfff9ae2633 100644 (file)
@@ -7007,9 +7007,10 @@ int main()
     }
     return 0; // all good
 }
-]])],[
-  ac_cv_libatomic_needed=no
-],[ac_cv_libatomic_needed=yes],[ac_cv_libatomic_needed=yes])
+]])],
+  [ac_cv_libatomic_needed=no],  dnl build succeeded
+  [ac_cv_libatomic_needed=yes], dnl build failed
+  [ac_cv_libatomic_needed=no])  dnl cross compilation
 ])
 
 AS_VAR_IF([ac_cv_libatomic_needed], [yes],