Hi all,

Since patch [1] has been applied, that is in GCC 4.7, it's not possible
to build a tri-arch GCC (o32, n32, 64), using mips-linux-gnu as the host
triplet (that is defaulting to o32). In that case mips/t-tpbit is not 
included anymore, and while the build succeeds, the resulting 
libgcc_s.so.1 has the following  functions as undefined:

  1697: 000000000004d940     0 FUNC    GLOBAL DEFAULT  UND __trunctfsf2
  1698: 000000000004d930     0 FUNC    GLOBAL DEFAULT  UND __subtf3
  1699: 000000000004d920     0 FUNC    GLOBAL DEFAULT  UND __floatsitf
  1704: 000000000004d900     0 FUNC    GLOBAL DEFAULT  UND __fixunstfsi
  1716: 000000000004d8f0     0 FUNC    GLOBAL DEFAULT  UND __lttf2
  1722: 000000000004d8d0     0 FUNC    GLOBAL DEFAULT  UND __trunctfdf2
  1728: 000000000004d880     0 FUNC    GLOBAL DEFAULT  UND __divtf3
  1731: 000000000004d860     0 FUNC    GLOBAL DEFAULT  UND __addtf3
  1737: 000000000004d830     0 FUNC    GLOBAL DEFAULT  UND __netf2
  1746: 000000000004d800     0 FUNC    GLOBAL DEFAULT  UND __floatunsitf
  1747: 000000000004d7f0     0 FUNC    GLOBAL DEFAULT  UND __eqtf2
  1751: 000000000004d7d0     0 FUNC    GLOBAL DEFAULT  UND __multf3


The patch below fixes that by including mips/t-tpbit when long double is
16 bytes long, instead of detecting that using the host triplet.

Aurelien


[1] http://gcc.gnu.org/ml/gcc-patches/2011-07/msg00927.html


2012-04-28  Aurelien Jarno  <aurel...@aurel32.net>

        * config.host (mips64*-*-linux*, mipsisa64*-*-linux*): Remove. 
        (mips*-*-linux*): Include mips/t-tpbit when long double is 
        16 bytes long. 

Index: libgcc/config.host
===================================================================
--- libgcc/config.host  (révision 186921)
+++ libgcc/config.host  (copie de travail)
@@ -728,15 +728,13 @@
        ;;
 mips*-*-netbsd*)                       # NetBSD/mips, either endian.
        ;;
-mips64*-*-linux* | mipsisa64*-*-linux*)
-       extra_parts="$extra_parts crtfastmath.o"
-       tmake_file="${tmake_file} t-crtfm mips/t-mips16 mips/t-tpbit"
-       md_unwind_header=mips/linux-unwind.h
-       ;;
 mips*-*-linux*)                                # Linux MIPS, either endian.
        extra_parts="$extra_parts crtfastmath.o"
        tmake_file="${tmake_file} t-crtfm mips/t-mips16"
        md_unwind_header=mips/linux-unwind.h
+       if test "${ac_cv_sizeof_long_double}" = 16; then
+               tmake_file="${tmake_file} mips/t-tpbit"    
+       fi
        ;;
 mips*-sde-elf*)
        tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16"

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurel...@aurel32.net                 http://www.aurel32.net

Reply via email to