OSDN Git Service

PR target/21390
[pf3gnuchains/gcc-fork.git] / boehm-gc / configure.host
index 82294cf..97f4dac 100644 (file)
 #   host               The configuration host
 #   host_cpu           The configuration host CPU
 #   target_optspace    --enable-target-optspace ("yes", "no", "")
+#   GCC                 should be "yes" if using gcc
 
 # It sets the following shell variables:
 #   gc_cflags  Special CFLAGS to use when building
+#   gc_use_mmap  Set to "yes" on platforms where mmap should be used instead
+#               of sbrk. This will define USE_MMAP.
+
+gc_cflags=""
+gc_use_mmap=
 
 # We should set -fexceptions if we are using gcc and might be used
 # inside something like gcj.  This is the zeroth approximation:
-case "$host" in 
-    *-*-linux* )
-    gc_cflags=-fexceptions
-    ;;
-    hppa*-*-hpux* )
-    if test $GCC != "yes" ; then
-        gc_cflags=+ESdbgasm
-    fi
+if test :"$GCC": = :yes: ; then
+    gc_cflags="${gc_cflags} -fexceptions"
+else
+    case "$host" in 
+        hppa*-*-hpux* )
+       if test :$GCC: != :"yes": ; then
+            gc_cflags="${gc_flags} +ESdbgasm"
+       fi
+        # :TODO: actaully we should check using Autoconf if
+        #     the compiler supports this option.
+        ;;
+    esac
+fi
+
+case "${host}" in
+  *-linux*)
+    gc_use_mmap=yes
     ;;
 esac
 
@@ -48,7 +63,7 @@ esac
 
 case "${host}" in
   mips-tx39-*|mipstx39-unknown-*)
-       boehm_gc_cflags="${boehm_gc_cflags} -G 0"
+       gc_cflags="${gc_cflags} -G 0"
        ;;
   *)
        ;;