This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: X-compiler problem with 3.3.3


Dan Kegel wrote:

Phil Prentice wrote:

I am using 3.3.3 configured as a sparc-sun-solaris2.6 target running on Linux. I am trying to generate a C++ compiler. Unfortunately rthe build is failing with the following output: ...
/home/diag/X-compiler/gcc/gcc-3.3.3.g++/sparc-sun-solaris2.6/libstdc++-v3/include/cmath:107: error: `acosf' not declared
...
I copied the relavant libs & includes from the target machine.

Have you checked to make sure you can build that compiler on the target machine as a non-cross-compiler? Maybe there's a problem with the target headers?

That is not the case... The problem is that Solarises are not supported yet as cross compiler targets in the FSF libstdc++ configuration. Suggestions for fixing the gcc-3.[23] sources were presented on this list sometimes but nobody who could move the suggestions to the FSF sources did anything for this issue...

  Ok, I updated my Solaris2.7 targeted gcc-3.3 into 3.3.3 from 3.3.1 just
yesterday with my patched gcc-3.3.3 sources.  The patches I have now are
attached to this message, but I cannot give any quarantee that these patches
will give the same results as when building the same stuff natively... And
maybe you should install them manually, it seems that I had already sorted
alphabetically and combined the two 'case $target in' choices in the original
'configure.in'. And of course then reproduce the 'configure'...

 For some academic reasons I could think to struggle more with these patches
if they yet don't give the same results as the native build gives... As the
patches show, things which can be tested on the native host, must be told in
the cross case.

  Furhermore for everyone who builds a cross-GCC for Solaris2, there can be
10 times or more people who are building the same GCC version natively. So
getting the libiberty and libstdc++ stuff cross-built has only some academic
importance.  Building something is not the same as building it right so that
the result works... So if the http://www.sunfreeware.com has a prebuilt
gcc-3.3.3 for Solaris2.6/Sparc, one gets the natively built libiberty and
libstdc++ stuff from it.  It isn't in any way obligatory to rebuild this
library stuff, only the executables for the cross host... I would expect
the Sunfreeware libs being built "right", being somehow tested and them
even working somehow...

  So the question is about the goal, whether one only wants the toolchain for
real production work, or only wants to build it just for a fun, or then wants
to achieve these both goals... Anyway one HAVEN'T TO build any target libs if
they are already available as prebuilt and this is enough!

  If you (Phil) could download a prebuilt native gcc-3.3.3 for Solaris2.6 from
Sunfreeware, extract the libstdc++ stuff from it and compare it with the self-
built equivalents, doing binary comparisons etc., this could help getting it
more clear whether these patches really work or not...

Cheers, Kai


*** configure.target	Mon Oct 27 11:47:15 2003
--- /home2/src/gcc-3.3/libstdc++-v3/configure.target	Wed Mar  3 20:05:51 2004
***************
*** 124,129 ****
--- 124,132 ----
      # Plain BSD attempts to share FreeBSD files.
      os_include_dir="os/bsd/freebsd"
      ;;
+   coff* | eabi* | elf* | pe*)
+     os_include_dir="os/newlib"
+     ;;
    cygwin*)
      os_include_dir="os/newlib"
      ;;
***************
*** 162,167 ****
--- 165,173 ----
      ;;
    solaris2.[789] | solaris2.1[0-9])
      os_include_dir="os/solaris/solaris2.7"
+     ;;
+   sysv4*)
+     os_include_dir="os/sysv4"
      ;;
    windiss*)
      os_include_dir="os/windiss"

*** configure.in	Thu Apr 15 19:12:22 2004
--- /home2/src/gcc-3.3/libstdc++-v3/configure.in	Tue Mar 23 16:56:46 2004
***************
*** 288,294 ****
        AC_DEFINE(HAVE_SINL)
        AC_DEFINE(HAVE_SINHF)
        AC_DEFINE(HAVE_SINHL)
!       os_include_dir="os/qnx/qnx6.1"
        ;;
      *-windiss*)
        AC_DEFINE(HAVE_ACOSF)
--- 270,341 ----
        AC_DEFINE(HAVE_SINL)
        AC_DEFINE(HAVE_SINHF)
        AC_DEFINE(HAVE_SINHL)
! #      os_include_dir="os/qnx/qnx6.1"
!       ;;
!     *-solaris2*)
!       # Check for available headers.
!       AC_CHECK_HEADERS([sys/types.h locale.h float.h])
!       SECTION_FLAGS='-ffunction-sections -fdata-sections'
!       AC_SUBST(SECTION_FLAGS)
!       GLIBCPP_CHECK_LINKER_FEATURES
!       GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
!       GLIBCPP_CHECK_WCHAR_T_SUPPORT
!       AC_DEFINE(HAVE_COPYSIGN)
!       AC_DEFINE(HAVE_COPYSIGNF)
!       AC_DEFINE(HAVE_HYPOT)
!       AC_DEFINE(HAVE_SINCOS)
!       AC_DEFINE(HAVE_SINCOSF)
! #      case "${target_os}" in
! #	solaris2.5*)
! #	  os_include_dir="os/solaris/solaris2.5"
! #	;;
! #	solaris2.6*)
! #	  os_include_dir="os/solaris/solaris2.6"
! #	;;
! #	solaris2.7* | solaris2.8*)
! #	  os_include_dir="os/solaris/solaris2.7"
! #	;;
! #      esac
!       ;;
!     *-sysv4*)
!       # Check for available headers.
!       AC_CHECK_HEADERS([sys/types.h locale.h float.h])
!       SECTION_FLAGS='-ffunction-sections -fdata-sections'
!       AC_SUBST(SECTION_FLAGS)
!       GLIBCPP_CHECK_LINKER_FEATURES
!       GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
!       GLIBCPP_CHECK_WCHAR_T_SUPPORT
!       AC_DEFINE(HAVE_ACOSF)
!       AC_DEFINE(HAVE_ASINF)
!       AC_DEFINE(HAVE_ATAN2F)
!       AC_DEFINE(HAVE_ATANF)
!       AC_DEFINE(HAVE_CEILF)
!       AC_DEFINE(HAVE_COPYSIGN)
!       AC_DEFINE(HAVE_COPYSIGNF)
!       AC_DEFINE(HAVE_COSF)
!       AC_DEFINE(HAVE_COSHF)
!       AC_DEFINE(HAVE_EXPF)
!       AC_DEFINE(HAVE_FABSF)
!       AC_DEFINE(HAVE_FINITE)
!       AC_DEFINE(HAVE_FLOORF)
!       AC_DEFINE(HAVE_FMODF)
!       AC_DEFINE(HAVE_HYPOT)
!       AC_DEFINE(HAVE_ISINF)
!       AC_DEFINE(HAVE_ISINFF)
!       AC_DEFINE(HAVE_ISNAN)
!       AC_DEFINE(HAVE_ISNANF)
!       AC_DEFINE(HAVE_LOG10F)
!       AC_DEFINE(HAVE_LOGF)
!       AC_DEFINE(HAVE_MMAP)
!       AC_DEFINE(HAVE_MODFF)
!       AC_DEFINE(HAVE_POWF)
!       AC_DEFINE(HAVE_SINF)
!       AC_DEFINE(HAVE_SINHF)
!       AC_DEFINE(HAVE_SQRTF)
!       AC_DEFINE(HAVE_STRTOF)        
!       AC_DEFINE(HAVE_STRTOLD)        
!       AC_DEFINE(HAVE_TANF)
!       AC_DEFINE(HAVE_TANHF)
        ;;
      *-windiss*)
        AC_DEFINE(HAVE_ACOSF)



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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