From owner-freebsd-arch Wed Jan 30 19:21:18 2002 Delivered-To: freebsd-arch@freebsd.org Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by hub.freebsd.org (Postfix) with ESMTP id D468237B404 for ; Wed, 30 Jan 2002 19:21:13 -0800 (PST) Received: from pool0224.cvx40-bradley.dialup.earthlink.net ([216.244.42.224] helo=mindspring.com) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 16W7mc-0000WF-00; Wed, 30 Jan 2002 19:21:06 -0800 Message-ID: <3C58B817.CD4BA183@mindspring.com> Date: Wed, 30 Jan 2002 19:20:55 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Kutulu Cc: Anders Andersson , Jordan Hubbard , Dallas De Atley , arch@FreeBSD.ORG Subject: Re: __P macro question References: <3C57BED2.E1144F41@mindspring.com> <66467.1012412972@winston.freebsd.org> <20020130175639.GB2437@sushi.sanyusan.se> <3C588DCF.AFC83B3@mindspring.com> <019701c1aa19$27b2fb30$81663244@longhill1.md.home.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Kutulu wrote: > I generally understand the reason for/against using the prototype-hiding > macro. However, your (Terry's) position repeatedly argues for keeping this > in code to avoid being dependant on GCC. This is not accurate. I am arguing that the code should be portable to tool chains other than the FreeeBSD i386 port tool chain. This happens to be GCC. So, really, there are two issues: 1) I would like to avoid dependence on needing an ANSI C compiler, because I like running interoperable code everywhere I can; if I have something one place, I want it every place (bash, emacs, and NetBSD users should identify with this). I think the handwriting is on the wall on this one, and non-ANSI compiler support is going to be killed; however, I feel compelled to point out the flaws in the arguments for this, which are the following false assumptions: o GCC runs everywhere, and it's easy to port where it doesn't [this adds to the cost of any project] o There is no ongoing cost to maintaining a port of GCC to a new platform, so if there is not ANSI compiler, there's GCC [there is a two year source availability clause in the GPL that can only be satisfied by a source escrow, to meet the terms of the license, should the GCC people not integrate your port into their distribution] 2) I would like to avoid the dependency on the GCC compiler, itself, for several reasons: o As a matter of general principle o As a "CYA" on the "or any future version of this license" clause under which the code was obtained. o The code generated by the GCC compiler is not as good as that available in other compilers, particularly for the P4, Alpha, PPC, and SPARC, all of which are more important than the i386, for which support has been dropped in GENERIC, and is only available through recompilation with alternate configuration options o Use of GCC'isms will result in naeive programmers writing code that can not be compiled with even other ANSI-C standard compilers (e.g. TenDRA, the Compaq Alpha compiler, the SunSoft SPARC compiler, the Intel IA32/IA64 compilers, etc.), in much the same way that use of "bash" and "GNU make" on Linux has resulted in shell scripts and Makefiles which are not portable to other platforms... and worse, tools that automatically generate these scripts and Makefiles, not knowing that their output amplification effect will result in widescale problems. I feel compelled to also point out the flaws in the "All the world is GCC" arguments for this, which are the following false assumptions: o GCC is available everywhere [it's not] o The code will only ever be used in the context of FreeBSD itself, not a reference for another platform [this is a really bogus assumption, and exposes the heart of why FreeBSD is distributed under the BSD license rather than the GPL: to make its source code useful as a reference implementation in other than FreeBSD] o Use of GCC is preferrable [as pointed out above, the code generation is non-optimal] o There is no cost to using GCC [also, noted above] Here is Intel's paper on "software optimization techniques and tools to achieve leading-edge performance on current and future generations of the IA-32 high-performance processors"... in other words, this information will continue to be valid going forward: http://developer.intel.com/design/pentium4/papers/249438.htm A short summary: Don't do what GCC does > Is GCC the only UNIX compiler that can compile code with prototypes? > Isn't that an ANSI standard requirement, not a gcc-ism? I have never > used any compiler other than gcc and some Borland stuff, so I really > don't know the answer, but it seems to me that anyone, like myself, > coming into UNIX development at this point in time would expect *some* > ANSI-enabled compiler to be around for any platform, wether the GNU > people wrote it or not. > > Is this a stupid assumption to make? For certain problem domains, it is an incorrect assumption; the problems are deeper than they are being portrayed by some. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message