Re: Clang - what is the story?
On 22/01/2012 22:53, Da Rock wrote: What part is that? I thought it had to be all c... Not at all. clang and llvm are themselves written in C++. However, it's groff that Roland mentioned as the canonical example of C++ in base. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Clang - what is the story?
kpn...@pobox.com wrote: Lattice C Later bought out by Microsoft IIRC ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Mon, Jan 23, 2012 at 12:01 PM, per...@pluto.rain.com wrote: kpn...@pobox.com wrote: Lattice C Later bought out by Microsoft IIRC ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org Adam David Alan Martin did a very nice intro to CLANG at NYC*BUG in October, in particular the comparison of ease of use with gcc is very nice here: October 5, 2011. ADAM David Alan Martin on Clang on FreeBSD.http://www.fetissov.org/public/nycbug/nycbug-10-05-11.mp3 http://www.fetissov.org/public/nycbug/nycbug-10-05-11.mp3can't seem to find the slides for the talk, maybe someone from admin@nycbug has a link they can share. -- regards, matt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Mon, Jan 23, 2012 at 08:54:32AM +, Matthew Seaman wrote: On 22/01/2012 22:53, Da Rock wrote: What part is that? I thought it had to be all c... Not at all. clang and llvm are themselves written in C++. However, it's groff that Roland mentioned as the canonical example of C++ in base. And people have been grumbling about that for years, up to the point that a viable and indeed much smaller replacement (mandoc, in the textproc/mdocml port) has been written in C. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgp0FYk1gfxHU.pgp Description: PGP signature
Re: Clang - what is the story?
On Mon, Jan 23, 2012 at 08:53:36AM +1000, Da Rock wrote: On 01/23/12 07:26, Chad Perrin wrote: On Sun, Jan 22, 2012 at 09:33:02PM +0100, Roland Smith wrote: PCC is only a C compiler, and there is some C++ code (e.g. groff) in the base system. The FreeBSD port is marked as i386 and amd64 only, even though other architectures seem to be there in the PCC source. I had somehow forgotten there was anything in the base system written in C++. That would probably account for the choice of Clang over PCC. What part is that? I thought it had to be all c... To the best of my knowledge the restriction to C only applies to the kernel and libraries, not to the utilities in the base system. And it is for a technical reason. C++ mangles function names to e.g. include argument types and class names. See [http://en.wikipedia.org/wiki/Name_mangling#Name_mangling_in_C.2B.2B]. This practically means that you can use a C library from a C++ program, but not the other way around. Then again, the kernel has more restrictions. Like no floating point allowed and no libc available. And presumably many more w.r.t. locking of data structures and practical limits on interrupt handlers. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgpnUWoFLdT0T.pgp Description: PGP signature
Re: Clang - what is the story?
On 01/22/12 17:45, Chad Perrin wrote: On Sun, Jan 22, 2012 at 05:09:52PM +1000, Da Rock wrote: On 01/22/12 17:02, Chad Perrin wrote: On Sat, Jan 21, 2012 at 03:43:13PM +, RW wrote: I was just wondering what would have happened if Apple hadn't backed clang/LLVM as BSD licensed projects. Was there a plan B (other than gcc 4.2.1) or did Apple save the *BSD world? The backup plan was probably PCC. Whats actually surprising is that it wasn't used as plan A (I just looked it up); It then would have come full circle ;) A couple years ago, it looked like a race between PCC and TenDRA, but Clang seemed to just come out of nowhere and steal all the attention. All three of them had a lot to recommend them, but then the TenDRA modernization project evaporated and everybody jumped on the Clang wagon. At least, that's how it looked to me. Wow! I'm going to have to do some more research on compilers- I've never heard of these until now... I sound pretty stupid don't I? :P ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
While on the subject of Clang, is this compiler only for C, C++ and Objective-C? What about Ada and Fortran? Does one need GCC for that? Dragonlace for Ada? I believe some of the ports require GCC. Many of these ports are developed primarily for Linux and subsequently ported to FreeBSD ports and NetBSD-based pkgsrc. Tom ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On 22/01/2012 11:50, Thomas Mueller wrote: While on the subject of Clang, is this compiler only for C, C++ and Objective-C? Correct. Clang is the LLVM front-end for that family of languages. What about Ada and Fortran? Does one need GCC for that? Dragonlace for Ada? There are other LLVM front-ends for different languages. Plus you can use GCC to compile to an intermediate representation and then let LLVM do the rest. I believe some of the ports require GCC. Many of these ports are developed primarily for Linux and subsequently ported to FreeBSD ports and NetBSD-based pkgsrc. Clang aims to be completely gcc compatible. It isn't quite there yet. Most of the ports that don't compile with clang are actually doing questionable things with their code that gcc should probably reject too. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Clang - what is the story?
On Sun, Jan 22, 2012 at 07:06:04PM +1000, Da Rock wrote: On 01/22/12 17:45, Chad Perrin wrote: A couple years ago, it looked like a race between PCC and TenDRA, but Clang seemed to just come out of nowhere and steal all the attention. All three of them had a lot to recommend them, but then the TenDRA modernization project evaporated and everybody jumped on the Clang wagon. At least, that's how it looked to me. Wow! I'm going to have to do some more research on compilers- I've never heard of these until now... I sound pretty stupid don't I? :P Nah. TenDRA was pretty obscure except in certain circles related to DRA, I think -- and DRA (Defense Research Agency), something like a UK equivalent to the US DARPA (Defense Advanced Research Projects Agency), ceased to exist in the mid-1990s, making it and anything related to it even more obscure since then. I don't know whether DERA (which replaced DRA) did anything with TenDRA. I almost forgot that in addition to the TenDRA project, there was also the Ten15 project; TenDRA had forked somewhere along the way. As far as I'm aware, Ten15 was farther out of date and less actively developed at the time I was talking to TenDRA developers and offering a little bit of help with that project. I never really got involved with Ten15 at all, so my knowledge of it is *really* scant. PCC (Portable C Compiler), meanwhile, spent many years essentially unused except in some of the dustier corners of Unix user communities before being actively developed again as more and more people started wanting a copyfree C compiler alternative to the very copyleft GCC. PCC was a big deal for a while, and I think most C compilers were based on it to some extent in the early '80s, but its influenced waned enough that GCC replaced it pretty much everywhere by about the same time DRA went away. As things stand now, I don't think anyone is actively developing TenDRA (and in fact I wonder if all the more recent work on it has been lost), but the modern PCC project reached 1.0 release last year and is reputedly building OpenBSD kernels without a hitch. There has been some talk of it being the GCC replacement for OpenBSD and maybe even NetBSD, though I seem to recall Theo de Raadt doesn't consider replacing GCC a very urgent requirement right now (which might be part of the reason AerieBSD explicitly prioritizes rejecting copyfree software after it forked from OpenBSD, though that's just speculation by me, based in part on the fact it appears PCC is in the AerieBSD base system). Another option that hasn't been mentioned -- and I don't think it was ever really considered for FreeBSD as a GCC-replacement, but I don't actually know that for sure -- is The Amsterdam Compiler Kit, sometimes called TACK or ACK. It, too, uses a BSD license, as does PCC and as did TenDRA. TACK is the base system (I'm not sure they use that word, really) for MINIX3, I think. Beyond that, and the fact it was originally available only under commercial license, I don't really know anything about it. The reason I started writing this email was just to mention that this stuff has all been pretty obscure compared to the much higher profile Clang and GCC projects. That common thread should, I hope, be clear in my descriptions of the various projects I mentioned, so no -- I don't think you sound pretty stupid for not knowing about them. In fact, to reach the level of stupid, I think you'd have to be one of the dismaying number of people in the Linux world who kludge together C code and apparently aren't aware there are any C compilers available that don't come from the GNU Project or Microsoft, or the craptons of Visual Studio developers who have never realized C can be compiled without Visual Studio. (Clarification: I'm not saying all Linux-based C hackers are stupid, nor even that all coders who use Visual Studio are stupid. There are a lot of smart people in both groups. I just don't know of anyone who doesn't realize there's more than one or two C compilers currently maintained except for some members of the above-mentioned groups.) -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Sun, Jan 22, 2012 at 05:37:48AM -0700, Chad Perrin wrote: There has been some talk of it being the GCC replacement for OpenBSD and maybe even NetBSD, though I seem to recall Theo de Raadt doesn't consider replacing GCC a very urgent requirement right now (which might be part of the reason AerieBSD explicitly prioritizes rejecting copyfree software after it forked from OpenBSD, though that's just speculation by me, based in part on the fact it appears PCC is in the AerieBSD base system). Correction: s/copyfree/copyleft/ AerieBSD favors copyfree software and chooses to reject copyleft software as much as it reasonably can. It does *not* reject copyfree software. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On 01/22/12 22:37, Chad Perrin wrote: On Sun, Jan 22, 2012 at 07:06:04PM +1000, Da Rock wrote: On 01/22/12 17:45, Chad Perrin wrote: A couple years ago, it looked like a race between PCC and TenDRA, but Clang seemed to just come out of nowhere and steal all the attention. All three of them had a lot to recommend them, but then the TenDRA modernization project evaporated and everybody jumped on the Clang wagon. At least, that's how it looked to me. Wow! I'm going to have to do some more research on compilers- I've never heard of these until now... I sound pretty stupid don't I? :P Nah. TenDRA was pretty obscure except in certain circles related to DRA, I think -- and DRA (Defense Research Agency), something like a UK equivalent to the US DARPA (Defense Advanced Research Projects Agency), ceased to exist in the mid-1990s, making it and anything related to it even more obscure since then. I don't know whether DERA (which replaced DRA) did anything with TenDRA. I almost forgot that in addition to the TenDRA project, there was also the Ten15 project; TenDRA had forked somewhere along the way. As far as I'm aware, Ten15 was farther out of date and less actively developed at the time I was talking to TenDRA developers and offering a little bit of help with that project. I never really got involved with Ten15 at all, so my knowledge of it is *really* scant. Wikipedia was very helpful with this one. PCC (Portable C Compiler), meanwhile, spent many years essentially unused except in some of the dustier corners of Unix user communities before being actively developed again as more and more people started wanting a copyfree C compiler alternative to the very copyleft GCC. PCC was a big deal for a while, and I think most C compilers were based on it to some extent in the early '80s, but its influenced waned enough that GCC replaced it pretty much everywhere by about the same time DRA went away. According to wiki it was the compiler for unix- particularly bsd up to 4.4 (FreeBSD's parent prior to becoming opensource). As things stand now, I don't think anyone is actively developing TenDRA (and in fact I wonder if all the more recent work on it has been lost), According to wiki there was one person on the job and has grown to a team now- how many I don't know :) but the modern PCC project reached 1.0 release last year and is reputedly building OpenBSD kernels without a hitch. There has been some talk of it being the GCC replacement for OpenBSD and maybe even NetBSD, though I seem to recall Theo de Raadt doesn't consider replacing GCC a very urgent requirement right now (which might be part of the reason AerieBSD explicitly prioritizes rejecting copyfree software after it forked from OpenBSD, though that's just speculation by me, based in part on the fact it appears PCC is in the AerieBSD base system). Haven't heard of the new BSD, but I did find the comment from Raadt. Another option that hasn't been mentioned -- and I don't think it was ever really considered for FreeBSD as a GCC-replacement, but I don't actually know that for sure -- is The Amsterdam Compiler Kit, sometimes called TACK or ACK. It, too, uses a BSD license, as does PCC and as did TenDRA. TACK is the base system (I'm not sure they use that word, really) for MINIX3, I think. Beyond that, and the fact it was originally available only under commercial license, I don't really know anything about it. I'm pretty sure that was on the list of compilers mentioned at wikipedia. I was going to take a better look at the list when I get some time. Maybe even try them out... The reason I started writing this email was just to mention that this stuff has all been pretty obscure compared to the much higher profile Clang and GCC projects. That common thread should, I hope, be clear in my descriptions of the various projects I mentioned, so no -- I don't think you sound pretty stupid for not knowing about them. In fact, to reach the level of stupid, I think you'd have to be one of the dismaying number of people in the Linux world who kludge together C code and apparently aren't aware there are any C compilers available that don't come from the GNU Project or Microsoft, or the craptons of Visual Studio developers who have never realized C can be compiled without Visual Studio. I personally had no idea this was going on; my impression was gcc grew out of the original compiler that built unix, and the only choices were borland and gcc. The former for win32 crap and the latter for, well, everything else. Well. Consider me enlightened... ;) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: I personally had no idea this was going on; my impression was gcc grew out of the original compiler that built unix, and the only choices were borland and gcc. The former for win32 crap and the latter for, well, everything else. Once upon a time, there were _many_ alternatives for C compilers. Commercial -- i.e. 'you pay for it', or bundled with a pay O/S -- offerings included (this is a _partial_ list, ones _I_ have personal knowledge of): PCC -- (the original one0 medium-lousy code but the code-generator was easily adapted to new/diferent hardwre Green Hills Softwaware (used by a number of unix hardare manufacturers) Sun Microsystems developed their own (acc) Silicon Graphics, Inc Hewlett-Packard Symantic (Think C -- notable for high-performance on early Apple Mac's, significantly better than Apple's own MPW) Manx Software (Aztec C -- a 'best of breed' for MS-DOS) Microsoft Intel CCS Watcom Borland Zortech Greenleaf Software Ellis Computing (specializing in 'budget' compilers, circa $30 pricetags) Small C tcc -- the 'tiny C compiler I'm sure others can name ones I've overlooked. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On 01/23/12 00:38, Robert Bonomi wrote: Da Rockfreebsd-questi...@herveybayaustralia.com.au wrote: I personally had no idea this was going on; my impression was gcc grew out of the original compiler that built unix, and the only choices were borland and gcc. The former for win32 crap and the latter for, well, everything else. Once upon a time, there were _many_ alternatives for C compilers. Commercial -- i.e. 'you pay for it', or bundled with a pay O/S -- offerings included (this is a _partial_ list, ones _I_ have personal knowledge of): PCC -- (the original one0 medium-lousy code but the code-generator was easily adapted to new/diferent hardwre Green Hills Softwaware (used by a number of unix hardare manufacturers) Sun Microsystems developed their own (acc) Silicon Graphics, Inc Hewlett-Packard Symantic (Think C -- notable for high-performance on early Apple Mac's, significantly better than Apple's own MPW) Manx Software (Aztec C -- a 'best of breed' for MS-DOS) Microsoft Intel CCS Watcom Borland Zortech Greenleaf Software Ellis Computing (specializing in 'budget' compilers, circa $30 pricetags) Small C tcc -- the 'tiny C compiler Wow... I have some research to do... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
* Re: Clang - what is the story?
On Jan 22, 2012, at 6:38 AM, Robert Bonomi bon...@mail.r-bonomi.com wrote: Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: I personally had no idea this was going on; my impression was gcc grew out of the original compiler that built unix, and the only choices were borland and gcc. The former for win32 crap and the latter for, well, everything else. Once upon a time, there were _many_ alternatives for C compilers. Commercial -- i.e. 'you pay for it', or bundled with a pay O/S -- offerings included (this is a _partial_ list, ones _I_ have personal knowledge of): PCC -- (the original one0 medium-lousy code but the code-generator was easily adapted to new/diferent hardwre Green Hills Softwaware (used by a number of unix hardare manufacturers) Sun Microsystems developed their own (acc) Silicon Graphics, Inc Hewlett-Packard Symantic (Think C -- notable for high-performance on early Apple Mac's, significantly better than Apple's own MPW) Ah, MPW... I knew ye well. But don't forget Metrowerks CodeWarrior Though, I preferred the finicky-ways of MPW (requiring explicit headers) to the fast-and-loose ways of MCW. -- Devin Manx Software (Aztec C -- a 'best of breed' for MS-DOS) Microsoft Intel CCS Watcom Borland Zortech Greenleaf Software Ellis Computing (specializing in 'budget' compilers, circa $30 pricetags) Small C tcc -- the 'tiny C compiler I'm sure others can name ones I've overlooked. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
Hi, Reference: From: Da Rock freebsd-questi...@herveybayaustralia.com.au Reply-to: freebsd-questions@freebsd.org Date: Mon, 23 Jan 2012 01:13:49 +1000 Message-id: 4f1c27ad.9070...@herveybayaustralia.com.au Da Rock wrote: On 01/23/12 00:38, Robert Bonomi wrote: Da Rockfreebsd-questi...@herveybayaustralia.com.au wrote: I personally had no idea this was going on; my impression was gcc grew out of the original compiler that built unix, and the only choices were borland and gcc. The former for win32 crap and the latter for, well, everything else. Once upon a time, there were _many_ alternatives for C compilers. Commercial -- i.e. 'you pay for it', or bundled with a pay O/S -- offerings included (this is a _partial_ list, ones _I_ have personal knowledge of): PCC -- (the original one0 medium-lousy code but the code-generator was easily adapted to new/diferent hardwre Green Hills Softwaware (used by a number of unix hardare manufacturers) Sun Microsystems developed their own (acc) Silicon Graphics, Inc Hewlett-Packard Symantic (Think C -- notable for high-performance on early Apple Mac's, significantly better than Apple's own MPW) Manx Software (Aztec C -- a 'best of breed' for MS-DOS) Microsoft Intel CCS Watcom Borland Zortech Greenleaf Software Ellis Computing (specializing in 'budget' compilers, circa $30 pricetags) Small C tcc -- the 'tiny C compiler Wow... I have some research to do... Memories :-) I recall the Portable C compiler was not the original, There was an earlier C native to PDP11, not portable; pcc was the rewrite to make it portable at the expense of inefficiency. Before C there was B http://en.wikipedia.org/wiki/B_programming_language ( which had some relation to BCPL http://en.wikipedia.org/wiki/BCPL told me by Bob Eager, in Canterbury, Kent, England, decades back) Yet another C compiler (or 2 ?): Munich, Germany, 1985: Siemens was already licensing a C compiler from an American chap, (I can't remember his name). Siemens shipped it with their Sinix, a Unix that ran on i386 ns32000 series. Their Sinix had translations integrated in seven human languages (my job). A few years on, Terry Carroll in Munich was trying to sell his own C compiler [bits (not sure if he got to a whole compiler)]. Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com Reply below not above, cumulative like a play script, indent with . Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
kpn...@pobox.com writes: Hi, Lattice C - targeted MS-DOS, AmigaOS, probably others. Had a 32-bit int on the Amiga, where Manx had a 16-bit int. When Commodore ported BSD sockets to the Amiga they had to change all the ints to longs because of this. Was renamed SAS/C towards the end of the Amiga product. And those who did C development on Atari ST probably remember of DRI Alcyon C (a quick port of CPM/68K C Compiler) Pure C (a Turbo C like IDE compiler). Éric Masson -- Warning: file /home/emss/misc/fortune/En_sig.dat unreadable Warning: file /home/emss/misc/fortune/Fr_sig.dat unreadable Faut vraiment que je m'occupe de ce problème de signature :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Jan 22, 2012, at 2:12 PM, Eric Masson wrote: kpn...@pobox.com writes: Hi, Lattice C - targeted MS-DOS, AmigaOS, probably others. Had a 32-bit int on the Amiga, where Manx had a 16-bit int. When Commodore ported BSD sockets to the Amiga they had to change all the ints to longs because of this. Was renamed SAS/C towards the end of the Amiga product. And those who did C development on Atari ST probably remember of DRI Alcyon C (a quick port of CPM/68K C Compiler) Pure C (a Turbo C like IDE compiler). Éric Masson Sadly I do. In fact I still have a Mega St in my basement... ;-S Regards, Mikel King BSD News Network http://bsdnews.net skype: mikel.king http://twitter.com/mikelking ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Sun, Jan 22, 2012 at 10:55:18PM +1000, Da Rock wrote: On 01/22/12 22:37, Chad Perrin wrote: PCC (Portable C Compiler), meanwhile, spent many years essentially unused except in some of the dustier corners of Unix user communities before being actively developed again as more and more people started wanting a copyfree C compiler alternative to the very copyleft GCC. PCC was a big deal for a while, and I think most C compilers were based on it to some extent in the early '80s, but its influenced waned enough that GCC replaced it pretty much everywhere by about the same time DRA went away. According to wiki it was the compiler for unix- particularly bsd up to 4.4 (FreeBSD's parent prior to becoming opensource). Yeah, that's pretty much the case. As things stand now, I don't think anyone is actively developing TenDRA (and in fact I wonder if all the more recent work on it has been lost), According to wiki there was one person on the job and has grown to a team now- how many I don't know :) As far as I'm aware, there was a team for a while, and a fork in the effort, and now both forks have basically died (see my above explanation). After a glance at the Wikipedia article about TenDRA, I think it was only referring to the pre-death period and not now for when there is/was a team. Well. Consider me enlightened... ;) I'm glad I could help. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Mon, Jan 23, 2012 at 01:13:49AM +1000, Da Rock wrote: On 01/23/12 00:38, Robert Bonomi wrote: Da Rockfreebsd-questi...@herveybayaustralia.com.au wrote: I personally had no idea this was going on; my impression was gcc grew out of the original compiler that built unix, and the only choices were borland and gcc. The former for win32 crap and the latter for, well, everything else. Once upon a time, there were _many_ alternatives for C compilers. Commercial -- i.e. 'you pay for it', or bundled with a pay O/S -- offerings included (this is a _partial_ list, ones _I_ have personal knowledge of): PCC -- (the original one0 medium-lousy code but the code-generator was easily adapted to new/diferent hardwre Green Hills Softwaware (used by a number of unix hardare manufacturers) Sun Microsystems developed their own (acc) Silicon Graphics, Inc Hewlett-Packard Symantic (Think C -- notable for high-performance on early Apple Mac's, significantly better than Apple's own MPW) Manx Software (Aztec C -- a 'best of breed' for MS-DOS) Microsoft Intel CCS Watcom Borland Zortech Greenleaf Software Ellis Computing (specializing in 'budget' compilers, circa $30 pricetags) Small C tcc -- the 'tiny C compiler Wow... I have some research to do... Maybe not. It depends on what you want to learn. PCC was already mentioned. Watcom C's license is overly complex and probably legally problematic. Small-C Compiler is a compiler for the Small-C language, which is only a subset of C. The Tiny C Compiler is copyleft licensed, so not as ideal a choice as Clang, PCC, and TenDRA have been at various points in time when choosing a new C compiler for a BSD Unix base system. If I'm not mistaken, everything else on that list is not even open source software. If you just want to know about C compilers, it's fun to read about all this stuff. If you specifically want to know about options that might be suitable for use as GCC-replacement in BSD Unix systems, there's far less to read. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
Quoth Robert Bonomi on Sunday, 22 January 2012: Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: I personally had no idea this was going on; my impression was gcc grew out of the original compiler that built unix, and the only choices were borland and gcc. The former for win32 crap and the latter for, well, everything else. Once upon a time, there were _many_ alternatives for C compilers. Commercial -- i.e. 'you pay for it', or bundled with a pay O/S -- offerings included (this is a _partial_ list, ones _I_ have personal knowledge of): PCC -- (the original one0 medium-lousy code but the code-generator was easily adapted to new/diferent hardwre Green Hills Softwaware (used by a number of unix hardare manufacturers) Sun Microsystems developed their own (acc) Silicon Graphics, Inc Hewlett-Packard Symantic (Think C -- notable for high-performance on early Apple Mac's, significantly better than Apple's own MPW) Manx Software (Aztec C -- a 'best of breed' for MS-DOS) Microsoft Intel CCS Watcom Borland Zortech Greenleaf Software Ellis Computing (specializing in 'budget' compilers, circa $30 pricetags) Small C tcc -- the 'tiny C compiler I'm sure others can name ones I've overlooked. I used a horrible C compiler on CP/M -- I guess I've blocked its name out of my memory. Anything you found in KR that sounded cool you had to go write a test program to see if this compiler actually supported it. Sometimes it did, but differently. -- .O. | Sterling (Chip) Camden | http://camdensoftware.com ..O | sterl...@camdensoftware.com | http://chipsquips.com OOO | 2048R/D6DBAF91 | http://chipstips.com pgpPyQUEALvSD.pgp Description: PGP signature
Re: Clang - what is the story?
On Sun, Jan 22, 2012 at 05:37:48AM -0700, Chad Perrin wrote: PCC (Portable C Compiler), meanwhile, spent many years essentially unused PCC is only a C compiler, and there is some C++ code (e.g. groff) in the base system. The FreeBSD port is marked as i386 and amd64 only, even though other architectures seem to be there in the PCC source. actually know that for sure -- is The Amsterdam Compiler Kit, sometimes According to [http://tack.sourceforge.net/about.html], the ACK doesn't support all architectures that FreeBSD does. Nor does it list FreeBSD as a supported platform. Personally I think it is a good thing to have different C compilers. In the past I've installed pcc just to see if my programs compiled OK. Now I tend to use clang for that. It does a great job of identifying programming errors. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgp2ycx6WWvCV.pgp Description: PGP signature
Re: Clang - what is the story?
On Sun, Jan 22, 2012 at 09:33:02PM +0100, Roland Smith wrote: PCC is only a C compiler, and there is some C++ code (e.g. groff) in the base system. The FreeBSD port is marked as i386 and amd64 only, even though other architectures seem to be there in the PCC source. I had somehow forgotten there was anything in the base system written in C++. That would probably account for the choice of Clang over PCC. Personally I think it is a good thing to have different C compilers. In the past I've installed pcc just to see if my programs compiled OK. Now I tend to use clang for that. It does a great job of identifying programming errors. I have found it rather disconcerting for quite some time now that the open source development community -- normally quite clued in to the benefits of diversity and friendly, competitive collaboration for maintaining a strong software ecosystem with lots of high quality options -- has been so singularly overrun by a single C compiler (GCC), especially given the central importance of C to the development of the major open source OSes. The problem was compounded by the increasingly byzantine design of GCC itself and the proliferation of ugly edge-cases that created. I was saddened as well to see that TenDRA had vanished, because I thought it brought some important perspective (somewhat unique to its development ideals) to the selection of available compilers, as do PCC, LLVM/Clang, and even the Small-C Compiler. I hope that even if nobody else makes it the official compiler of any language, AerieBSD remains an active project with PCC as part of its base system, and that MINIX3 establishes itself reasonably well with TACK, if only to ensure more than two viable C compiler options for members of major open source Unixy OS families. Four is probably a good number, with a few less-central implementations floating around as well to explore the fringes. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On 01/23/12 07:26, Chad Perrin wrote: On Sun, Jan 22, 2012 at 09:33:02PM +0100, Roland Smith wrote: PCC is only a C compiler, and there is some C++ code (e.g. groff) in the base system. The FreeBSD port is marked as i386 and amd64 only, even though other architectures seem to be there in the PCC source. I had somehow forgotten there was anything in the base system written in C++. That would probably account for the choice of Clang over PCC. What part is that? I thought it had to be all c... Personally I think it is a good thing to have different C compilers. In the past I've installed pcc just to see if my programs compiled OK. Now I tend to use clang for that. It does a great job of identifying programming errors. I have found it rather disconcerting for quite some time now that the open source development community -- normally quite clued in to the benefits of diversity and friendly, competitive collaboration for maintaining a strong software ecosystem with lots of high quality options -- has been so singularly overrun by a single C compiler (GCC), especially given the central importance of C to the development of the major open source OSes. The problem was compounded by the increasingly byzantine design of GCC itself and the proliferation of ugly edge-cases that created. I was saddened as well to see that TenDRA had vanished, because I thought it brought some important perspective (somewhat unique to its development ideals) to the selection of available compilers, as do PCC, LLVM/Clang, and even the Small-C Compiler. I hope that even if nobody else makes it the official compiler of any language, AerieBSD remains an active project with PCC as part of its base system, and that MINIX3 establishes itself reasonably well with TACK, if only to ensure more than two viable C compiler options for members of major open source Unixy OS families. Four is probably a good number, with a few less-central implementations floating around as well to explore the fringes. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On 21/01/2012 12:11, Da Rock wrote: I've been seeing a lot of hoorays and pats on the back and a general feeling satisfaction in being able to use clang to compile FreeBSD and ports. The only reason I can see from searching is a need to get away from gcc (which is tried and tested since the beginning of time) which is now apparently GPLv3. Can someone offer some clarity as to the importance of this? I'm guessing the that stepping away from GPL is generally a good thing, especially if there is something similar with similar license structure to BSD; I just can't understand the rush of it. The problem is exactly the GPLv3. The version of gcc in the base system is gcc-4.2, the last version licensed under the old GPLv2 terms, but now looking quite elderly and not resulting in the best performance. Even under GPL anything built using gcc can be licensed as you like, so I doubt it could be that. I'm not skeptical, just curious- trying to get my head around some of the dev side of things :) Unfortunately, no -- you can't necessarily license anything compiled with a GPLv3 compiler using whatever license you prefer. For instance, one problem is that executables will be linked against libraries which are part of the compiler -- and the viral nature of GPLv3 means that the resulting programs have in their turn to be licensed under GPLv3. That's not acceptable for FreeBSD, hence the decision to switch to a BSD licensed toolchain using clang. 9.0 is really an intermediate step in the changeover -- gcc and clang are both provided in the base system and its a matter of administrative choice which one is chosen for compiling the system. One consequence of the change is that it will become more common to install a recent version of gcc from ports to facilitate compiling gcc-only software, with the rest of ports typically compiled with either that ports-gcc or the base clang. This is fairly new at the moment, and there still needs to be a deal of debugging effort put into making the ports work well with compilers other than the base gcc-4.2. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Clang - what is the story?
On Sat, 21 Jan 2012 22:11:18 +1000 Da Rock wrote: I've been seeing a lot of hoorays and pats on the back and a general feeling satisfaction in being able to use clang to compile FreeBSD and ports. The only reason I can see from searching is a need to get away from gcc (which is tried and tested since the beginning of time) which is now apparently GPLv3. Can someone offer some clarity as to the importance of this? I'm guessing the that stepping away from GPL is generally a good thing, especially if there is something similar with similar license structure to BSD; I just can't understand the rush of it. Even under GPL anything built using gcc can be licensed as you like, so I doubt it could be that. It is that. I don't know the details, but GPLv3 is sufficiently more viral that recent gcc versions can't be used as the base system compiler. We're currently stuck with a version from 2007. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Sat, 21 Jan 2012 13:35:06 + RW wrote: On Sat, 21 Jan 2012 22:11:18 +1000 Da Rock wrote: Even under GPL anything built using gcc can be licensed as you like, so I doubt it could be that. It is that. I don't know the details, but GPLv3 is sufficiently more viral that recent gcc versions can't be used as the base system compiler. We're currently stuck with a version from 2007. I was just wondering what would have happened if Apple hadn't backed clang/LLVM as BSD licensed projects. Was there a plan B (other than gcc 4.2.1) or did Apple save the *BSD world? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Sat, Jan 21, 2012 at 7:11 AM, Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: I've been seeing a lot of hoorays and pats on the back and a general feeling satisfaction in being able to use clang to compile FreeBSD and ports. The only reason I can see from searching is a need to get away from gcc (which is tried and tested since the beginning of time) which is now apparently GPLv3. Can someone offer some clarity as to the importance of this? I'm guessing the that stepping away from GPL is generally a good thing, especially if there is something similar with similar license structure to BSD; I just can't understand the rush of it. Even under GPL anything built using gcc can be licensed as you like, so I doubt it could be that. I'm not skeptical, just curious- trying to get my head around some of the dev side of things :) __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org The reasons for Clang are not just for the GPLv3 issue, but Clang is architecturally superior in many ways over GCC, Clang was designed from the ground up to learn from GCCs mistakes and to be a better C compiler. One of the Clang's features is better debugging and a more modular architecture that is easier to develop and extend. GCC has often been criticised for its monolithic and inflexible structure that has often hindered implementing new features and functionality. One of the advantages of Clang is that it can be more easily plugged into IDEs for integrated debugging. You can read all about the many advantages and innovations of clang and how it exceeds GCC here: http://clang.llvm.org/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On 01/21/12 14:35, RW wrote: [...] It is that. I don't know the details, but GPLv3 is sufficiently more viral that recent gcc versions can't be used as the base system compiler. We're currently stuck with a version from 2007. Sorry if this has been asked before, but it makes me wonder, what are the plans for SPARC and PowerPC? Raimund -- Worringer Str 31 Duesseldorf 40211 Germany +49-179-2981632 icq 16845346 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On 21/01/2012 17:47, Raimund Steger wrote: On 01/21/12 14:35, RW wrote: [...] It is that. I don't know the details, but GPLv3 is sufficiently more viral that recent gcc versions can't be used as the base system compiler. We're currently stuck with a version from 2007. Sorry if this has been asked before, but it makes me wonder, what are the plans for SPARC and PowerPC? PowerPC is apparently supported by clang, so ultimately it should just switch over like i386 and amd64. Clang doesn't compile on sparc64 at the moment. I assume this is just a temporary state of affairs and sparc64 support will be forthcoming eventually. Until then sparc64 will have to make do with the current gcc in base. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Clang - what is the story?
On 01/22/12 02:39, David Jackson wrote: On Sat, Jan 21, 2012 at 7:11 AM, Da Rock freebsd-questi...@herveybayaustralia.com.au wrote: I've been seeing a lot of hoorays and pats on the back and a general feeling satisfaction in being able to use clang to compile FreeBSD and ports. The only reason I can see from searching is a need to get away from gcc (which is tried and tested since the beginning of time) which is now apparently GPLv3. Can someone offer some clarity as to the importance of this? I'm guessing the that stepping away from GPL is generally a good thing, especially if there is something similar with similar license structure to BSD; I just can't understand the rush of it. Even under GPL anything built using gcc can be licensed as you like, so I doubt it could be that. I'm not skeptical, just curious- trying to get my head around some of the dev side of things :) __**_ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-** unsubscr...@freebsd.orgfreebsd-questions-unsubscr...@freebsd.org The reasons for Clang are not just for the GPLv3 issue, but Clang is architecturally superior in many ways over GCC, Clang was designed from the ground up to learn from GCCs mistakes and to be a better C compiler. One of the Clang's features is better debugging and a more modular architecture that is easier to develop and extend. GCC has often been criticised for its monolithic and inflexible structure that has often hindered implementing new features and functionality. One of the advantages of Clang is that it can be more easily plugged into IDEs for integrated debugging. You can read all about the many advantages and innovations of clang and how it exceeds GCC here: http://clang.llvm.org/ That was the first place I looked to see if anything stood out as the reason why, and I couldn't quite see apart from license. Apparently I had missed some aspects in the license Thanks for the answers guys. Legal issues can be real tricky sometimes can't they? I definitely would have missed that about the libraries- its obvious now :) That also explains the issues with other compilers (especially ones on other platforms). Cheers ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Sat, Jan 21, 2012 at 03:43:13PM +, RW wrote: I was just wondering what would have happened if Apple hadn't backed clang/LLVM as BSD licensed projects. Was there a plan B (other than gcc 4.2.1) or did Apple save the *BSD world? The backup plan was probably PCC. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On 01/22/12 17:02, Chad Perrin wrote: On Sat, Jan 21, 2012 at 03:43:13PM +, RW wrote: I was just wondering what would have happened if Apple hadn't backed clang/LLVM as BSD licensed projects. Was there a plan B (other than gcc 4.2.1) or did Apple save the *BSD world? The backup plan was probably PCC. Whats actually surprising is that it wasn't used as plan A (I just looked it up); It then would have come full circle ;) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Clang - what is the story?
On Sun, Jan 22, 2012 at 05:09:52PM +1000, Da Rock wrote: On 01/22/12 17:02, Chad Perrin wrote: On Sat, Jan 21, 2012 at 03:43:13PM +, RW wrote: I was just wondering what would have happened if Apple hadn't backed clang/LLVM as BSD licensed projects. Was there a plan B (other than gcc 4.2.1) or did Apple save the *BSD world? The backup plan was probably PCC. Whats actually surprising is that it wasn't used as plan A (I just looked it up); It then would have come full circle ;) A couple years ago, it looked like a race between PCC and TenDRA, but Clang seemed to just come out of nowhere and steal all the attention. All three of them had a lot to recommend them, but then the TenDRA modernization project evaporated and everybody jumped on the Clang wagon. At least, that's how it looked to me. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org