From: farukhh@hotmail.com (Farukh)
Subject: gcc-3.1 compile for 64-bit
Date: 29 Jun 2002 08:30:59 -0700 [thread overview]
Message-ID: <2a00e604.0206290730.1180f60f@posting.google.com> (raw)
Hello,
I was trying to get gcc 3.1 compiled for 64-bit kernel mode. Followed
the steps in the below post,
but ended up in being unsuccessfull.
/---------------------------------------Start of
Post----------------------------------------------------------------------/
The way that the "gcc" you're using here was configured. It was
configured to only support 32-bit code.
If you build gcc-3.* from source and configure for a target
"sparcv9-sun-solaris2" you get a gcc compiler configuration that is
able to compile 32- and 64-bit programs.
Note: The SPARC 64-bit compiler is not yet officially supported by the
GCC team for version 3.0.x of gcc. It seems the upcoming gcc 3.1 will
make 64-bit SPARC an official supported platform; see "New Targets and
Target Specific Improvements" at <URL:
http://gcc.gnu.org/gcc-3.1/changes.html >.
Below are some instructions on how to bootstrap (the unsupported)
64-bit gcc 3.0.x compiler:
________________________________________________________________________
Build instruction to bootstrap a 64-bit gcc compiler on SPARC Solaris
=====================================================================
Get the 'gcc 3.0' source release from
http://gcc.gnu.org/
http://gcc.gnu.org/gcc-3.0/gcc-3.0.html
Prerequisites:
- gcc 2.95.[23] is installed and working
- gnu assember / gnu linker not required
(I've use solaris as and ld found in /usr/ccs/bin )
Step 1:
=======
Compile and install an ordinary 32-bit gcc compiler. The 32-bit
version of gcc on sparc solaris is a 'primary evaluation platform', so
there should be no major problem building the 32-bit version. I've
choosen to install the gcc 3.0 compiler into a separate directory tree
(/usr/local/gcc-3.0); by including or removing the
/usr/local/gcc-3.0/bin directory in my $PATH environment variable, I
can switch between different versions of the GCC compiler.
bunzip2 < gcc-3.0.tar.bz2 | tar xf -
mkdir gcc-3.0-sparc-32bit-obj
cd gcc-3.0-sparc-32bit-obj
../gcc-3.0/configure --prefix=/usr/local/gcc-3.0
--enable-languages=c
make
make install
Step 2:
=======
Prepend the bin directory for the compiler installed in step 1 to
$PATH, create a fresh object directory hierarchy for the 64-bit
compiler, then configure and compile the 64-bit compiler. Again I
choose a separate directory for the installed 64-bit gcc development
compiler, /usr/local/gcc-3.0-v9 in this example:
set path=(/usr/local/gcc-3.0/bin $path)
cd ..
mkdir gcc-3.0-sparc-64bit-obj
cd gcc-3.0-sparc-64bit-obj
../gcc-3.0/configure --prefix=/usr/local/gcc-3.0-v9
--enable-languages=c sparcv9-sun-solaris2
make
make install
Step 3:
=======
OPTIONAL: The compiler binaries installed in the previous step are
still using 32-bit code (but they are able to produce 64-bit binaries
now). You may want to recompile the 64-bit compiler into real 64-bit
binaries.
Prepend /usr/local/gcc-3.0-v9/bin to $PATH, create a fresh (empty)
object directory for the 64-bit objects, then configure and compile
the 64-bit compiler.
set path=(/usr/local/gcc-3.0-v9/bin $path)
cd ..
rm -rf gcc-3.0-sparc-64bit-obj
mkdir gcc-3.0-sparc-64bit-obj
cd gcc-3.0-sparc-64bit-obj
../gcc-3.0/configure --prefix=/usr/local/gcc-3.0-v9
--enable-languages=c sparcv9-sun-solaris2
make
make install
/---------------------------------------------------End of
post------------------------------------------------------/
while doing make in STEP-1 above, got the following errors, i tried a
little different approach,
instead of getting gcc-3.0 src, i got gcc-3.1 and tried all above
steps on it. I even tried it with
"sparcv9-sun-solaris2" option below :|
ld.so.1: /test/gcc-3.1-sparc-32bit-obj/gcc/xgcc: fatal: libgcc_s.so.1:
open fail
ed: No such file or directory
Killed
make[1]: *** [specs] Error 137
make[1]: Leaving directory `/test/gcc-3.1-sparc-32bit-obj/gcc'
make: *** [all-gcc] Error 2
Even tried STEP-2 above with this result :
/test/gcc-3.1-sparc-64bit-obj/gcc/xgcc
-B/test/gcc-3.1-sparc-64bit-obj/gcc/ -B/u
sr/local/gcc-3.1-v9/sparcv9-sun-solaris2/bin/
-B/usr/local/gcc-3.1-v9/sparcv9-su
n-solaris2/lib/ -isystem
/usr/local/gcc-3.1-v9/sparcv9-sun-solaris2/include -dum
pspecs > tmp-specs
ld.so.1: /test/gcc-3.1-sparc-64bit-obj/gcc/xgcc: fatal: libgcc_s.so.1:
open fail
ed: No such file or directory
Killed
make[1]: *** [specs] Error 137
make[1]: Leaving directory `/test/gcc-3.1-sparc-64bit-obj/gcc'
make: *** [all-gcc] Error 2
Didn't try the Step-3 after having failure on two steps above.
# make --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.8
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Any suggestions ???
BTW, Already have gcc.2.95.3 working fine, which compiles that src of
the gre module perfectly
over 32-bit mode, but i need to run it over solaris 8 after compiling
it for 64-bit !
Help would really be appreciable !
Regards,
FH
reply other threads:[~2002-06-29 15:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox