DaemonForums  

Go Back   DaemonForums > DaemonForums.org > News

News News regarding BSD and related.

Reply
 
Thread Tools Display Modes
Old 14th April 2011
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

I believe it was related to GCC not letting people get at the intermediate code.. so that companies couldn't "steal" anything.

It's absurd, but, there are indeed references to it on the gnu mailing lists.

http://gcc.gnu.org/ml/gcc-help/2001-11/msg00093.html
Reply With Quote
Old 14th April 2011
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

Quote:
Originally Posted by rocket357 View Post
As long as there's a good clean separation between parsers and code generators (yes, that's an extreme oversimplification), a C++ frontend shouldn't really impact the architecture-specific code generators. Perhaps I've oversimplified to the point of overlooking issues, but my understanding is that keeping the frontend and backend as separate as possible (something that gcc does a piss-poor job of) alleviates these issues.
Didn't know GCC was more intentional about this, other wise I would've said, "Yes, if we're fortunate"
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 14th April 2011
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 330
Thanked 9 Times in 9 Posts
Default

Quote:
Originally Posted by TerryP View Post
Didn't know GCC was more intentional about this, other wise I would've said, "Yes, if we're fortunate"
Moving to PCC would be a tremendous step forward for any of the BSD projects, honestly, as time spent dealing with GCC's quirks would be spent coding instead (not to mention, less GPL required). I really, really want PCC to take over, but at the same time I realistically expect it to take an unknown (but lengthy) amount of time from now until that happens.
Reply With Quote
Old 14th April 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by rocket357 View Post
Moving to PCC would be a tremendous step forward for any of the BSD projects...
Completely agreed & if I recall the discussion correctly, the OpenBSD project pondered going to PCC before porting to GCC4, but did not because it wasn't deemed ready.

The moral of this story is if moving to PCC is important, test, test, test. The quicker PCC becomes robust, the sooner the *BSD family can move away from GNU. We, the community, can help move this process forward by focusing on PCC today.
Reply With Quote
Old 15th April 2011
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 116
Thanked 10 Times in 4 Posts
Default

Quote:
Originally Posted by TerryP View Post
Last I can remember, OpenBSD did have support for C, C++, and Fortran but it's been a while since I've cuddled up to OpenBSDs base system.
Fortran was moved to ports sometime last year.
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote
Old 15th April 2011
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,074
Thanked 198 Times in 156 Posts
Default

Quote:
Originally Posted by ocicat View Post
Completely agreed & if I recall the discussion correctly, the OpenBSD project pondered going to PCC before porting to GCC4, but did not because it wasn't deemed ready.

The moral of this story is if moving to PCC is important, test, test, test. The quicker PCC becomes robust, the sooner the *BSD family can move away from GNU. We, the community, can help move this process forward by focusing on PCC today.
I think this has less to do with pcc as such, and more to do with competition to GCC in general.
If people stop using gcc because there is a better alternative, then that will be a good incentive for the gcc people to make their compiler a better one.

AFAIK right now gcc is pretty much the only viable option. There's the intel compiler, but that's not even open source.
There's also TenDRA which has been around for quite some time, but that project seems to be inactive for a number of years. I remember there were some efforts to use TenDRA for FreeBSD back in the 3.x or 4.x days.

Now there are two viable actively developed project, llvm/clang and pcc...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 15th April 2011
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 775
Thanked 36 Times in 32 Posts
Default

Quote:
Originally Posted by Carpetsmoker View Post
I think this has less to do with pcc as such, and more to do with competition to GCC in general.
PCC is not an alternative to GCC. PCC is a Unix system compiler only (C compiler which produces serial machine code only) while GCC is a general purpose compiler which supports variety of languages and many, many knobs. LLVM is a more of a general purpose compiler like GCC but BSDs really have a BIG problem with compilers because there is not a single proprietary compiler supporting any of BSDs (at least officially). There are also some very specialized fantastic open source compilers like Open64 which are not ported to a single BSD. Lack of compilers have truly killed BSDs as a viable scientific computing platform (I mean NetBSD and FreeBSD here since OpenBSD is only a network appliance OS).
Reply With Quote
Old 15th April 2011
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,074
Thanked 198 Times in 156 Posts
Default

As I understand it, all of them take a bunch of C/C++/... code, and process in such a manner so that the operating system can execute it.

There may be differences in architecture and history, but I don't see any essential difference in function ... Other then that llvm and ppc aren't as far along as gcc on some points (Like the C++ frontend) ...

Did I misunderstand something?
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 15th April 2011
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 330
Thanked 9 Times in 9 Posts
Default

Quote:
Originally Posted by Oko View Post
PCC is not an alternative to GCC. PCC is a Unix system compiler only
I think you're absolutely right that in terms of the goals of PCC's team and the interest OpenBSD's devs have in PCC (can't comment on {Net,Free}BSD interest), PCC is a Unix system compiler.

There was a significant push to remove C++ from base (which resulted in mandoc and a few other new tools) in preparation for the jump to PCC. I wonder if that's truly stalled, or if what we're seeing is just the normal delay in a big task (as this is)?


Quote:
Originally Posted by Carpetsmoker View Post
As I understand it, all of them take a bunch of C/C++/... code, and process in such a manner so that the operating system can execute it.

There may be differences in architecture and history, but I don't see any essential difference in function ... Other then that llvm and ppc aren't as far along as gcc on some points (Like the C++ frontend) ...

Did I misunderstand something?
I think the point that Oko is making is that the focus of PCC is different...not necessarily the "potential" or "technology". The focus of the people developing PCC is to make it a simple, solid system compiler that's easier to maintain than a general purpose, bells-n-whistles compiler like gcc.
Reply With Quote
Old 15th April 2011
thirdm thirdm is offline
Package Pilot
 
Join Date: May 2009
Posts: 205
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by rocket357 View Post
...
There was a significant push to remove C++ from base (which resulted in mandoc and a few other new tools) in preparation for the jump to PCC. I wonder if that's truly stalled, or if what we're seeing is just the normal delay in a big task (as this is)?
Is mesa (and the other bits of C++ in Xorg) a module that could be made into a port with the rest of X remaining in base? There were other reasons for mandoc other than groff being written in C++. It probably wouldn't make any sense to take on the Xorg stuff until all the other work pcc needs is completed.

Part of me dislikes C++ leaving base, it being one of my favourite languages (someday I'll switch to an OS that's C++ based instead of C based -- maybe Haiku?). On the other hand, g++ as a port is probably better for getting the new language features coming out with C++0x. And it would be cool to have a system compiler that one could realistically read the source code of and understand.
Reply With Quote
Old 15th April 2011
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 775
Thanked 36 Times in 32 Posts
Default

Quote:
Originally Posted by thirdm View Post
There were other reasons for mandoc other than groff being written in C++.
Yes there were. Groff is a general typesetting system created by accretion over the 45 or so years. It is fairly buggy and messy and not really in wide use any more (DrJ is going to kill me for this statement). Mandoc is traditional document preparation system for BSD Unix. It is NOT a general purpose typesetting system (not yet ). It is very simple, very small (Groff is indeed small in its own right comparing to things like TeX), written in C. Groff was hard to maintain in the base. Was not upgraded regularly and flat out obsolete. Now OpenBSD has in ports the latest and the greatest version of Groff and in its base mandoc.
Reply With Quote
Old 15th April 2011
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 330
Thanked 9 Times in 9 Posts
Default

Quote:
Originally Posted by thirdm View Post
There were other reasons for mandoc other than groff being written in C++.
Oh absolutely...I was just commenting on the current topic of PCC (even though a C++ frontend for PCC is in the works already).
Reply With Quote
Old 15th April 2011
thirdm thirdm is offline
Package Pilot
 
Join Date: May 2009
Posts: 205
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by Oko View Post
Yes there were. Groff is a general typesetting system created by accretion over the 45 or so years. It is fairly buggy and messy and not really in wide use any more (DrJ is going to kill me for this statement).
...
I used groff with .me macros for an adult ed creative writing course this year. I'm debating going over to LaTeX on the theory it should have more advanced text spacing algorithms and hyphenate less. But I probably won't have more need for word processing since this course taught me most convincingly that I can't write for dog. "It was a dark and stormy night..."

Though one thing I'll say for nroff/groff/whatever over LaTeX is it doesn't barf all this crazy output at you every time you run it.

Sorry, this is getting off topic. My point in bringing up the other reasons for mandoc was to say they might be able to remove these other files depending on C++ without undo effort, but don't have enough reason to do it right now. But I'm not sure about that. I don't understand Mesa's relation to the rest of Xorg. Looking at /usr/xenocara/README I see something that suggests perhaps the idea of Mesa as separate module and port is nonsense:

"- dist: contains the Mesa sources, shared by lib and xserver above"

Hmmm, when I look at a file at random, it doesn't look like particularly modern C++. Maybe as part of the rest of what xenocara does to calm the Xorg build (gee, it looks like the original Xorg now uses SCons which has Python as a dependency -- yuck) they could use cfront to convert it to C and distribute that in cvs parallel to the original source. pcc and cfront in base? Major points for preserving Unix heritage. Then the few OpenBSD developers who like C++ and compilers could play at modernizing cfront over the next 50 years. Or just leave cfront out. It could be used outside the main build only to get to C each new Xorg release.
Reply With Quote
Old 15th April 2011
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 775
Thanked 36 Times in 32 Posts
Default

Quote:
Originally Posted by Carpetsmoker View Post
There may be differences in architecture and history, but I don't see any essential difference in function ... Other then that llvm and ppc aren't as far along as gcc on some points (Like the C++ frontend) ...

Did I misunderstand something?
Oh there are serious differences. By changing options in GCC you can produce for instance code which is highly optimized to be executed in parallel fashion on the multiprocessing machines. PCC doesn't want to do that. When you are compiling driver you just want to produce small, correct, serial machine code which is going to be executed at once.
Reply With Quote
Old 15th April 2011
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 775
Thanked 36 Times in 32 Posts
Default

Quote:
Originally Posted by thirdm View Post
I used groff with .me macros for an adult ed creative writing course this year. I'm debating going over to LaTeX on the theory it should have more advanced text spacing algorithms and hyphenate less.
Each discipline has its own preferable text processing tool. In mathematics (I am mathematician) that is TeX or to be more precise LaTeX set of macros for TeX. Full stop. The fact that I can produce decent quality output using Groff is irrelevant. All papers and manuscripts MUST be submitted in TeX using LaTeX macros. There are no more than half dozen places which would accept for instance AMS TeX macros for TeX not to be confused with AMS extension of LaTeX.

In Biology for instance you MUST use M$ Word. Full stop. Nobody is going to read anything written in anything else.

Groff was used until 1992-3 by O'Reilly to produce its computer manuscripts. Then even O'Reilly who could not stand TeX and always championed Groff switched to essentially a DocBook (their own version) which is also more recently rediscovered as M$ 2007 Office Formats The bottom line is. If you know to use Groff use it. If you don't but you are in the need of the serious text processing tool talk to people in your field before you invest any serious amount of time in learning something. If you want to write mathematics, physics, astronomy and similar subjects do not bother with anything else but TeX. Nobody will even look documents which are not produced in TeX in these fields.

Last edited by Oko; 16th April 2011 at 02:12 PM.
Reply With Quote
Old 15th April 2011
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

Quote:
Originally Posted by Carpetsmoker View Post
As I understand it, all of them take a bunch of C/C++/... code, and process in such a manner so that the operating system can execute it.

There may be differences in architecture and history, but I don't see any essential difference in function ... Other then that llvm and ppc aren't as far along as gcc on some points (Like the C++ frontend) ...

Did I misunderstand something?
Not really, the only real differences are things like name mangling, class/object details, and stuff like that. There are also compilers that basically work by compiling C++ to C, then to machine code.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 16th April 2011
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 116
Thanked 10 Times in 4 Posts
Default

PCC claims to be working towards C99 compliance. I wonder if this means that after a switch, the BSDs would be more likely to use C99 features. Currently OpenBSD devs have to be careful that their code compiles on three different versions of GCC (2.x, 3.x, 4.x)… of course, I don’t know that much about C99 and what new features might actually be useful instead of just “new shiny.”
Quote:
Originally Posted by thirdm View Post
I used groff with .me macros for an adult ed creative writing course this year. I'm debating going over to LaTeX on the theory it should have more advanced text spacing algorithms and hyphenate less. But I probably won't have more need for word processing since this course taught me most convincingly that I can't write for dog. "It was a dark and stormy night..."

Though one thing I'll say for nroff/groff/whatever over LaTeX is it doesn't barf all this crazy output at you every time you run it.
I agree with Oko—troff is quite nice (I prefer it to TeX because the syntax gives me less RSI ) but it is worth doing LaTeX simply due to network effect. As an EE undergrad, I see that undergrads use Word, profs and grad students use LaTeX, and the one prof who knows about troff stopped using it 20 years ago. Since more people use TeX in general, you are more likely to find useful macros for it (e.g., I have had trouble using troff for Karnaugh maps and other things).
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote
Old 16th April 2011
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 775
Thanked 36 Times in 32 Posts
Default

Quote:
Originally Posted by backrow View Post
PCC claims to be working towards C99 compliance. I wonder if this means that after a switch, the BSDs would be more likely to use C99 features.
C99 mostly refers to a style (syntax parser) as opose to K-R style in which programs are written rather than anything more substantial.

Your second remark about OpenBSD developers being careful that their code has to compile on tree different versions of GCC is rather silly. OpenBSD is not Linux. Code is written in the fashion that will compile on any C99 complaint compiler. Full stop. Compiler dependent code and architecture dependent code is big nono and mostly practice by Linux community and industry when it wants to prevent competition.
Reply With Quote
Old 16th April 2011
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

Quote:
Originally Posted by Oko View Post
C99 mostly refers to a style (syntax parser) as opose to K-R style in which programs are written rather than anything more substantial.
I think you may be confusing the original ANSI standard with K&R1 .

The largest changes to C syntax were around the time of ANSI (~C89), pretty much function prototypes and the modern (everyone uses it) function definition syntax. I'm to young to recall when void replaced char but I've read plenty of old style pre-standard code.


C99 from a feature point of view, principally gives additional standard-issue types (long long, complex, etc), variable length arrays, macros that take variable arguments, and C++ like things: // comments, inline functions, and not having to declare variables at the start of a block. There was also a type generic version of the math library added, not that I have ever really needed the traditional math library either.


As someone who generally needs to write C code acceptable to both GCC and to Micro$oft's compiler, which is not C99 compliant: the only thing I miss is stdint.h. For projects like OpenBSD however, such an issue is totally irrelevant. Some Open Source developers do exploit C99-specific features though, so a C99 compliant compiler can be useful for porting software.


The C99 standard is also a cool read.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 20th March 2014
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 775
Thanked 36 Times in 32 Posts
Default

I am resurecting this almost three year old thread at the moment of great joy for OpenBSD users when Sandmail, BIND, and Apache has been replaced by OpenSMTPd, Unbound/NSD, and Nginx to point the most paintfull fact about OpenBSD and BSDs in general. The lack of a simple serial portable C system compiler. Browsing PCC mailing lists it is paintfull clear that PCC is dead now for almost a year. Reading technical specifications of "alternatives" LLVM (Clang is just a front end) and ACK (Amsterdam Compiler Tollkit) is even more paintful because these are abvously not the kind of compilers suitable for creating system binaries.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pkg_add_it - new version DNAeon FreeBSD Ports and Packages 5 14th November 2010 01:43 AM
Ports Version associated with FreeBSD version rtwingfield FreeBSD Ports and Packages 4 7th June 2010 11:00 PM
LLVM milestone reached - Clang compiler self-hosts J65nko News 0 5th February 2010 03:48 PM
pop3d: Maximum connection limit reached for ... kheled FreeBSD General 1 25th June 2008 05:16 PM
How I can have two version of zsh mfaridi FreeBSD Ports and Packages 7 15th May 2008 05:56 PM


All times are GMT. The time now is 10:39 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick