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]

gcc3.3.3 cross-compiler Solaris 2.9 -> Solaris2.7


I post this here so it may be use by some one else trying to do the same 
thing
and struglying like me the whole day to try to figure out why doese not 
compile properly.

My need it to have a gcc3.3.3  cross compile runnig  an a Solaris 2.9 
machine and targeting a  Solaris2.7 machine.

I already have bin utils installed (  2.13.2.1 ) installed under 
/usr/gnu/sparc-solaris-2.7 directory so I have skipped this..
I have alreade a gcc3.2.3 cross compiler installed under /usr/gnu and 
all the system includes and libs installed under
/usr/gnu/sparc-solaris-2.7.

I have configure gcc3.3.3 the following way :

../gcc-3.3.3/configure --host=sparc-sun-solaris2.9 
--target=sparc-sun-solaris2.7 --prefix=/usr/gnu 
--with-gcc-version-trigger=/raid5/BuildSwBuild/gcc-3.3.3/gcc/version.c --w
ith-gnu-as --with-gnu-ld --with-as=/usr/gnu/sparc-sun-solaris2.7/bin/as 
--with-ld=/usr/gnu/sparc-sun-solaris2.7/bin/ld --enable-long-long 
--enable-threads --enable-languages
=c,c++

than tryed to build..

Firts problem : PATH_MAX is not defined :

/raid5/BuildSwBuild/gcc-3.3.3-build.cross/gcc/xgcc 
-B/raid5/BuildSwBuild/gcc-3.3.3-build.cross/gcc/ 
-B/usr/gnu/sparc-sun-solaris2.7/bin/ -B/usr/gnu/sparc-sun-solaris2.7/lib/
 -isystem /usr/gnu/sparc-sun-solaris2.7/include -DIN_GCC 
-DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes -isystem ./include  -I. -I. -I..
/../gcc-3.3.3/gcc -I../../gcc-3.3.3/gcc/. -I../../gcc-3.3.3/gcc/config 
-I../../gcc-3.3.3/gcc/../include  \
        -c ../../gcc-3.3.3/gcc/config/sparc/gmon-sol2.c -o gmon.o
../../gcc-3.3.3/gcc/config/sparc/gmon-sol2.c: In function `_mcleanup':
../../gcc-3.3.3/gcc/config/sparc/gmon-sol2.c:181: error: `PATH_MAX' 
undeclared (first use in this function)
../../gcc-3.3.3/gcc/config/sparc/gmon-sol2.c:181: error: (Each 
undeclared identifier is reported only once
../../gcc-3.3.3/gcc/config/sparc/gmon-sol2.c:181: error: for each 
function it appears in.)
../../gcc-3.3.3/gcc/config/sparc/gmon-sol2.c:181: warning: unused 
variable `buf'
make[1]: *** [gmon.o] Error 1
make[1]: Leaving directory `/raid5/BuildSwBuild/gcc-3.3.3-build.cross/gcc'
make: *** [all-gcc] Error 2


Note I have seen from the build log that the compilation process is 
looking for the system includes and specifically for limits.h under this 
path :

/usr/gnu/lib/gcc-lib/sparc-sun-solaris2.7/3.3.3/../../../../sparc-sun-solaris2.7/sys-include

which point to nothing since the directory 
/usr/gnu/lib/gcc-lib/sparc-sun-solaris2.7/3.3.3 does not symply exists..
the results is the the build create its onw limits.h which does not have 
PATH_MAX defined.

After I have create the directory and rebuild things went better..

untill the second problem libstdc++v3 does not compile  becuse of

acosf' not declared
etc
etc

I had to apply a little bit modified version of the patch posted by Kay  
days ago :

*** configure.in        Fri Jun  4 16:40:11 2004
--- configure.ori       Fri Jun  4 16:40:18 2004
***************
*** configure.in        Fri Jun  4 16:40:11 2004
--- configure.ori       Fri Jun  4 16:40:18 2004
***************
*** 271,291 ****
        AC_DEFINE(HAVE_SINHF)
        AC_DEFINE(HAVE_SINHL)
        ;;
-     *-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)
-       os_include_dir="os/solaris/solaris2.7"
-       ;;
      *)
        os_include_dir="os/newlib"
        AC_DEFINE(HAVE_HYPOT)
--- 271,276 ----
***************
*** 349,361 ****
        AC_DEFINE(HAVE_TANF)
        AC_DEFINE(HAVE_TANHF)
        ;;
-     *-solaris2*)
-       # GLIBCPP_CHECK_STDLIB_SUPPORT
-       AC_DEFINE(HAVE_STRTOF)
-       AC_DEFINE(HAVE_STRTOLD)
-       # AC_FUNC_MMAP
-       AC_DEFINE(HAVE_MMAP)
-       ;;
      *)
        # GLIBCPP_CHECK_STDLIB_SUPPORT
        AC_DEFINE(HAVE_STRTOF)
--- 334,339 ----


et voila ..  I finally got my new gcc3.3.3 cross compiler

I have to test it now but I am quite confident.. :-)


-Corrado


This message, including any attachments, is intended only for the person(s) to whom it is addressed. If you received it in error, please let us know and delete the message from your system. This message may be confidential and may fall under the duty of non-disclosure. Any use by others than the intended addressee is prohibited. Trema shall not be liable for any damage related to the electronic transmission of this message, such as failure or delay of its delivery, interception or manipulation by third parties, or transmission of viruses or other malicious code.


------
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]