Przeglądaj źródła

On Darwin, gcc's default target is i386, so that atomic ops are not available
unless we explicitely target >=i486.

Cédric Augonnet 16 lat temu
rodzic
commit
81d9721230
1 zmienionych plików z 8 dodań i 4 usunięć
  1. 8 4
      configure.ac

+ 8 - 4
configure.ac

@@ -15,15 +15,13 @@
 #
 #
 
 
 AC_INIT([StarPU],0.1, [http://runtime.bordeaux.inria.fr/StarPU/], starpu)
 AC_INIT([StarPU],0.1, [http://runtime.bordeaux.inria.fr/StarPU/], starpu)
+AC_CONFIG_SRCDIR(include/starpu.h)
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_AUX_DIR([build-aux])
+AC_CANONICAL_SYSTEM
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
-AC_MSG_NOTICE([Configuring StarPU])
-
-AC_CONFIG_SRCDIR(include/starpu.h)
 
 
 AC_PREREQ(2.60)
 AC_PREREQ(2.60)
 
 
-
 AC_PROG_CC
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_CPP
 AC_PROG_SED
 AC_PROG_SED
@@ -38,6 +36,12 @@ AC_PROG_LN_S
 
 
 AC_HEADER_STDC
 AC_HEADER_STDC
 
 
+# on Darwin, GCC targets i386 by default, so we don't have atomic ops
+case "$target" in
+i386-*darwin*) CFLAGS+=" -march=i486 " ;;
+esac
+
+
 # This will be useful for program which use CUDA (and .cubin files) which need
 # This will be useful for program which use CUDA (and .cubin files) which need
 # some path to the CUDA code at runtime.
 # some path to the CUDA code at runtime.
 AC_DEFINE_UNQUOTED(STARPUDIR, "$PWD", [location of StarPU sources])
 AC_DEFINE_UNQUOTED(STARPUDIR, "$PWD", [location of StarPU sources])