Article View: gnu.gcc.help
Article #50920Re: GCC cross-compiler environment---pointers/help needed
From: Chiaki Ishikawa
Date: Mon, 26 Jul 1993 12:27
Date: Mon, 26 Jul 1993 12:27
100 lines
5408 bytes
5408 bytes
For building the cross compiler for Sun3 on a sparc machine, I guess you did basically the right thing. I did the same thing [installing a cross compiler for m68k-sun-sunos4 on a Sparc10 host running Solaris2. sparc-sun-solaris2] about 10 days ago, and I had to look into the makefiles, etc. to figure out what the installation was doing whenever errors occurred.. I intended to report my experience so that installation documentation can be improved when your report appears on gnu.gcc.help. The only thing I would like to add is that : 1. - You probably need to bring the Sun3 header files (fixincluded if possible) just in case there are incompatible header changes between Sun3 SunOS and Sparc SunOS. In my case, the sparc host is based on Solaris2 (SunOS 5.x) and the header files certainly look different. I didn't copy all the header files, the only header files missing from my test compile run of in-house built sources. (After all the trouble, a source file 6000+ line C program was cross compiled successfully and ran on Sun3.) 2. - In my case, I needed to copy libg.a (`g' not `c') library file, too. This is probably due to the use of Gnu-ld and Gnu-as, but I am not sure. (That is, I specified, --with-gnu-ld, and --with-gnu-as additionally to configure when I install the cross compiler...) 3. I didn't realize the subtle ordering of install and libg2 make. I just copied the Sun3 stdio.h header to somewhere when the header was missing and re-invoked make with additional -I flag to CFLAGS="..." on the make line. And repeated the `compile' command from Emacs again and again until enquire was built. Sheer brute force. As for all the glitches, such as binutils have different idea of having the install directory than GCC does, and the obscure explanation of tool directory, etc., I wholehearted agree that the document needs upgrading. BTW, I used /opt/gnu/xsun3/lib/gcc-lib/m68k-sun-sunos4/2.4.5/sys-include (My prefix was /opt/gnu) instead of /opt/gnu/xsun3/include I did this because it seemed to me that gas, bintutils seemed to use the directory /opt/gnu/xsun3/inlclude for somewhat different intention than I do (I don't understand the cross-compilation fully), but /opt/gnu/xsun3/lib/gcc-lib/m68k-sun-sunos4/2.4.5/sys-include seemed to fit my needs... From my cursor reading, I got the impression that /opt/ngu/xsun3/include is used by Cross installation purposes (used by programs on the HOST), and this may not be the right place for placing the target headers meant for cross-compiled target programs. I may be wrong. Anyway, any comment about the placement of target header files would be appreciated. (I copied them manually by hand, but there surely must be a more convenient way of having the target header files placed somewhere once and then, having the each installation of gcc cross compiler with successive revisions pick them up and place them where they are searched for (after optional fixincludes as well.). I am trying to install cross compiler for i386-go32 envrionment. Since configure doesn't recognize the target, I had some difficulty. (djgpp source in FSF GNU CDROM 1993 June contains some patches and MS-DOS configur.bat files for creating the self compilation system). After I hacked the configure somehow (I don't know much about autoconf and connfigure), at least I could built a cross compiler and self-test succeeded. Although I haven't tested the binary yet. Anyone willing to go along with this flaky port of cross i386-go32 can receive the diff source suitable for patch from me. E-mail me. BTW, one thing I notice is that in creating i386-go32, program `nm' is invoked to check for the form of identifier (for demungling of C++ identifier, etc.?), specifically checking the presence of underscore in the identifier. However, instead of using the target-environment `nm' (created from bintutils), the configure in gcc uses the native (sparc!) nm and since the format of object is not compatible?, the host nm barfs, but make silently proceeded. I wonder what the correct patch would be. (Should we tell make that the target nm, etc.. are available using make TARGET_NM=/opt/gnu/..../ar, etc.?) Anyway, thanks for great package! Chiaki Ishikawa, Personal Media Corp., MY Bldg, 1-7-7 Hiratsuka, Shinagawa, Tokyo 142, JAPAN. FAX:+81-3-5702-0359, Phone:+81-3-5702-0351 UUNET: ishikawa@personal-media.co.jp
Technical Details
Message-ID:
<ISHIKAWA.93Jul26212734@ds5200.personal-media.co.jp>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!spool.mu.edu!uwm.edu!cs.utexas.edu!uunet!pmcgw!personal-media.co.jpReferences:
<9307230635.AA13189@lemming.wellfleet>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,a252c2e63ece416 X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-07-27 13:13:16 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!spool.mu.edu!uwm.edu!cs.utexas.edu!uunet!pmcgw!personal-media.co.jp From: ishikawa@personal-media.co.jp (Chiaki Ishikawa) Newsgroups: gnu.gcc.help Subject: Re: GCC cross-compiler environment---pointers/help needed Message-ID: <ISHIKAWA.93Jul26212734@ds5200.personal-media.co.jp> Date: 26 Jul 93 12:27:34 GMT References: <9307230635.AA13189@lemming.wellfleet> Sender: news@pmcgw.personal-media.co.jp Reply-To: ishikawa@personal-media.co.jp Distribution: gnu Organization: Personal Media Corp., Tokyo Japan Lines: 103 Nntp-Posting-Host: ds5200 In-reply-to: psmith@wellfleet.COM's message of 23 Jul 93 06:38:47 GMT X-Md4-Signature: 9f4c85820f0b573e2823507e3323d36f