This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Getting a cross-compiler from linux to solaris2.8 working on gcc-3.0.3


I did the following to get a cross-compiler from linux to solaris2.8 
working (everything but java).
This worked for me on a linux Redhat 7.2 machine (Athlon processor).

---------------------------------
setenv TARGET sparc-sun-solaris2.8
setenv PREFIX 
/nmr/devel/source/autoassign/cross_compilers/solaris2.8/gcc-3.0.3
setenv SOL_HEADERS ../solaris2.8_libs/include/
setenv SOL_LIBS ../solaris2.8_libs/lib/

# build binutils
cd binutils-2.11.2-build
../binutils-2.11.2/configure --prefix=$PREFIX 
--with-headers=$SOL_HEADERS --with-libs=$SOL_LIBS --target=$TARGET
make all install


# build the compiler
delete libffi libjava fastjar subdirectories from gcc-3.0.3
modify ../gcc-3.0.3/libstdc++-v3/config/os/newlib/bits/ctype_noninline.h 
changing line 39
    "_M_ctable(_ctype_)" to "_M_ctable(__ctype)"
modify ../gcc-3.0.3/libstdc++-v3/config/os/newlib/bits/ctype_base.h 
changing line 45
    "char" to "unsigned char"
These changes make the clocale stuff match the definitions in the 
solaris2.8 header <iso/ctype_iso.h>

cd gcc-3.0.3-build
../gcc-3.0.3/configure --target=$TARGET --with-headers=$SOL_HEADERS 
--with-libs=$SOL_LIBS --prefix=$PREFIX --with-gnu-as --with-gnu-ld 
--disable-shared
make all install


# build the debugger
cd gdb-5.1.0.1-build
../gdb-5.1.0.1/configure --target=$TARGET --with-headers=$SOL_HEADERS 
--with-libs=$SOL_LIBS --prefix=$PREFIX
make all install
----------------------------------------

take care,
Hunter Moseley

-- 
Dr. Hunter Moseley -- CABM, Rutgers Univ.
 Not just a scientist, but a fencer as well. 
   My foil is sharp, but my tongue sharper still.
     So it's good that my foil is sharp.
 (Audacity sharpens the tongue finer than any blade.)
-------------------------------------------------------
Email: hunter@cabm.rutgers.edu    Phone: (732) 235-5325
Address: Center for Advanced Biotechnology and Medicine
         Rutgers University
         679 Hoes Lane, Piscataway NJ 08854-5638



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