darwin.c (machopic_select_rtx_section): Use const_data_section for things that might...
[platform/upstream/gcc.git] / gcc / configure.in
index 01d3e49..20a2c35 100644 (file)
@@ -962,21 +962,16 @@ fi
 # Build, host, and target specific configuration fragments
 # --------------------------------------------------------
 
+# Collect build-machine-specific information.
+. ${srcdir}/config.build
+
+# Collect host-machine-specific information.
+. ${srcdir}/config.host
+
 target_gtfiles=
-build_xm_file=
-build_xm_defines=
-build_install_headers_dir=install-headers-tar
-build_exeext=
-host_xm_file=
-host_xm_defines=
-host_xmake_file=
-host_exeext=
-
-# Decode the host machine, then the target machine.
-# For the host machine, we save the xm_file variable as host_xm_file;
-# then we decode the target machine and forget everything else
-# that came from the host machine.
-for machine in $build $host $target; do
+
+# Collect target-machine-specific information.
+for machine in $target ; do
        . ${srcdir}/config.gcc
 done
 
@@ -1265,7 +1260,7 @@ cd $holddir
 
 # Conditionalize the makefile for this host machine.
 xmake_file=
-for f in .. ${host_xmake_file}
+for f in ${host_xmake_file}
 do
        if test -f ${srcdir}/config/$f
        then
@@ -1275,7 +1270,7 @@ done
 
 # Conditionalize the makefile for this target machine.
 tmake_file_=
-for f in .. ${tmake_file}
+for f in ${tmake_file}
 do
        if test -f ${srcdir}/config/$f
        then
@@ -1825,7 +1820,7 @@ AC_CACHE_CHECK(linker for .hidden support, gcc_cv_ld_hidden,
   fi
 else
   gcc_cv_ld_hidden=yes
-  ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
+  ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
   if echo "$ld_ver" | grep GNU > /dev/null; then
 changequote(,)dnl
     ld_vers=`echo $ld_ver | sed -n \
@@ -1859,19 +1854,10 @@ changequote(,)dnl
 changequote([,])dnl
     fi
   else
-    case "$target" in
-      mips-sgi-irix[[56]]*)
-        if test x"$gnu_ld_flag" = x"no"; then
-          # Even if using gas with .hidden support, the resulting object files
-          # cannot be linked with the IRIX 5 and IRIX 6 O32 linkers.  With
-          # the IRIX 6 N32 and N64 linkers, the problem is that the linker
-          # refuses to accept -call_shared (passed by default to the
-          # linker) and -r (used to link the object file generated without
-          # .hidden directives with one that hides symbols), so we also lose.
-          gcc_cv_ld_hidden=no
-        fi
-     ;;
-    esac
+    # non-GNU linkers don't seem to support .hidden yet
+    if test x"$gnu_ld_flag" = x"no"; then
+      gcc_cv_ld_hidden=no
+    fi
   fi
 fi])
 libgcc_visibility=no
@@ -1896,7 +1882,7 @@ L2:],
   # ??? There exists an elf-specific test that will crash
   # the assembler.  Perhaps it's better to figure out whether
   # arbitrary sections are supported and try the test.
-  as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
+  as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
   if echo "$as_ver" | grep GNU > /dev/null; then
 changequote(,)dnl
     as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
@@ -2014,7 +2000,6 @@ foo:      .long   25
        tls_first_minor=13
        ;;
   i[34567]86-*-*)
-changequote([,])dnl
     conftest_s='
        .section ".tdata","awT",@progbits
 foo:   .long   25
@@ -2161,6 +2146,34 @@ foo:     .long   25
        tls_first_minor=14
        tls_as_opt="-m64 -Aesame"
        ;;
+  sparc*-*-*)
+    conftest_s='
+       .section ".tdata","awT",@progbits
+foo:   .long   25
+       .text
+       sethi   %tgd_hi22(foo), %o0
+       add     %o0, %tgd_lo10(foo), %o1
+       add     %l7, %o1, %o0, %tgd_add(foo)
+       call    __tls_get_addr, %tgd_call(foo)
+       sethi   %tldm_hi22(foo), %l1
+       add     %l1, %tldm_lo10(foo), %l2
+       add     %l7, %l2, %o0, %tldm_add(foo)
+       call    __tls_get_addr, %tldm_call(foo)
+       sethi   %tldo_hix22(foo), %l3
+       xor     %l3, %tldo_lox10(foo), %l4
+       add     %o0, %l4, %l5, %tldo_add(foo)
+       sethi   %tie_hi22(foo), %o3
+       add     %o3, %tie_lo10(foo), %o3
+       ld      [%l7 + %o3], %o2, %tie_ld(foo)
+       add     %g7, %o2, %o4, %tie_add(foo)
+       sethi   %tle_hix22(foo), %l1
+       xor     %l1, %tle_lox10(foo), %o5
+       ld      [%g7 + %o5], %o1'
+       tls_first_major=2
+       tls_first_minor=14
+       tls_as_opt=-32
+       ;;
+changequote([,])dnl
 esac
 if test -z "$tls_first_major"; then
   : # If we don't have a check, assume no support.
@@ -2277,6 +2290,12 @@ changequote([,])dnl
       [AC_DEFINE(HAVE_GAS_FILDS_FISTS, 1,
         [Define if your assembler uses the new HImode fild and fist notation.])])
 
+    gcc_GAS_CHECK_FEATURE([cmov syntax],
+      gcc_cv_as_ix86_cmov_sun_syntax,,,
+      [cmovl.l %edx, %eax],,
+      [AC_DEFINE(HAVE_AS_IX86_CMOV_SUN_SYNTAX, 1,
+        [Define if your assembler supports the Sun syntax for cmov.])])
+
     # This one is used unconditionally by i386.[ch]; it is to be defined
     # to 1 if the feature is present, 0 otherwise.
     gcc_GAS_CHECK_FEATURE([GOTOFF in data],
@@ -2535,11 +2554,9 @@ enable_languages=`echo "${enable_languages}" | sed -e 's/[[      ,]][[   ,]]*/,/g' -e
 # First scan to see if an enabled language requires some other language.
 # We assume that a given config-lang.in will list all the language
 # front ends it requires, even if some are required indirectly.
-for lang in ${srcdir}/*/config-lang.in ..
+for lang in ${srcdir}/*/config-lang.in
 do
    case $lang in
-    ..)
-       ;;
     # The odd quoting in the next line works around
     # an apparent bug in bash 1.12 on linux.
 changequote(,)dnl
@@ -2568,10 +2585,9 @@ done
 expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's:  *: :g' -e 's:  *: :g' -e 's:^ ::' -e 's: $::'`
 found_languages=
 subdirs=
-for lang in ${srcdir}/*/config-lang.in ..
+for lang in ${srcdir}/*/config-lang.in
 do
        case $lang in
-       ..) ;;
        # The odd quoting in the next line works around
        # an apparent bug in bash 1.12 on linux.
 changequote(,)dnl
@@ -2739,10 +2755,8 @@ all_gtfiles_files_files=
 
 language_hooks="Make-hooks"
 
-for s in .. $subdirs
+for s in $subdirs
 do
-       if test $s != ".."
-       then
                language=
                boot_language=
                compilers=
@@ -2768,15 +2782,11 @@ do
                all_stagestuff="$all_stagestuff $stagestuff"
                all_outputs="$all_outputs $outputs"
                all_gtfiles="$all_gtfiles $gtfiles"
-                for f in .. $gtfiles
+                for f in $gtfiles
                 do
-                    if test $f != ".."
-                     then
                          all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
                          all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
-                     fi
                 done
-       fi
 done
 
 # Pick up gtfiles for c
@@ -2784,22 +2794,16 @@ gtfiles=
 s="c"
 . ${srcdir}/c-config-lang.in
 all_gtfiles="$all_gtfiles $gtfiles"
-for f in .. $gtfiles
+for f in $gtfiles
 do
-     if test $f != ".."
-     then
         all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} "
         all_gtfiles_files_files="$all_gtfiles_files_files ${f} "
-     fi
 done
 
 check_languages=
-for language in .. $all_languages
+for language in $all_languages
 do
-       if test $language != ".."
-       then
                check_languages="$check_languages check-$language"
-       fi
 done
 
 # Since we can't use `::' targets, we link each language in
@@ -2816,11 +2820,9 @@ target_list="all.build all.cross start.encap rest.encap tags \
 for t in $target_list
 do
        x=
-       for lang in .. $all_languages
+       for lang in $all_languages
        do
-               if test $lang != ".."; then
                        x="$x $lang.$t"
-               fi
        done
        echo "lang.$t: $x" >> Make-hooks
 done
@@ -3009,11 +3011,9 @@ xauto-host.h:config.in)
 echo > cstamp-h ;;
 esac
 # Make sure all the subdirs exist.
-for d in .. $subdirs
+for d in $subdirs
 do
-  if test $d != ..; then
     test -d $d || mkdir $d
-  fi
 done
 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
 # bootstrapping and the installation procedure can still use
@@ -3022,8 +3022,7 @@ done
 # This is virtually a duplicate of what happens in configure.lang; we do
 # an extra check to make sure this only happens if ln -s can be used.
 if test "$symbolic_link" = "ln -s"; then
- for d in .. ${subdirs} fixinc ; do
-   if test $d != ..; then
+ for d in ${subdirs} fixinc ; do
        STARTDIR=`${PWDCMD-pwd}`
        cd $d
        for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include
@@ -3032,7 +3031,6 @@ if test "$symbolic_link" = "ln -s"; then
                $symbolic_link ../$t $t 2>/dev/null
        done
        cd $STARTDIR
-   fi
  done
 else true ; fi
 ],