Newsgroups: comp.os.minix Path: utzoo!utgpu!watserv1!watmath!att!cbnewsd!cbnewsc!ladd From: ladd@cbnewsc.att.com (david.ladd) Subject: Re: How to install GCC on MacMinix Organization: AT&T Bell Laboratories Date: Mon, 19 Nov 90 01:51:28 GMT Message-ID: <1990Nov19.015128.19055@cbnewsc.att.com> Summary: latest news References: <627@pdxgate.UUCP> <1990Nov13.165207.5755@cbnewsc.att.com> <1990Nov14.021835.5614@m2xenix.psg.com> Lines: 52 In article <1990Nov14.021835.5614@m2xenix.psg.com>, steven@m2xenix.psg.com (Steven Furber) writes: > In <1990Nov13.165207.5755@cbnewsc.att.com> I write: > >I'm still having problems getting stdio to recognize EOF. > > I can't help you with this. The lib[32]c.a file seems to have quite a > few problems. I was recently told it was for Minix 1.1 or 1.3, and not > for a current release. This might be part of the problem (sorry, I'm > pretty new to the more brain busting parts of using computers). > Ah, yes, the library Ok, here's the state of GCC/MacMinix as I know it. - the include files don't match the binary of the library (include files use FILE _iob[], binary lib uses FILE *_iop) - My stdio problems were fixed by compiling the library from source. But, read on. > > You'll need to archive them with GNU's ar, not the Minix ar. True, but the binary gcc-ar in gccbin.tar.Z suffers from being compiled with the headers and libs supplied. I had problems with gcc-ar, so (deja vu) I grabbed the sources, re-compiled, and got the same results. Armed with source, I was able to discover that gcc-ar failed only when it tried to open a file in O_CREAT mode. Guess what... The fcntl.h in gcc-include doesn't match the native MacMinix one. Ok, so I fixed that. Then it worked, but failed to "rename" the file. Sure enuf, rename is not a true system call, but a wrapper around link and unlink, and a broken one at that. It turns out that it stats the two files to be renamed and if they're on the SAME device, it fails the call ?! After these adventures, I was able to re-build libc32.a from source, and everything seems to be working now. I'll look into the lib src some more and hopefully post diffs when the dust settles. > Even if you do recompile all of the libraries, > you need to figure out what to do with the MacMINIX system specific > stuff (ie: header files). Well, massaging the kernel into a gnu-compilable state will be a major chore. Anyone looked at the atari kernel at our fav. archive site? > Right now I'm only using GCC when I've got something that requires ANSI > C. Until we can get it up and running for the Mac and MacMinix 1.5, > it's going to need tobe handled with extreme care. Well, define "for the mac." I think it's pretty close right now as a pure minix/user-mode compiler. It's not clear that one would ever want to compile MacBoot with gcc, or any other mac application. Besides, since we Macophiles are able to use all the atari binaries (Thanks Joe P/bammi), it seems like we should try to improve generic minix for the 68k to return the favor.