Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!ssc-vax!cxsea!young From: young@cxsea.UUCP (Gary Young) Newsgroups: comp.os.minix Subject: Re: Cross Compiling under TurboC Professional Package Message-ID: <2631@cxsea.UUCP> Date: 9 Mar 89 20:35:28 GMT References: <10426@louie.udel.EDU> Reply-To: young@cxsea.UUCP (Gary Young) Organization: Computer X Inc. Lines: 37 In article <10426@louie.udel.EDU> rheffel@cs2.wsu.edu writes: > I am looking for someone who already has used the TurboC compiler >to compile the MINIX utilities and MINIX itself. I am wondering about >the process that should be used. I am running both MINIX 1.2 and 1.3. > First, I assume that all the library files (libc.a) will have to be >assembled or compiled. This will form the new MINIX library under >MessDos. The next step would be to compile the utility and move it >from MessDos to MINIX using dos2out. > Does this seem right? . . . You are right in principle. You have to change the 8 or 9 *.s files (use the *.asm in C86 subdirectory) and the prologue.h file so that the SEGMENT names correspond to what TurboC is doing and that they get linked in a working order. Your load modules should end up about 10% smaller (use 'ls -l' command and 'size'). If they become much larger, you probably have the wrong order and bss has been allocated in the file. You also need to take a few library routines from the cs.lib to supply functions that the compiler generates calls to. I don't remember the names here, but you can find them via tlink unreferenced errors. (They look like _LDIV _LMUL _LSHR and there are about 8 of them.) I have only played with it a small amount and on vs 1.1 for pc. Perhaps someone else will be more specific, but doing it from scratch is a valuable educational effort in itself. I recommend that you do as I did, and build the "ls" command first, dosread it, and check out your methods before committing a lot of time to something that doesn't work. Then the other commands, and finish with the boot module. Good Luck. -- Gary H. Young young@cxsea.UUCP ...{mnetor,uw-beaver!ssc-vax}!cxsea!young +1 206 251 6098 Motorola Computer X Inc. - a Motorola New Enterprise company