소스 검색

Merge branch 'master' into fpga

Nathalie Furmento 4 년 전
부모
커밋
066f31332e
2개의 변경된 파일125개의 추가작업 그리고 38개의 파일을 삭제
  1. 5 38
      configure.ac
  2. 120 0
      m4/libs.m4

+ 5 - 38
configure.ac

@@ -667,6 +667,7 @@ if test x$enable_mpi = xyes ; then
 	    CXXFLAGS="$CXXFLAGS -fPIC"
 	    NVCCFLAGS="$NVCCFLAGS --compiler-options -fPIC"
 	    FFLAGS="$FFLAGS -fPIC"
+	    FCLAGS="$FFLAGS -fPIC"
         fi
     fi
 fi
@@ -2055,10 +2056,10 @@ if test x$enable_debug = xyes; then
 	FCFLAGS="$FCFLAGS -O0"
 	enable_spinlock_check=yes
 	if test x$GCC = xyes; then
-		CFLAGS="$CFLAGS -Og"
-		CXXFLAGS="$CXXFLAGS -Og"
-		FFLAGS="$FFLAGS -Og"
-		FCFLAGS="$FCFLAGS -Og"
+	   	IS_SUPPORTED_CFLAG(-Og)
+	   	IS_SUPPORTED_CXXFLAG(-Og)
+	   	IS_SUPPORTED_FFLAG(-Og)
+	   	IS_SUPPORTED_FCFLAG(-Og)
 		if test x$starpu_windows != xyes ; then
 			if test x$enable_fstack_protector_all = xyes ; then
 			   CFLAGS="$CFLAGS -fstack-protector-all"
@@ -2565,40 +2566,6 @@ AC_DEFINE_UNQUOTED(STARPU_MAXMPKERNELS, [$maxmpkernels],
 #                                                                             #
 ###############################################################################
 
-# IS_SUPPORTED_CFLAG(flag)
-# ------------------------
-# Check if the CFLAGS `flag' is supported by the compiler
-AC_DEFUN([IS_SUPPORTED_CFLAG],
-[
-	AC_REQUIRE([AC_PROG_CC])
-
-	AC_MSG_CHECKING([whether compiler support $1])
-
-	SAVED_CFLAGS="$CFLAGS"
-	CFLAGS="$1" # -we10006"
-
-	AC_LINK_IFELSE(
-		AC_LANG_PROGRAM(
-			[[]],
-			[[
-				AC_LANG_SOURCE([
-					const char *hello = "Hello World";
-				])
-			]]
-		),
-		[
-			m4_default_nblank([$2], [GLOBAL_AM_CFLAGS="$GLOBAL_AM_CFLAGS $1"])
-			AC_MSG_RESULT(yes)
-			option_available=1
-		],
-		[
-			AC_MSG_RESULT(no)
-			option_available=0
-		]
-	)
-	CFLAGS="$SAVED_CFLAGS"
-])
-
 IS_SUPPORTED_CFLAG(-Wall)
 IS_SUPPORTED_CFLAG(-Werror=implicit)
 IS_SUPPORTED_CFLAG(-Werror=implicit-function-declaration)

+ 120 - 0
m4/libs.m4

@@ -71,3 +71,123 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM(
 		 AC_MSG_RESULT(yes)],
 		[AC_MSG_RESULT(no)])
 ])dnl
+
+# IS_SUPPORTED_CFLAG(flag)
+# ------------------------
+# Check if the CFLAGS `flag' is supported by the compiler
+AC_DEFUN([IS_SUPPORTED_CFLAG],
+[
+	AC_REQUIRE([AC_PROG_CC])
+	AC_MSG_CHECKING([whether C compiler support $1])
+
+	SAVED_CFLAGS="$CFLAGS"
+	CFLAGS="$1"
+
+	AC_LINK_IFELSE(
+		AC_LANG_PROGRAM(
+			[[]],
+			[[AC_LANG_SOURCE([const char *hello = "Hello World";])]]
+		),
+		[
+			m4_default_nblank([$2], [GLOBAL_AM_CFLAGS="$GLOBAL_AM_CFLAGS $1"])
+			AC_MSG_RESULT(yes)
+			option_available=1
+		],
+		[
+			AC_MSG_RESULT(no)
+			option_available=0
+		]
+	)
+	CFLAGS="$SAVED_CFLAGS"
+])
+
+# IS_SUPPORTED_CXXFLAG(flag)
+# ------------------------
+# Check if the CFLAGS `flag' is supported by the compiler
+AC_DEFUN([IS_SUPPORTED_CXXFLAG],
+[
+	AC_REQUIRE([AC_PROG_CXX])
+	AC_LANG_PUSH([C++])
+	AC_MSG_CHECKING([whether CXX compiler support $1])
+
+	SAVED_CXXFLAGS="$CXXFLAGS"
+	CXXFLAGS="$1"
+
+	AC_LINK_IFELSE(
+		AC_LANG_PROGRAM(
+			[[]],
+			[[AC_LANG_SOURCE([const char *hello = "Hello World";])]]
+		),
+		[
+			m4_default_nblank([$2], [GLOBAL_AM_CFLAGS="$GLOBAL_AM_CXXFLAGS $1"])
+			AC_MSG_RESULT(yes)
+			option_available=1
+		],
+		[
+			AC_MSG_RESULT(no)
+			option_available=0
+		]
+	)
+	CXXFLAGS="$SAVED_CXXFLAGS"
+	AC_LANG_POP([C++])
+])
+
+# IS_SUPPORTED_FFLAG(flag)
+# ------------------------
+# Check if the FFLAGS `flag' is supported by the compiler
+AC_DEFUN([IS_SUPPORTED_FFLAG],
+[
+	AC_LANG_PUSH([Fortran 77])
+	AC_MSG_CHECKING([whether Fortran 77 compiler support $1])
+
+	SAVED_FFLAGS="$FFLAGS"
+	FFLAGS="$1"
+
+	AC_LINK_IFELSE(
+		AC_LANG_PROGRAM(
+			[],
+			[[AC_LANG_SOURCE([])]]
+		),
+		[
+			m4_default_nblank([$2], [GLOBAL_AM_FFLAGS="$GLOBAL_AM_FFLAGS $1"])
+			AC_MSG_RESULT(yes)
+			option_available=1
+		],
+		[
+			AC_MSG_RESULT(no)
+			option_available=0
+		]
+	)
+	FFLAGS="$SAVED_FFLAGS"
+	AC_LANG_POP([Fortran 77])
+])
+
+# IS_SUPPORTED_FCFLAG(flag)
+# ------------------------
+# Check if the FCLAGS `flag' is supported by the compiler
+AC_DEFUN([IS_SUPPORTED_FCFLAG],
+[
+	AC_LANG_PUSH([Fortran])
+	AC_MSG_CHECKING([whether Fortran compiler support $1])
+
+	SAVED_FCFLAGS="$FCFLAGS"
+	FCFLAGS="$1"
+
+	AC_LINK_IFELSE(
+		AC_LANG_PROGRAM(
+			[],
+			[[AC_LANG_SOURCE([])]]
+		),
+		[
+			m4_default_nblank([$2], [GLOBAL_AM_FCFLAGS="$GLOBAL_AM_FCFLAGS $1"])
+			AC_MSG_RESULT(yes)
+			option_available=1
+		],
+		[
+			AC_MSG_RESULT(no)
+			option_available=0
+		]
+	)
+	FCFLAGS="$SAVED_FCFLAGS"
+	AC_LANG_POP([Fortran])
+])