Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!olivea!mintaka.lcs.mit.edu!ai-lab!hal.gnu.ai.mit.edu!not-for-mail From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum) Newsgroups: comp.os.386bsd.development Subject: Advice on moving to GCC 2.3.3 Message-ID: <1oc7fi$1h2a@hal.gnu.ai.mit.edu> Date: 19 Mar 93 10:32:18 GMT Organization: dis Lines: 40 NNTP-Posting-Host: hal.ai.mit.edu [I mailed this to someone a few days ago, and thought it might be useful to other people as well.] > Could you suggest a method of replacing the gcc 1.39 with gcc 2.3.3 > without messing up my whole dev system. There are only three things you need to worry about, probably: * When I switched, I replaced /usr/bin/cpp (which used to be a K&R cpp) with a symlink to GCC's cpp (which is an ANSI cpp). This causes the standard symbol concatenation trick (i.e. `foo/**/bar' == `foobar') to fail; under ANSI you use the `##' operator (i.e. `foo##bar'). The only place I found that needed changes due to this was the kernel. (More on this in a second.) * If you rely on structure elements not being word-aligned (as the kernel does), you need to use `#pragma pack(1)'. Probably, if you recompile an entire program, you won't ever have to worry about this. The kernel did because the structures correspond to hardware structures which you obviously can't change the packing of. * asm() has changed a bit. Mostly, new template and constraint characters have been added, and it's more strict about the definitions of constraint characters. (GCC 1 let you get away with some bogosity.) For most programs, the last two concerns are irrelevant. The first is only relevant if you were using /usr/bin/cpp; I think GCC was using /usr/libexec/cpp, which was also an ANSI cpp (the one that came with GCC). > Also, is that Elm2.4pl21.tar.Z compiled using gcc 2.3.3? Everything on my server is compiled with GCC 2.3.3; I deleted GCC 1.39 so I wouldn't accidentally use it any more. B-) -- \ / Charles Hannum, mycroft@ai.mit.edu /\ \ PGP public key available on request. MIME, AMS, NextMail accepted. Scheme White heterosexual atheist male (WHAM) pride!