🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52887

gcc-2.1 cross compiler problem.

#52887
From: Operator
Date: Tue, 28 Apr 1992 16:52
119 lines
5461 bytes
Hello ,

Thanks for the responses to my previous "cross compiler" question.
Most of the people advised me to use gcc-2.1, because it has built-in
support for cross compilations.

However, even with gcc-2.1, I encountered some problems installing gcc-2.1 for
Sun sparc host and Sun3 target.
I probably have done something wrong, but I can't seem to find what.

Therefore this call for help:

I first created a "native" gcc for Sparc host and Sparc target (a Sun 4/670)
doing the normal "configure"-stuff (exactly as in the manuals):

# cd /home2/GNU/gcc-2.1 ; mkdir GCC-SUN4 ; cd GCC-SUN4 ;
# ../configure --srcdir=../../gcc-2.1 --host=sparc-sun-sunos4.1
                --target=sparc-sun-sunos4.1
# cp ../../bison-1.14/bison .
# make LANGUAGES=c 
# make stage1
# make CC=stage1/gcc CFLAGS="-g -O -Bstage1/"
# make stage2
# make CC=stage2/gcc CFLAGS="-g -O -Bstage2/"  
# foreach file (*.o)
  ? cmp $file stage2/$file
  ? end
# make CC=stage2/gcc install
# make CC="stage2/gcc -O" install-proto
# make install-fixincludes

There were no problems at all; everything worked from the start! 

After that, I configured a new version of the compiler in another directory
for SPARC host and Sun3 target.
This cross compiler generation causes some trouble.

Here is the log of the commands I executed. (executed on a SUN 4/670)

# cd /home2/GNU/gcc-2.1
# mkdir GCC-SUN3
# cd GCC-SUN3
--> /home2/GNU/gcc-2.1/GCC-SUN3
# ../configure --srcdir=..  --host=sparc-sun-sunos4.1
                --target=m68k-sun-sunos4.1
--> Linked `config.h' to `../config/xm-sparc.h'
--> Linked `tm.h' to `../config/sun3.h'
--> Linked `md' to `../config/m68k.md'
--> Linked `aux-output.c' to `../config/m68k.c'
--> Linked `tconfig.h' to `../config/xm-m68k.h'
--> Created `Makefile'.
--> Links are now set up for host sparc-sun-sunos4.1 and target
--> m68k-sun-sunos4.1.
# cp ../../bison-1.14/bison .
( --> /home2/GNU/gcc-2.1/GCC-SUN3/bison )

# make LANGUAGES=c
... lots of output, no errors ...
# make stage1
This caused following errors:
> mv: cc1plus: Cannot access: No such file or directory
> mv: cc1plus: Cannot access: No such file or directory
> mv: cc1obj: Cannot access: No such file or directory
> mv: enquire: Cannot access: No such file or directory
> mv: protoize: Cannot access: No such file or directory
> mv: unprotoize: Cannot access: No such file or directory
> mv: collect2: Cannot access: No such file or directory
> *** Error code 1 (ignored)
> rm -f stage1/libgcc.a
> cp libgcc.a stage1
> cp: libgcc.a: No such file or directory
> *** Error code 1 (ignored)
> if [ -f /usr/local/m68k-sun-sunos4.1/bin/ranlib ] ; then
> /usr/local/m68k-sun-sunos4.1/bin/ranlib stage1/libgcc.a; else true; fi

# make CC=stage1/gcc CFLAGS="-g -O -Bstage1/"

stage1/gcc -DCROSS_COMPILE   -g -O -Bstage1/   -I. -I..  -I../config \
-DGCC_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-sun-sunos4.1/`awk
'{printf "%s", substr ($4, 2, length ($4) - 3); }'
../version.c`/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/lib/g++-include\" \
-DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
-DCROSS_INCLUDE_DIR=\"/usr/local/lib/gcc-lib/m68k-sun-sunos4.1/`awk '{printf "%s", substr ($4, 2, length ($4) - 3); }' ../version.c`/sys-include\" \
-c `echo ../cccp.c | sed 's,^\./,,'`
../cccp.c:61: sys/types.h: No such file or directory
../cccp.c:62: sys/stat.h: No such file or directory
../cccp.c:63: ctype.h: No such file or directory
../cccp.c:64: stdio.h: No such file or directory
../cccp.c:65: signal.h: No such file or directory
../cccp.c:68: sys/file.h: No such file or directory
../cccp.c:70: sys/time.h: No such file or directory
../cccp.c:71: sys/resource.h: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `cccp.o'

It seems that the compiler doesn't find the necessary include files!
In cccp.c, the headers are all included with the default "<..>" notation.
( #include <sys/types.h>, #include <sys/stat.h>, ...)

Is there something I missed in the documentation???
(In the case this is a bug, I have a complete log of the installation...)

(By the way, how can one create a PostScript file from the gcc.texi files???
I'd like to print out  the complete gcc-manual.
... yes I know, I really am a gnu-novice, but one is never too old to learn...)


Thanks in advance,


+------------------------------------------------------------+
| Dirk Somers, System Administrator Workstations.            |
| AGFA-Gevaert, R&D, EBS department.                         |
| Mechelse Steenweg 430, B-2650 Edegem (Antwerp) BELGIUM     |
+------------------------------------------------------------+
| Tel.: +32 - 3 444.62.03     |      d_somers@roam.agfa.be   |
| Fax.: +32 - 3 455.45.17     |      frankli!d_somers        |
+------------------------------------------------------------+
Technical Details
Message-ID: <9204281452.AA19292@roam.agfa.be>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!roam.agfa.BE!root

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,114e3268097ae5fa,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-04-28 09:52:44 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!roam.agfa.BE!root
From: root@roam.agfa.BE (Operator)
Subject: gcc-2.1 cross compiler problem.
Message-ID: <9204281452.AA19292@roam.agfa.be>
Sender: daemon@cis.ohio-state.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 28 Apr 1992 16:52:44 GMT
Lines: 119