Article View: gnu.gcc.help
Article #42688gcc on solaris 2.3
From: David A. Martinez G.
Date: Thu, 09 Nov 1995 00:00
Date: Thu, 09 Nov 1995 00:00
106 lines
4085 bytes
4085 bytes
Hi, i'm trying to compile gcc 2.7.0 with solaris 2.3 as host and target. As i don't have any c compiler on this solaris machine, i'm compiling gcc on an AIX 3.2.5 as build machine. I'm intending to follow this procedure to obtain gcc compiled to run on solaris 2.3: 1. Install the gcc 2.7.0 sources on AIX 3.2.5. 2. On AIX 3.2.5 compile gcc with AIX 3.2.5 as build, host and target platform. $ configure $ make LANGUAGES=c $ make stage1 $ make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" LANGUAGES=c $ make stage2 $ make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2" $ make compare $ make install CC="stage2/xgcc -Bstage2" CFLAGS="-g -O" 3. On AIX 3.2.5 compile gcc with AIX 3.2.5 as build platform, and Solaris 2.3 as host and target platform. In order to acomplish this, i have installed on the AIX 3.2.5 machine, the Solaris 2.3's include files on /usr/local/sun4-solaris/include. The AIX 3.2.5's include files are in the usual /usr/include directory. 3.1 $ make distclean 3.2 $ configure --build=rs6000-ibm-aix --host=sun4-solaris --target=sun4-solaris 3.3 $ make LANGUAGES=c 4. Using the gcc obtained on step 3, On Solaris 2.3 compile gcc with Solaris 2.3 as build, host and target platform. $ make distclean $ configure $ make LANGUAGES=c After i'd completed the four steps, i'd expect to have a native Solaris 2.3 compiler. However, the point is that the compilation fails in step 3.2 with the following error: $ make LANGUAGES=c as -o crt1.o ./config/sparc/sol2-c1.asm Assembler: /config/sparc/sol2-c1.asm: line 1: Invalid source character 0x21 /config/sparc/sol2-c1.asm: line 1: Error In Syntax /config/sparc/sol2-c1.asm: line 3: Invalid source character 0x21 /config/sparc/sol2-c1.asm: line 3: Error In Syntax /config/sparc/sol2-c1.asm: line 4: Invalid source character 0x21 /config/sparc/sol2-c1.asm: line 4: Error In Syntax /config/sparc/sol2-c1.asm: line 5: Invalid source character 0x21 /config/sparc/sol2-c1.asm: line 5: Error In Syntax /config/sparc/sol2-c1.asm: line^Cmake: *** [crt1.o] Error 1 I figured out that i need a cross assembler (like GAS) to succesfully compile gcc on step 3. So i installed the binutils sources on the AIX 3.2.5 machine, and compiled it with AIX 3.2.5 as the build platform, and Solaris 2.3 as the host and target platform. $ configure --build=rs6000-ibm-aix --host=sun4-solaris --target=sun4-solaris $ make But while compiling binutils-2.5.2/bfd/sunos.c, i got the following error: cc -c -g -I. -I. -I./../include sunos.c "./../include/aout/sun4.h", line 3.0: 1506-236 (W) Macro name PAGE_SIZE has been redefined. "sunos.c", line 1173.8: 1506-025 (S) Operand must be a modifiable lvalue. make[1]: *** [sunos.o] Error 1 make[1]: Leaving directory `/aca05/appadmin/GNU/binutils/binutils-2.5.2/bfd' make: *** [all-bfd] Error 1 My questions are: 1. Is my approach to have a native gcc for solaris 2.3 correct? 2. Do i really need a cross assembler, like GAS, to succesfully compile gcc for Solaris 2.3 on AIX 3.2.5? 3. How can i fix the problem while compiling bfd/sunos.c? I really appreciate any comment about my approach to compile gcc for solaris 2.3 on an AIX 3.2.5 machine. thanks in advance, David A. Martinez G. DINF-DTCI ITESM, Monterrey Campus P.S. Please answer to dmartine@campus.mty.itesm.mx -- Ing. David A. Martinez Gonzalez, M.C. Tel: (8) 358-2000 Ext. 4085 Administrador de equipos UNIX Fax: (8) 369-2004 DINF-DTCI e-mail: dmartine@campus.mty.itesm.mx ITESM Campus Monterrey www: http://www.mty.itesm.mx/~dmartine
Technical Details
Message-ID:
<47rloh$1sj@academ00.mty.itesm.mx>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,fe042d81558a287a,start X-Google-Attributes: gid11318c,public From: "David A. Martinez G." <dmartine> Subject: gcc on solaris 2.3 Date: 1995/11/09 Message-ID: <47rloh$1sj@academ00.mty.itesm.mx> X-Deja-AN: 118940590 content-type: text/plain; charset=us-ascii organization: ITESM x-url: news:gnu.gcc.help mime-version: 1.0 newsgroups: gnu.gcc.help x-mailer: Mozilla 1.1N (X11; I; AIX 2)