From owner-freebsd-questions@FreeBSD.ORG Fri Dec 29 14:23:16 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D50F816A415 for ; Fri, 29 Dec 2006 14:23:16 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 4DACF13C44C for ; Fri, 29 Dec 2006 14:23:16 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id kBTEMpB4025680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 29 Dec 2006 16:22:58 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id kBTEMgJW001571; Fri, 29 Dec 2006 16:22:45 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id kBSMwLvg018183; Fri, 29 Dec 2006 00:58:21 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 29 Dec 2006 00:58:21 +0200 From: Giorgos Keramidas To: deeptech71@gmail.com Message-ID: <20061228225821.GA18015@kobe.laptop> References: <4592E8EA.6010402@gmail.com> <4592EC6E.9090302@FreeBSD.org> <4592F190.2000206@gmail.com> <20061228135224.GA2463@kobe.laptop> <45941C69.5020601@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45941C69.5020601@gmail.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.833, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.12, BAYES_00 -2.60, DATE_IN_PAST_12_24 1.25, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: where to get the iso c90 compiler? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 14:23:16 -0000 On 2006-12-28 20:35, deeptech71@gmail.com wrote: >Giorgos Keramidas wrote: >> Does the lang/gcc41 port work for you? > > I don't know I don't care. Ok, then. > I want to learn more about compilation processes, get to know > UNIX-like systems more, and whatever. That's ok too. You are bound for a very fun ride, even if it takes years to realize that it never ends, though :) > So I've downloaded the source for gcc, and the README says that I need > the ISO C90 compiler. There is no "ISO C90 compiler". There is an ANSI/ISO standard for the "C Programming Language", which is _implemented_ by some compilers. You already have an installation of the GNU C compiler (GCC), installed as the system compiler of your FreeBSD system. This installation of GCC includes support for some of the standards related to the C Programming Language. You can find out more about the standards supported by your installation of GCC, by running: % info gcc In the "info browser" that pops up, follow the "Standards:" link and you can read a lot of details about the various language standards supported by your GCC installation. > Where do I get that? You have it already. See the "info" documentation of GCC. In short, you can get GCC to run in a special mode, which is almost conforming to the ISO9899:1990 standard for the C language. This mode is enabled by the options: % gcc -ansi -pedantic ... or by the equivalent set of options: % gcc -std=c89 -pedantic ... In this mode, GCC will produce diagnostic messages for all non-ISO programs, with only one notable exception, documented in its manual (see the section `Options Controlling C Dialect'): The alternate keywords `__asm__', `__extension__', `__inline__' and `__typeof__' continue to work despite `-ansi'. You would not want to use them in an ISO C program, of course, but it is useful to put them in header files that might be included in compilations done with `-ansi'. Alternate predefined macros such as `__unix__' and `__vax__' are also available, with or without `-ansi'. This minor exception means that GCC, even with the options mentioned above is *NOT* 100%-conforming to the C90 standard, but it is so close to a fully-conforming implementation of a C90 compiler, that you will hardly ever notice, unless you use one of the extensions listed above. > OK it looks like I can compile gcc 4.1 with an older gcc, but that's > not my choice. I don't know why you feel that this is not a good choice, but if you go through the info documentation of GCC and *still* feel this way, then I'd be interested to know why :) > [ But if that's the case, how was the first gcc compiled? xD ] > [ How was the first ever compiler compiled? xD ] This process is called "compiler bootstrapping". Google for it, and you will be amazed at how it works :-) Regards, Giorgos