[Bug libstdc++/13837] New: libstdc++-v3: language c++ broken when cross compiling gcc for solaris (patch included)

daniel dot franke at imbs dot uni-luebeck dot de gcc-bugzilla@gcc.gnu.org
Fri Jan 23 18:47:00 GMT 2004


binutils-2.14 configured as; 
../binutils-2.14/configure 
--prefix=/home/franke/cross-compile/sparc-sun-solaris 
--target=sparc-sun-solaris2.9 
 
gcc-3.3.2 configured as: 
../gcc-3.3.2/configure --prefix=/home/franke/cross-compile/sparc-sun-solaris/ 
--target=sparc-sun-solaris2.9 --with-gnu-as --with-gnu-ld --enable-threads 
--with-cpu=ultrasparc --enable-languages=c,c++ 
--with-headers=/home/franke/cross-compile/sparc-sun-solaris/sys-root/include/ 
--with-libs=/home/franke/cross-compile/sparc-sun-solaris/sys-root/lib/ 
--disable-multilib --without-newlib --disable-shared --disable-nls 
 
fails to build language c++. 
Problems: 
 1. libstdc++-v3/config/os/solaris/solaris2.7/ctype_noinline.h is not included. 
This results in build error at "ctype<char>::classic_table()". Solution: add 
solaris-case to $target switch in libstdc++-v3/configure.in (see below) 
 
 2. libstdc++-v3/configure.in has no $target switch for "*-solaris2*, therefore 
the default AC_DEFINES add HAVE_ACOSF etc to config.h, this will trigger an 
compile error at acos() (cmath) since solaris doesn't seem to have acosf()?! 
Adding the appropiate $target-switch fixes this (see below) 
 
 
Note on pathc below: the 
>      AC_DEFINE(HAVE_HYPOT) 
is taken from default target. I don't know whether it is needed or not ?! 
 
diff -c 
-- 
*** configure.in.old    Fri Jan 23 19:21:22 2004 
--- configure.in        Fri Jan 23 19:13:58 2004 
*************** 
*** 146,151 **** 
--- 146,166 ---- 
          AC_DEFINE(HAVE_ISNANL) 
        fi 
        ;; 
+     *-solaris2*) 
+       case "$target" in 
+         solaris2.5 | solaris2.5.[0-9]) 
+           os_include_dir="os/solaris/solaris2.5" 
+           ;; 
+         solaris2.6) 
+           os_include_dir="os/solaris/solaris2.6" 
+           ;; 
+         solaris2.[789] | solaris2.1[0-9]) 
+           os_include_dir="os/solaris/solaris2.7" 
+           ;; 
+       esac 
+       AC_DEFINE(HAVE_HYPOT) 
+       ;; 
+ 
      *-hpux*) 
        # Check for available headers. 
        AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ 
*************** 
*** 274,279 **** 
--- 289,296 ---- 
    case "$target" in 
      *-mingw32*) 
        ;; 
+     *-solaris*) 
+       ;; 
      *-windiss*) 
        AC_DEFINE(HAVE_ACOSF) 
        AC_DEFINE(HAVE_ASINF) 
--

-- 
           Summary: libstdc++-v3: language c++ broken when cross compiling
                    gcc for solaris (patch included)
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: daniel dot franke at imbs dot uni-luebeck dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sparc-sun-solaris2*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13837



More information about the Gcc-bugs mailing list