From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,16c32cd4da0038f8,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 2002-06-29 08:31:00 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: farukhh@hotmail.com (Farukh) Newsgroups: comp.unix.osf.osf1 Subject: gcc-3.1 compile for 64-bit Date: 29 Jun 2002 08:30:59 -0700 Organization: http://groups.google.com/ Message-ID: <2a00e604.0206290730.1180f60f@posting.google.com> NNTP-Posting-Host: 202.125.143.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1025364660 17488 127.0.0.1 (29 Jun 2002 15:31:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 29 Jun 2002 15:31:00 GMT Xref: archiver1.google.com comp.unix.osf.osf1:119 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 . 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