OSDN Git Service

* configure.ac (HAVE_GAS_LCOMM_WITH_ALIGNMENT): New assembler
[pf3gnuchains/gcc-fork.git] / gcc / configure.ac
index 49dcf34..e81b203 100644 (file)
@@ -322,13 +322,15 @@ AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)])
 # * overlong strings
 # So, we only use -pedantic if we can disable those warnings.
 
-ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
-                         -Wmissing-prototypes], [loose_warn])
-ACX_PROG_CC_WARNING_OPTS([-Wc++-compat], [cxx_compat_warn])
-ACX_PROG_CC_WARNING_OPTS([-Wold-style-definition \
-                          -Wmissing-format-attribute], [strict_warn])
-ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long -Wno-variadic-macros \
-                                    -Wno-overlength-strings], [strict_warn])
+ACX_PROG_CC_WARNING_OPTS(
+       m4_quote(m4_do([-W -Wall -Wwrite-strings -Wstrict-prototypes ],
+                      [-Wmissing-prototypes -Wcast-qual])), [loose_warn])
+ACX_PROG_CC_WARNING_OPTS(
+       m4_quote(m4_do([-Wold-style-definition -Wc++-compat ], 
+                      [-Wmissing-format-attribute])), [strict_warn])
+ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(
+       m4_quote(m4_do([-Wno-long-long -Wno-variadic-macros ], 
+                      [-Wno-overlength-strings])), [strict_warn])
 ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual], [strict_warn])
 
 # The above macros do nothing if the compiler is not GCC.  However, the
@@ -351,7 +353,7 @@ AC_ARG_ENABLE(checking,
                          enable expensive run-time checks.  With LIST,
                          enable only specific categories of checks.
                          Categories are: yes,no,all,none,release.
-                         Flags are: assert,df,fold,gc,gcac,misc,
+                         Flags are: assert,df,fold,gc,gcac,gimple,misc,
                          rtlflag,rtl,runtime,tree,valgrind,types.],
 [ac_checking_flags="${enableval}"],[
 # Determine the default checks.
@@ -367,25 +369,25 @@ do
        # these set all the flags to specific states
        yes)            ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
                        ac_fold_checking= ; ac_gc_checking=1 ;
-                       ac_gc_always_collect= ; ac_rtl_checking= ;
+                       ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
                        ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
                        ac_tree_checking=1 ; ac_valgrind_checking= ;
                        ac_types_checking=1 ;;
        no|none)        ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
                        ac_fold_checking= ; ac_gc_checking= ;
-                       ac_gc_always_collect= ; ac_rtl_checking= ;
+                       ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
                        ac_rtlflag_checking= ; ac_runtime_checking= ;
                        ac_tree_checking= ; ac_valgrind_checking= ;
                        ac_types_checking= ;;
        all)            ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
                        ac_fold_checking=1 ; ac_gc_checking=1 ;
-                       ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
+                       ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
                        ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
                        ac_tree_checking=1 ; ac_valgrind_checking= ;
                        ac_types_checking=1 ;;
        release)        ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
                        ac_fold_checking= ; ac_gc_checking= ;
-                       ac_gc_always_collect= ; ac_rtl_checking= ;
+                       ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
                        ac_rtlflag_checking= ; ac_runtime_checking=1 ;
                        ac_tree_checking= ; ac_valgrind_checking= ;
                        ac_types_checking= ;;
@@ -395,6 +397,7 @@ do
        fold)           ac_fold_checking=1 ;;
        gc)             ac_gc_checking=1 ;;
        gcac)           ac_gc_always_collect=1 ;;
+       gimple)         ac_gimple_checking=1 ;;
        misc)           ac_checking=1 ;;
        rtl)            ac_rtl_checking=1 ;;
        rtlflag)        ac_rtlflag_checking=1 ;;
@@ -423,6 +426,12 @@ if test x$ac_assert_checking != x ; then
   AC_DEFINE(ENABLE_ASSERT_CHECKING, 1,
 [Define if you want assertions enabled.  This is a cheap check.])
 fi
+if test x$ac_gimple_checking != x ; then
+  AC_DEFINE(ENABLE_GIMPLE_CHECKING, 1,
+[Define if you want operations on GIMPLE (the basic data structure of
+the high-level optimizers) to be checked for dynamic type safety at
+runtime.  This is moderately expensive.])
+fi
 GCC_TARGET_TEMPLATE(ENABLE_RUNTIME_CHECKING)
 if test x$ac_runtime_checking != x ; then
   AC_DEFINE(ENABLE_RUNTIME_CHECKING, 1,
@@ -843,7 +852,7 @@ AC_CHECK_PROG(have_mktemp_command, mktemp, yes, no)
 # that we can use it.
 ACX_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
   [GNU texinfo.* \([0-9][0-9.]*\)],
-  [4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
+  [4.[7-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
 if test $gcc_cv_prog_makeinfo_modern = no; then
   AC_MSG_WARN([
 *** Makeinfo is missing or too old.
@@ -988,7 +997,7 @@ define(gcc_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
   fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
   putchar_unlocked putc_unlocked)
 AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoll atoq \
-       sysconf strsignal getrusage nl_langinfo scandir alphasort \
+       sysconf strsignal getrusage nl_langinfo \
        gettimeofday mbstowcs wcswidth mmap mincore setlocale \
        gcc_UNLOCKED_FUNCS)
 
@@ -1011,6 +1020,7 @@ int main()
 fi
 
 AC_CHECK_TYPE(ssize_t, int)
+AC_CHECK_TYPE(caddr_t, char *)
 
 # Try to determine the array type of the second argument of getgroups
 # for the target system (int or gid_t).
@@ -1368,8 +1378,12 @@ fi
 # Make gthr-default.h if we have a thread file.
 gthread_flags=
 if test $thread_file != single; then
-  rm -f gthr-default.h
-  echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
+  echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h-t
+  if diff gthr-default.h-t gthr-default.h 2>/dev/null; then
+    rm -f gthr-default.h-t
+  else
+    mv -f gthr-default.h-t gthr-default.h
+  fi
   gthread_flags=-DHAVE_GTHR_DEFAULT
 fi
 AC_SUBST(gthread_flags)
@@ -1593,10 +1607,6 @@ do
 done
 tmake_file="${tmake_file_}"
 
-# This is a terrible hack which will go away some day.
-host_cc_for_libada=${CC}
-AC_SUBST(host_cc_for_libada)
-
 out_object_file=`basename $out_file .c`.o
 
 tm_file_list="options.h"
@@ -2170,6 +2180,31 @@ changequote([,])dnl
   [AC_DEFINE(HAVE_AS_LEB128, 1,
     [Define if your assembler supports .sleb128 and .uleb128.])])
 
+# Check if we have assembler support for unwind directives.
+gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive,
+  ,,
+[      .text
+       .cfi_startproc
+       .cfi_offset 0, 0
+       .cfi_same_value 1
+       .cfi_def_cfa 1, 2
+       .cfi_escape 1, 2, 3, 4, 5
+       .cfi_endproc])
+AC_DEFINE_UNQUOTED(HAVE_GAS_CFI_DIRECTIVE,
+  [`if test $gcc_cv_as_cfi_directive = yes; then echo 1; else echo 0; fi`],
+  [Define 0/1 if your assembler supports CFI directives.])
+
+gcc_GAS_CHECK_FEATURE([cfi personality directive],
+  gcc_cv_as_cfi_personality_directive, ,,
+[      .text
+       .cfi_startproc
+       .cfi_personality 0, symbol
+       .cfi_endproc])
+AC_DEFINE_UNQUOTED(HAVE_GAS_CFI_PERSONALITY_DIRECTIVE,
+  [`if test $gcc_cv_as_cfi_personality_directive = yes;
+    then echo 1; else echo 0; fi`],
+  [Define 0/1 if your assembler supports .cfi_personality.])
+
 # GAS versions up to and including 2.11.0 may mis-optimize
 # .eh_frame data.
 gcc_GAS_CHECK_FEATURE(eh_frame optimization, gcc_cv_as_eh_frame,
@@ -2996,6 +3031,21 @@ LCF0:
       [AC_DEFINE(HAVE_AS_DFP, 1,
          [Define if your assembler supports DFP instructions.])])
 
+    case $target in
+      *-*-aix*) conftest_s='   .machine "pwr7"
+       .csect .text[[PR]]
+       lxvd2x 1,2,3';;
+      *) conftest_s='  .machine power7
+       .text
+       lxvd2x 1,2,3';;
+    esac
+
+    gcc_GAS_CHECK_FEATURE([vector-scalar support],
+      gcc_cv_as_powerpc_vsx, [9,99,0], -a32,
+      [$conftest_s],,
+      [AC_DEFINE(HAVE_AS_VSX, 1,
+         [Define if your assembler supports VSX instructions.])])
+
     gcc_GAS_CHECK_FEATURE([.gnu_attribute support],
       gcc_cv_as_powerpc_gnu_attribute, [2,18,0],,
       [.gnu_attribute 4,1],,
@@ -3060,7 +3110,7 @@ esac
 case "$target" in
   i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
   | x86_64*-*-* | hppa*-*-* | arm*-*-* \
-  | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* \
+  | xstormy16*-*-* | cris-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
   | spu-*-* | fido*-*-*)
     insn="nop"
     ;;
@@ -3127,6 +3177,12 @@ if test x"$insn" != x; then
 [Define if your assembler supports the --debug-prefix-map option.])])
 fi
 
+gcc_GAS_CHECK_FEATURE([.lcomm with alignment], gcc_cv_as_lcomm_with_alignment,
+ ,,
+[.lcomm bar,4,16],,
+[AC_DEFINE(HAVE_GAS_LCOMM_WITH_ALIGNMENT, 1,
+  [Define if your assembler supports .lcomm with an alignment field.])])
+
 AC_CACHE_CHECK([assembler for tolerance to line number 0],
  [gcc_cv_as_line_zero],
  [gcc_cv_as_line_zero=no
@@ -3555,7 +3611,7 @@ lang_tree_files=
 # `language' must be a single word so is spelled singularly.
 all_languages=
 all_compilers=
-all_outputs='Makefile gccbug libada-mk'
+all_outputs='Makefile gccbug'
 # List of language makefile fragments.
 all_lang_makefrags=
 # List of language subdirectory makefiles.  Deprecated.
@@ -3833,6 +3889,15 @@ fi
 AC_ARG_VAR(GMPLIBS,[How to link GMP])
 AC_ARG_VAR(GMPINC,[How to find GMP include files])
 
+AC_ARG_VAR(PPLLIBS,[How to link PPL])
+AC_ARG_VAR(PPLINC,[How to find PPL include files])
+
+AC_ARG_VAR(CLOOGLIBS,[How to link CLOOG])
+AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files])
+if test "x${CLOOGLIBS}" != "x" ; then 
+   AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.])
+fi
+
 # Configure the subdirectories
 # AC_CONFIG_SUBDIRS($subdirs)