Quellcode durchsuchen

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

Cédric Augonnet vor 16 Jahren
Ursprung
Commit
81d9721230
1 geänderte Dateien mit 8 neuen und 4 gelöschten Zeilen
  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_CONFIG_SRCDIR(include/starpu.h)
 AC_CONFIG_AUX_DIR([build-aux])
+AC_CANONICAL_SYSTEM
 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
-AC_MSG_NOTICE([Configuring StarPU])
-
-AC_CONFIG_SRCDIR(include/starpu.h)
 
 AC_PREREQ(2.60)
 
-
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_SED
@@ -38,6 +36,12 @@ AC_PROG_LN_S
 
 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
 # some path to the CUDA code at runtime.
 AC_DEFINE_UNQUOTED(STARPUDIR, "$PWD", [location of StarPU sources])