OSDN Git Service

* alias.c (reg_base_value, old_reg_base_value): Change the
[pf3gnuchains/gcc-fork.git] / gcc / mklibgcc.in
index 2162c05..8ec9e40 100644 (file)
@@ -1,6 +1,7 @@
 #!/bin/sh
 # Construct makefile for libgcc.
-#   Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+#   Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 
@@ -24,6 +25,8 @@
 # FPBIT
 # FPBIT_FUNCS
 # LIB2_DIVMOD_FUNCS
+# DFP_ENABLE
+# DFP_CFLAGS
 # DPBIT
 # DPBIT_FUNCS
 # TPBIT
@@ -332,6 +335,11 @@ for ml in $MULTILIBS; do
 
       if [ "$fpbit" ] ; then
          for name in $fpfuncs; do
+             case "$name" in
+               # _sf_to_tf and _df_to_tf require tp-bit.c
+               # being compiled in.
+               _[sd]f_to_tf) [ -z "$TPBIT" ] && continue;;
+             esac
              if [ "$libgcc_s_so" ]; then
                  out="libgcc/${dir}/${name}${objext}"
                  outS="libgcc/${dir}/${name}_s${objext}"
@@ -362,6 +370,11 @@ for ml in $MULTILIBS; do
   done
 
   if [ "@enable_decimal_float@" = "yes" -a -z "$libgcc_so" ]; then
+    # If $DFP_ENABLE is set, then we want all data type sizes.
+    if [ "$DFP_ENABLE" ] ; then
+       D32PBIT=1; D64PBIT=1; D128PBIT=1
+    fi
+
     # Bring in the DFP support code if D32PBIT, D64PBIT or D128PBIT are set.
     if [ -n "$D32PBIT" -o -n "$D64PBIT" -o -n "$D128PBIT" ] ; then
       dec_filenames="decContext decNumber decRound decLibrary decUtility"
@@ -390,14 +403,18 @@ for ml in $MULTILIBS; do
       dpfuncs_var="${dpbit_var}_FUNCS"
       eval dpbit=\$$dpbit_var
       eval dpfuncs=\$$dpfuncs_var
+      case "$dpbit_var" in
+         D32PBIT)  dpwidth=32 ;;
+         D64PBIT)  dpwidth=64 ;;
+         D128PBIT) dpwidth=128 ;;
+      esac
 
       if [ "$dpbit" ]; then
         for name in $dpfuncs; do
           out="libgcc/${dir}/${name}${objext}"
-         echo $out: $dpbit $fpbit_c_dep
-         echo "        $gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name \
-           -c $dpbit -o $out
-
+         echo $out: config/dfp-bit.h config/dfp-bit.c $fpbit_c_dep
+         echo "        $gcc_compile" -DFINE_GRAINED_LIBRARIES $flags -DL$name -DWIDTH=$dpwidth \
+             $DFP_CFLAGS -c $\(srcdir\)/config/dfp-bit.c -o $out
          echo $libgcc_a: $out
         done
       fi