Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!mips!daver!bungi.com!news From: jkp@sauna.hut.fi (Jyrki Kuoppala) Newsgroups: comp.sys.nsc.32k Subject: Re: gcc 1.39, some bugs fixed and cleaner diffs. Message-ID: <9103070035.AA01692@cs.hut.fi> Date: 7 Mar 91 00:35:27 GMT References: <> Sender: news@daver.bungi.com Organization: Helsinki University of Technology, Finland. Lines: 103 Approved: news@daver.bungi.com In article Jordan writes: >Do you need to remake all the /bin utilities when you recompile the >kernel with GNU gcc 1.39? Well, if you use the diff currently on nic.funet.fi for gcc 1.39, it's a good idea, otherwise many of the binaries will fail because struct stat is incompatible, for example. But I could use the small-alignment login and init on the large-alignment kernel just fine. Of course, if you haven't got the courage to move to the ns32k standard alignment ;-) you can just continue to use the old alignment, #undef BIGGEST_ALIGNMENT and #define it to 16 in the tm.h file. But beware: then you have results like Jordan had, cc1 will loop in insn-recog.o when insn-recog.c is compiled with -O and assembled with gas 1.38.1 compiled with 16-bit structure alignment, no matter if that gas is compiled with GNU or Bruce tools (I think). You'll also get core dumps from gas compiling dbxread.c and regex.c from gdb 3.5 with -O. Confused yet ? Well, I have more .. Apparently Bruce's tools don't work with 32-bit alignment, the linker dumps core on me (I have recompiled the binaries and libraries with the new alignment). Well, you can't win them all .. About gas bugs: after using the kludge fix from me, you can use PC_RELATIVE with my gcc 1.39 diff (uncomment the last line in tm-pc532.h in my latest gcc-1.39 distribution). >Last night, after some pain, I managed to get the GNU (that is - GAS/GLD) >version of 1.39 to actually compile hello_world.c without looping forever >in cc1. Yea! Says I. Then I recompile the kernel, using Jyrki's GAS versions >of the relevant .s files. Kernel comes up, prints a bizarre date, then >panics because it can't find init. I don't pretend to understand all aspects >of the alignment debate as it pertains to Minix (I suppose I should learn), >but I still don't see why it would cause this should happen. What would? Hmm, did you recompile the libraries with the new compiler before recompiling the kernel ? I don't know which routines the kernel uses from libc.a, but I think some, so this could matter. >At this point, I have 5 different versions of Minix 1.3, 1.5 and 1.3/1.5 >on my disk, all patched subtly differently. Hey, that's as many as there are different print_operand_address functions for ns32k gcc ;-) >1. Get Bruce's tools up to 1.39, and the hybrid up to the last Phil > Nelson patch level. If you use Bruce's tools and want to use the old alignment (well, I suppose you have to if Bruce's tools fail with 32-bit alignment) all you have to do is to redefine BIGGEST_ALIGNMENT to 16, say ./config.gcc pc532-wbc to gcc 1.39 patched with my current diffs from nic.funet.fi, say 'make' and go your merry way. Phil Nelson's first 1.5.10 hybrid should be quite good as a starting point - well, I don't know about the compiler, I didn't use that, but I hear it works. I didn't have to make any changes to the kernel / libs to get it running. But after that, I have converted to gas syntax with the kernel & libraries assembly files, gcc 1.39 with GNU tools & bigger alignment and recompiled about all the Minix binaries and lots of other free (GNU & others) software with the gcc 1.39 with big alignment. Also I use 62-character file names, Jordan's fch{own,mod}, ptrace support, bumped up many constants and I think some minor things. I've had no trouble after fixing the gas bug and moving to bigger alignment, so I suppose I can recommend gcc 1.39 and gas 1.38.1 with my patches, though I still feel kindof uncomfortable with gas. But I have compiled my kernel, libs, gcc, gdb, GNU *utils, Minix /usr/bin and all others with that combination, so it can't have that many bugs anymore. But as always, booting it all up is kind of a problem (moving to 32-bit alignment was not that simple, esp. with only 64 Meg disk space which is supposed to hold all the sources & binaries to Minix, gcc, gdb, gas, emacs, g++, and many many other programs). Well, you win some, you lose some. >1. All system hacks (this includes the libraries + includes) go to > Phil & Bruce. If they are going out of action for awhile, perhaps > they should appoint someone to guest-coordinate for awhile in their > stead. No system patches go to the list. Period. Well, it's a bit of a problem because I don't suppose all want to use gas, even I don't yet trust it totally even though it seems to work with my kludge-patch and 32-bit alignment. And then, until Bruce tools are working with 32-bit alignment you lose an important comparison environment - to compare if a program works with GNU tools and/or Bruce tools. My other kernel & lib changes which I have thought are kosher enough I have sent to the list. Also, distributing the kernel / library with two different sets of assembly files is painful. I can't think of a good solution for this. By the way, I now have g++ 1.39.0 running. Not that sure if it works because I don't yet have libg++. I'll release diffs later. //Jyrki