This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-3.1 cross compile ok? [was Re: gcc-3.1 + libstdc++-v3.0.97 cross compile ok?]


On Thu, Jul 04, 2002 at 05:03:59PM -0300, Brad Spencer wrote:
> Perhaps I spoke too soon.  The original problem still shows up when
> cross compiling and using the supplied libstdc++-v3.  I can repost if
> necessary. 

Looking even more into this, it appears that when I try to build a
cross compiler on host i386-sun-solaris2.6 for sparc64-sun-solaris2.8
with gcc-3.1 (and stock libstdc++-v3, now), it's thinking I have
newlib instead of the Solaris libc.  I put on my Automake hat, which
doesn't fit very well, and I think I found the problem.  

It looks like this is an artifact of the hack that lets cross-compiles
work.  There's some mumbling about it being done "by hand" and that it
will all go away soon :)  Anyway, here's a patch that's been tested
for building a target=sparc64-sun-solaris2.8 cross compiler.  Note
that the HAVE_* settings I chose was mainly guess work, but I did have
a config.h from a sparc64-sun-solaris2.8 of the same compiler and
libstdc++-v3.

Comments?  Someone with a better knowledge of configure.in could probably
tweak it.  Should I open this kind of thing as a PR?

Also, perhaps configure should log the OS_INCLUDE_DIR somewhere more
obvious to make this easier to detect.

*** configure.in.orig	Thu Jul  4 20:17:46 2002
--- configure.in	Thu Jul  4 20:48:48 2002
***************
*** 156,161 ****
--- 156,178 ----
        GLIBCPP_CHECK_WCHAR_T_SUPPORT
        os_include_dir="config/os/mingw32"
        ;;
+     *-solaris2.5)
+       os_include_dir="config/os/solaris/solaris2.5"
+       AC_DEFINE(HAVE_HYPOT)
+       ;;
+     *-solaris2.6)
+       os_include_dir="config/os/solaris/solaris2.6"
+       AC_DEFINE(HAVE_HYPOT)
+       ;;
+     *-solaris2.7)
+       os_include_dir="config/os/solaris/solaris2.7"
+       AC_DEFINE(HAVE_HYPOT)
+       ;;
+     *-solaris2.8)
+       # 2.7 and 2.8 are the same for now
+       os_include_dir="config/os/solaris/solaris2.7"
+       AC_DEFINE(HAVE_HYPOT)
+       ;;
      *)
        os_include_dir="config/os/newlib"
        AC_DEFINE(HAVE_HYPOT)
***************
*** 165,170 ****
--- 182,199 ----
    case "$target_alias" in
      *-mingw32*)
        ;;
+     *-solaris*)
+       # This is a subset of the '*' case below, taken from a native
+       # build of sparc64-sun-solaris2.8
+       AC_DEFINE(HAVE_STRTOF)
+       AC_DEFINE(HAVE_STRTOLD)
+       AC_DEFINE(HAVE_MMAP)
+ 
+       AC_DEFINE(HAVE_COPYSIGN)
+       AC_DEFINE(HAVE_ISNAN)
+       AC_DEFINE(HAVE_ISNANF)
+       AC_DEFINE(HAVE_MODFF)
+       ;;
      *)
        # GLIBCPP_CHECK_STDLIB_SUPPORT
        AC_DEFINE(HAVE_STRTOF)        


-- 
-----------------------------------------------------------------
Brad Spencer - spencer@infointeractive.com - "It's quite nice..."
  Systems Architect | InfoInterActive Corp. | An AOL Company


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]