GCC 4.8.0 Release Marks Completion of C++ Migration 269
hypnosec writes "GCC 4.8.0 has been released (download), and with it, the developers of the GNU Compiler Collection have switched to C++ as the implementation language, a project the developers have been working for years. Licensed under the GPLv3 or later, version 4.8.0 of the GCC not only brings with it performance improvements but also adds memory error detector AddressSanitizer, and race condition detection tool the ThreadSanitizer. Developers wanting to build their own version of GCC should have at their disposal a C++ compiler that understands C++ 2003."
Congrats to the poster and editor (Score:2, Funny)
For not using the word "dog food" in the summary.
Re:Congrats to the poster and editor (Score:5, Funny)
For not using the word "dog food" in the summary.
This isn't Microsoft, so that would be more like "cat food" - FLOSS developers are more like cats (they're difficult to Hurd, or how you spell it).
Re: (Score:2)
For not using the word "dog food" in the summary.
This isn't Microsoft, so that would be more like "cat food" - FLOSS developers are more like cats (they're difficult to Hurd, or how you spell it).
Penguin food (aka herring) noob.
chicken or egg? (Score:2)
You need to compile this compiler with a compiler which begs the question....
How was the first compiler compiled?
Re:chicken or egg? (Score:5, Informative)
How was the first compiler compiled?
With an assembler. (of course, real men didn't need an assembler, they toggled in the hexadecimal opcodes directly in hex, using a hickory switch and a quart of whiskey)
Re: (Score:2)
Re:chicken or egg? (Score:5, Funny)
Re: (Score:2)
I still have the scars from 'programming' the PDP-8.
Re: (Score:2)
Rightfully so. That thing was a pig.
DIBOL?
Re:chicken or egg? (Score:5, Funny)
Hexadecimal? You kids and your newfangled contraptions. Back in my day, we had to use BINARY, and we were always running out of 1's so we had to take the 0's to the blacksmith and have them cut down and straightened before we could use them.
Re: (Score:3, Informative)
Puhlease. Octal. On the front panel of a PDP-8e.
Re: (Score:2)
Re:chicken or egg? (Score:5, Interesting)
LXI BC, 0000
LXI HL, 0009
LXI SP, 0008
PUSH BC
PCHL
HL, BC, and SP (the stack pointer) are all 16-bit registers, and the first three instructions occupy 0x0000-0x0008 in memory. PUSH BC is one byte at 0x0009, and PCHL (another one-byte instruction) sets the program counter to the value of HL; essentially it allows you to jump to the address contained in the HL register. The PUSH operation decremented the stack pointer before storing each of the bytes, so you would set the stack pointer to one higher than the highest address you wanted to overwrite. Because the 8080 was little-endian, address 0x0008 was the upper byte of the third instruction's numeric value - it was already zero (if it were big-endian you could just throw in a NOP to get it to align properly). The final PUSH operation - after the program had cycled through all of memory - wiped out the PUSH BC and PCHL operations, and the computer would go to all NOPs.
Re: (Score:2)
Wow does that look weird. By the early 80s Z80 syntax was much more common. LXI. Ewwww.
http://nemesis.lonestar.org/computers/tandy/software/apps/m4/qd/opcodes.html [lonestar.org]
Re: (Score:2)
Re:chicken or egg? (Score:5, Interesting)
Of course, all those pokes in the back of Compute! magazine were really just hand-converted machine instructions to be stuffed into specific areas of memory, but I didn't realize that at the time. I forget exactly when I finally made that association. I think it was during that assembly class; I was like "Oh, the number is just an opcode! Derp!" I probably could have squeezed a lot more interesting stuff out of my first computer (A TI 99/4A) if I'd know that at the time.
Re: (Score:2)
Intimidating? That sounds like a blast!
Re: (Score:2)
Re: (Score:2)
Doesn't matter how much call there is for it, it's there to be done because it rocks! ;-) I love poking at electronic innards, virtual or otherwise. Over the summer I'm getting back into this stuff, I've forgotten most of it but it's like riding a bicycle, he says in a blaze of enthusiasm.
Re: (Score:2)
11/03 isn't old. 11/20 is old.
technically an 11/03 wasn't a PDP-11, it was an LSI-11.
The 11/34 was the first one that was really useful, EIS/FIS was built in so you had a divide instruction finally. But by then the console switches were gone, no more toggling in the boot loader for you.
Re: (Score:2)
Re: (Score:2)
I worked at Teklogix in the 70s and sat next to Dave Conroy and can attest to the fact he wrote it n PDP assembly than ran under RSX-11M. It was a better compiler than the one that shipped with Unix at the time; Dave and I both went to Waterloo, they had an 11/45.
This became decus C which had some influence on GCC. Allegedly the latter was a clean rewrite but I remember poking around on toad.com in 91 or so and seeing DGC's comments and initials in the code there.
Can't say I'm a C++ fan.
Re: (Score:2)
How was the first compiler compiled?
With an assembler.
Incorrect, that is "assembled" not "compiled".
Re: (Score:2)
And then when the operator comes looking for you to fix something, you can be all like "That aint my program! Shit doesn't even look like my code! A lot of dudes we're typing in all sorts of things there, go find one of them!"
Re:chicken or egg? (Score:5, Informative)
It wasn't. It was written in assembly language and was converted into machine code by an assembler.
Re: (Score:3)
You make it sound so easy.
Re: (Score:3)
Re:chicken or egg? (Score:5, Insightful)
Re: (Score:2)
Not quite. Since we already have the informations there are many many short-cuts and tricks that could cut that time down to a few decades. Of course the end of civilization as we know it and the struggle for resources while the majority of the population dies off, could get in the way of progress and easily ten double that guesstimate, but then we are talking hypothetical here, so...
Re: (Score:3)
It is like everything in modern life... how do you build a lathe without a lathe? Or a generator without electricity? It would take a thousand years to start from nothing and get back to where we are now.
I think you vastly underestimate how much time and effort has been spent on pursuits that were futile or that were technically possible but nobody had discovered or knew the usefulness of doing. If the technology was already described to us we'd advance far more rapidly and planned. I'd expect a reboot to Amish levels in 100 years, the 1950s in another 50 and catching up to today 50 years after that at most.
Re: (Score:2)
Rubbish. Our ancestors invented those things you cited without prior knowledge, and in about 100 years, (from 1750 onwards).
Lookup the industrial revolution.
You seriously think we could not start "from nothing" (apart from our accumulated knowledge) and not have a lathe going in a few decades?
Of course, if you mean "starting again from plankton", well, that took a lot more time than 1000 years.
Re:chicken or egg? (Score:5, Insightful)
Re: (Score:3)
Re: (Score:2)
And there's a distinct shortage of people who even know how to make charcoal.
Re: (Score:3)
Re: (Score:2)
And?
People learn as much as they need to learn to get by/be comfortable.
Specifically related to charcoal, my ex, her father, her siblings siblings, our children, and my siblings haven't got a clue how to make charcoal. My father and I do (and I have done so on several occasions while learning how to forge things). Yet everyone I listed is fully capable of learning how to make charcoal in a fairly short period of time, if the need were to present itself.
You wouldn't need that many people to 'relaunch' societ
Re: (Score:2)
Could we? Easily accessible deposits of any useful ore or fuel has been mined out ages ago. We could find ourselves in situation when we need resources to build tools, but without those tools we cannot access resources.
There are still large virgin deposits of flint should that be necessary.
Re: (Score:2)
Re:chicken or egg? (Score:4, Interesting)
There are also blacksmithing groups where you can learn how to make things with iron. Presumably any post-apocalyptic society will have ample supplies of scrap iron to work with.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
How to boot up civilization (Score:2, Offtopic)
Shouldn't we have some book that explains how to quickly bootstrap ourselves back to current levels of civilization?
Such information was collected in the 1950s, stored on microfiche, and copies provided to major US fallout shelters, along with a reader that only needed sunlight. I have no idea where to get that now.
There's a classic set of books, Build Your Own Metalworking Shop From Scrap [amazon.com], by David Gingery, just for this purpose. The first book, Build Your Own Charcoal Foundry, starts the process. T
Re: (Score:2)
That depends how competently you want it operated - I was taught to use one at school (both metal lathes and wood turning lathes). I was never that good it, of course.
Re: (Score:2)
I think about two afternoon classes in high school got me up to speed with a lathe so it's not that hard to get the basics. Getting good at it is where the time goes. I think the engineering practical stuff was one day with a lathe at a tech college which got complete metalworking newbies to the level of basic understanding, which was essential to avoid producing impractical designs.
Re:chicken or egg? (Score:5, Informative)
You need to compile this compiler with a compiler which begs the question....
Sigh. It raises the question. To "beg the question" means something completely different. Here is a simple rule of thumb of when that phrase should be used: never.
How was the first compiler compiled?
The first compilers (Fortran and Lisp) were written in assembler. Later compilers were written in Lisp or Fortran.
New languages can be bootstrapped by first implementing a sufficient subset, and then expanding it. Ken Thompson explains this process (and how to subvert the process) in his Turing Award lecture on Trusting Trust. [bell-labs.com]
Re:chicken or egg? (Score:5, Insightful)
Re: (Score:2)
Re:chicken or egg? (Score:4, Funny)
Re:chicken or egg? (Score:4, Funny)
Re:chicken or egg? (Score:5, Insightful)
Enough people use the term "beg the question" this way that I've just gotten used to it by now. It doesn't bother me anymore. It's over, man. The war is lost. It's in common use now.
The problem with that approach is that you lose an important idiom that doesn't have a good substitute.
So, no, some things in the language are worth preserving (at least until a suitable alternative is found).
Rewire the part of your brain that gets annoyed by it. You will be happier in the long run.
You can educate people about the beauty of the language without being annoyed.
You know what, English is my 3rd language. I only moved into an English-speaking country when I was in my 30s, and if I can appreciate its richness, I'm pretty sure that a native speaker can do so as well.
Re: (Score:2)
I never thought of English as a rich language. All the good words that seem to enrich the language are mostly just acquired from other languages. And since our linguistic rules (both syntax and the separation of verbs, nouns and adjectives) is rather fluid, English speakers can be pretty lazy when it comes to stringing a sentence together.
Re: (Score:3)
Sigh. It raises the question. To "beg the question" means something completely different. Here is a simple rule of thumb of when that phrase should be used: never.
"Beg" is just (in the context of questions) an old-fashioned word for 'ask'.
The problem is people use it to mean
a) an answer that merely restates the question (asking the same question a second time)
or
b) an answer that is incomplete without the answer to an immediate follow-up question (providing a deficient answer that merely raises a trivially new question without having provided any useful information).
The ambiguity is annoying.
Though not as much as other people overreacting to it.
Re: (Score:2)
Re: (Score:2)
The stupidity of complaining about the phrase "beg the question" is just dumb.
Re: (Score:2)
It's dumb because it is stupid.
Re: (Score:2)
Thank you. I've been wondering if I was the only person left who cares.
Re: (Score:2)
C as the language was extremely handy because C was ubiquitous. C++ is a lot less common. Building new GCCs could be painful for a lot of people, probably have to build earlier GCC compilers first just to be able to build the later version. They should have labelled this 5.0.0 to mark a firm dividing line.
Re: (Score:3)
Building new GCCs could be painful for a lot of people, probably have to build earlier GCC compilers first just to be able to build the later version.
There is no need for that. You just use a cross compiler [wikipedia.org]. You only need to bootstrap a language once.
Re: (Score:2)
Next time you run mingw stay alert for the "'login' is not recognized as an internal or external command, operable program or batch file" warnings during compilation.
Re: (Score:2)
You need to compile this compiler with a compiler which begs the question....
Sigh. It raises the question. To "beg the question" means something completely different. Here is a simple rule of thumb of when that phrase should be used: never.
Here's an honest, no trolling, I'm just curious question: when was the last time your heard "begs the question" used to mean "this is a circular argument"?
Re: (Score:2)
Re: (Score:2)
Here's an honest, no trolling, I'm just curious question: when was the last time your heard "begs the question" used to mean "this is a circular argument"?
It has been a long time. It is used incorrectly so often, that I no longer consider it to be a cromulent expression. If you use it correctly, 90% of your readers will be confused. If you use it incorrectly, 10% of your readers will be left wondering what other aspects of your education are also deficient. So it is best to know what the phrase means, but avoid it in your own writing and speaking.
Re: (Score:2)
A compiler written in FORTRAN? Really? Which one?
Re:chicken or egg? (Score:4, Interesting)
You need to compile this compiler with a compiler which begs the question....
Sigh. It raises the question. To "beg the question" means something completely different. Here is a simple rule of thumb of when that phrase should be used: never.
Nice comment.
Language evolves. This makes it nice and raises the question of what I mean by "nice comment" From http://etymonline.com/?term=nice [etymonline.com],
nice (adj.) Look up nice at Dictionary.com
late 13c., "foolish, stupid, senseless," from Old French nice (12c.) "careless, clumsy; weak; poor, needy; simple, stupid, silly, foolish," from Latin nescius "ignorant, unaware," literally "not-knowing," from ne- "not" (see un-) + stem of scire "to know" (see science). "The sense development has been extraordinary, even for an adj." [Weekley] -- from "timid" (pre-1300); to "fussy, fastidious" (late 14c.); to "dainty, delicate" (c.1400); to "precise, careful" (1500s, preserved in such terms as a nice distinction and nice and early); to "agreeable, delightful" (1769); to "kind, thoughtful" (1830).
Re: (Score:2)
How was the first compiler compiled?
How was the first dictionary written?
All right, (Score:3, Funny)
This should be in the Debian repositories by the end of the decade.
Already in experimental (Score:2)
http://packages.debian.org/search?suite=experimental&searchon=names&keywords=GCC [debian.org] Its already in experimental....which is where it belongs. Debian is all about stable, which is kind of the point, but if its not hitting it fast enough, there are a whole host of linux options available to you...like Ubuntu.
Re: (Score:2)
Nice new feature (Score:5, Interesting)
From the changelog: "A new general optimization level, -Og, has been introduced. It addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of runtime performance. Overall experience for development should be better than the default optimization level -O0."
This actually sounds really attractive to me... I'll have to try it out.
Re: (Score:2)
We've released embedded products running in debug compiles precisely because that's where almost all our testing is done, it fits in the memory constraints, and we occasionally had bugs with the regular, optimized code.
So we release what we beat the hell out of.
Re:Nice new feature (Score:5, Funny)
A new general optimization level, -Og, has been introduced. It addresses the need for fast compilation and a superior gangsta experience while providing no need to use an AK.
It sounds like today was a good day.
It gets around (Score:2)
[GUARD #1] Are you suggesting compilers migrate?
[ARTHUR] Not at all, they could be carried.
RHEL version? (Score:2)
Anyone know when RedHat is going to make a version of devtoolset which offers GCC 4.8?
Re: (Score:2)
I don't know the date of their tools release, but doing a "one shot" installation if you want to play around is pretty easy:
then add to PATH, LD_LIBRARY_PATH etc
That'll get you up and running.
Re: (Score:2)
Thanks!
Re: (Score:2)
It's currently on 4.7.2 and as far as I know has no problem with making binaries.
Yessssss! (Score:5, Funny)
Re: (Score:2)
-g?
Does it dance yet? (Score:3, Interesting)
From Wikipedia:
> LLVM was originally intended to use GCC's front end, but GCC turned out to cause some problems for both the LLVM developers and Apple. GCC is a large and somewhat cumbersome system to develop; as one long-time GCC developer put it, "Trying to make the hippo dance is not really a lot of fun"[7] and a Google Summer of Code intern commented, "Reading GCC codebase has been a hard exercise for me. In fact it's the only project I know of that becomes more and more difficult as time passes."[8]
I'm just wondering, is this still the case? It sounds like they haven't changed much of anything, merely ported their codebase to C++. Am I correct in assuming that the above is still true or is this new version supposed to usher in a new era of GCC prosperity and usability on things other then the command line?
Re: (Score:3)
Licensed under the GPLv3 or later (Score:3)
Can it be used for non-OSS development and releases of compiled binaries to a customer?
It's not trolling, I really need to know (embedded dev here).
Re: (Score:2)
Re:Licensed under the GPLv3 or later (Score:5, Informative)
Interestingly, the exception only is valid if you use GCC or another GPL licensed compiler to link it, to prevent the runtime being shanghaied in its GPL compliant entirety by another compiler.
Finally, you cannot accidentally license your software under the GPL through linking. Only the copyright holder may assign a license and copyright comes through authorship. If you link your software with GPL software but do not license your software under compatible terms you merely violate the GPL and are liable for whatever penalties come from distributing unlicensed software. This probably will be relatively low if it is accidental and one agrees to remove it, since actual damages are most likely to be zero, only statutory damages and punitive damages (impossible if not deliberate) apply.
Re: (Score:2)
Re: (Score:2, Informative)
The license [gnu.org] makes it perfectly clear that you can use the latest GCC on proprietary code. Specifically:
The purpose of this Exception is to allow compilation of non-GPL (including proprietary) programs to use, in this way, the header files and runtime libraries covered by this Exception.
GCC vs. CLang (Score:2)
What is the current situation with GCC vs. CLang?
Re: (Score:2, Funny)
blows were landed, they both got tired, and now they're at the neighborhood watering hole
telling the story for the fourth time in increasingly slurred words
Re: (Score:3, Informative)
They're pretty equal. Some things compiled with GCC run better, others with CLang run better.
At this point (and I mean exactly this point, no comment for future potential,) it's mostly a matter of license, which is pretty much irrelivant for compilers since even the GPL's copyleft doesn't force you to go GPL to use their compiler.
To me it seems like the major motivation behind LLVM / Clang were to make a great open source compiler that wasn't GPL. They've succeeded, whether or not you agree with their inten
except that (Score:3, Informative)
clang is a lot faster and uses a huge amount less memory than GCC when running. for some projects this is rather important.
gcc has a lot of cross-build chains out there, and a lot of experienced users. but i have never seen a clang->arm cross chain.
clang++ is still using GNU libraries for C++ stuff.
clang is still a pain in the ass to compile, with unclear instructions, and a massive, huge compile time. gcc on the other hand is built by automated scripts quite frequently as part of, for example, cross-too
Re: except that (Score:2)
I don't know if their changes are closed or not, but Apple uses clang to cross compile to arm with their toolchain.
Re: (Score:2)
"clang is still a pain in the ass to compile, with unclear instructions, and a massive, huge compile time. gcc on the other hand is built by automated scripts quite frequently as part of, for example, cross-toolchain builds."
Clang is really easy to build, usually easier than building GCC which often requires you to checkout multiple additional libraries (mpfr etc). Clang only requires that you clone two repositories: llvm and clang, clang is checked out into llvm/tools and the build process of llvm will aut
Re: (Score:2)
Sort of. Their motivation was to make not a compiler, but a compiler construction kit with lots of highly reusable pieces that could be used as parts of other software. The Clang/LLVM combination is a lot more modular, and integrates more easily with other software. Even if GCC were BSD-licensed, it is just not capable of doing half the things that Apple's developer tools use Clang for t
Re: (Score:2)
I realize I'm feeding the troll, however I will note Microsoft don't make a C compiler, only a C++ one with historical C support: it only supports C as specified in C89, not C99 or C11. This can and does cause problems for people who try to use it to compile modern C source code.
Re: (Score:2)
My understanding Microsoft now dropped ALL C support. It's now official.
Re: (Score:2)
It's the compiler that usually ships with distributions, but it's far from being the only compiler used on Linux. Many companies uses for example the Intel or PathScale compiler suites. Both commercial, although PathScale actually went open source a couple of years ago.
boot straps itself with the system compiler (Score:2)
i mean if you dont have a compiler on your system, how do you 'compile' c source code?
Re: (Score:3)
You find a compiler binary or cross-compile it on another system.
Re:GPLv3 .... (Score:4, Informative)
It's worth pointing out that GCC has been under GPLv3 since version 4.2.2 back in 2007. If it's a problem for anyone then it has been a problem for over five years now.
http://gcc.gnu.org/ml/gcc-announce/2007/msg00004.html [gnu.org]
Re: (Score:2)
Most software I've seen at that type of scale that is written in C usually invents their own object-like system, so if you're going to use something like that anyway then why not use something standardized?