Slashdot Mirror


GCC 4.8.0 Release Marks Completion of C++ Migration

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."

269 comments

  1. Congrats to the poster and editor by Anonymous Coward · · Score: 2, Funny

    For not using the word "dog food" in the summary.

    1. Re:Congrats to the poster and editor by Anonymous Coward · · Score: 1

      That's two words...

    2. Re:Congrats to the poster and editor by Anonymous Coward · · Score: 0

      Oops I meant to click 'Funny' but hit 'Overrated' instead, sorry! /modfail

    3. Re:Congrats to the poster and editor by Anonymous Coward · · Score: 1

      Oops I meant to click 'Funny' but hit 'Overrated' instead, sorry! /modfail

      I don't think it undoes your mod if you tick "Post Anonymously". At least it doesn't warn you of this like it does if you try to post regularly.

    4. Re:Congrats to the poster and editor by K.+S.+Kyosuke · · Score: 4, 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).

      --
      Ezekiel 23:20
    5. Re:Congrats to the poster and editor by Anonymous Coward · · Score: 0

      With Microsoft it's more like dogpooing....

    6. Re:Congrats to the poster and editor by Tough+Love · · Score: 1

      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.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    7. Re:Congrats to the poster and editor by davester666 · · Score: 1

      It's GNU Penguin food!

      --
      Sleep your way to a whiter smile...date a dentist!
  2. 0xF1A57 by Anonymous Coward · · Score: 0

    ...

  3. chicken or egg? by scarboni888 · · Score: 1

    You need to compile this compiler with a compiler which begs the question....

    How was the first compiler compiled?

    1. Re:chicken or egg? by Jeremi · · 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)

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    2. Re:chicken or egg? by WWJohnBrowningDo · · Score: 4, Informative

      It wasn't. It was written in assembly language and was converted into machine code by an assembler.

    3. Re:chicken or egg? by timeOday · · Score: 4, Insightful

      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.

    4. Re:chicken or egg? by Anonymous Coward · · Score: 0

      It was made with an assembler obviously.

    5. Re:chicken or egg? by Anonymous Coward · · Score: 0

      I'm just going to leave this here:

      http://en.wikipedia.org/wiki/Bootstrapping_(compilers)

    6. Re:chicken or egg? by scarboni888 · · Score: 2

      You make it sound so easy.

    7. Re:chicken or egg? by ShanghaiBill · · 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.

    8. Re:chicken or egg? by Anonymous Coward · · Score: 1

      This is something I often wonder about.
      Shouldn't we have some book that explains how to quickly bootstrap ourselves back to current levels of civilization?

    9. Re:chicken or egg? by Laxori666 · · 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. Rewire the part of your brain that gets annoyed by it. You will be happier in the long run.

    10. Re:chicken or egg? by jthill · · Score: 1

      I don't remember any front panel ever using hickory switches.

      --
      As always, all IMO. Insert "I think" everywhere grammatically possible.
    11. Re:chicken or egg? by Anonymous Coward · · 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.

    12. Re:chicken or egg? by Livius · · Score: 2

      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.

    13. Re:chicken or egg? by ArsonSmith · · Score: 1

      The stupidity of complaining about the phrase "beg the question" is just dumb.

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    14. Re:chicken or egg? by qbast · · Score: 4, Insightful

      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.

    15. Re:chicken or egg? by deadzaphod · · Score: 2

      We should, but I don't think anyone has it well organized so far. This book is a good start though http://en.wikipedia.org/wiki/The_Way_Things_Work

    16. Re:chicken or egg? by smittyoneeach · · Score: 4, Funny

      My supervisor held the hickory switch while I was manning the AN/UYK-7. Manfully.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    17. Re:chicken or egg? by demonlapin · · Score: 3, Interesting

      Dave Gingery's books will get you a machine shop. That's a good start. (The first thing you build is a charcoal foundry. The second is a lathe.)

      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.

    18. Re:chicken or egg? by Carewolf · · Score: 1

      It would take a thousand years to start from nothing and get back to where we are now.

      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...

    19. Re:chicken or egg? by smittyoneeach · · Score: 2

      "Everything's easy when you know how to do it."--me

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    20. Re:chicken or egg? by smittyoneeach · · Score: 1

      Indeed, the market "responded back."

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    21. Re:chicken or egg? by Kjella · · Score: 2

      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.

      --
      Live today, because you never know what tomorrow brings
    22. Re:chicken or egg? by TimHunter · · Score: 1

      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.

      Thank you. I've been wondering if I was the only person left who cares.

    23. Re:chicken or egg? by charles2678 · · Score: 0

      "Beg" is just (in the context of questions) an old-fashioned word for 'ask'.

      "Beg the question" is shorthand for "beggar the question" -- to make it worthless by depriving it of its value (as, in this context, it is provided with an answer ready-made).

    24. Re:chicken or egg? by jnork · · Score: 1

      We had to carve our own ICs out of wood.

      --
      Cleverly disguised as a responsible adult.
    25. Re:chicken or egg? by Bing+Tsher+E · · Score: 3, Informative

      Puhlease. Octal. On the front panel of a PDP-8e.

    26. Re:chicken or egg? by charles2678 · · Score: 1

      To amend my prior answer with an actual reference -- see http://www.phrases.org.uk/meanings/beg-the-question.html

      On the subject of the reliability of said source:

      While no reference work is able to claim its content is 100% definitive, every effort has been made to include here only information that is verifiable as correct. The content is researched to published book standards. The sources used in the research are twofold, either primary sources or trusted references. The primary sources include newspaper cuttings, books, films, photographic archives etc. The trusted reference sources are those that themselves derive from primary sources and have sufficient reputation to be considered reliable. These include, The Oxford English Dictionary, Second Edition, The Historial Dictionary of American Slang, First Edition, The Oxford Dictionary of Quotations, 5th Edition, Partridge's A Dictionary of Slang, 8th Edition. In addition to these are numerous reference works and databases which, although not in themselves definitive, provide a rich source of stimulation; for example, Cotgrave's A Dictionarie of the French and English Tongues, Hotten's Slang Dictionary and many others.

    27. Re:chicken or egg? by vikingpower · · Score: 1

      Binary ?? You kids and your newfangled contraptions. Back in my day, we only had 0's. If and when we wanted or needed a 1, a very rare case indeed, we put two infinities of 0's together to make a 1. As simple as that.

      --
      Religous speak to God. Insane are spoken to by God. When all shut up, one can finally hear Shostakovich in peace
    28. Re:chicken or egg? by wonkey_monkey · · Score: 3, Funny

      Screw that. I'm going to continue pulling people up on this one irregardless.

      --
      systemd is Roko's Basilisk.
    29. Re:chicken or egg? by Greyfox · · Score: 4, Interesting
      Back in '87 in my assembly language class, which was on some ancient DEC machine (Think it was a PDP 11-03 or something,) our instructor gave us all a sheet with the bootstrap code we had to type in, in octal, to make the system jump to the OS instructions on our 8" floppy disks. He showed us how to use a table in our assembly language book to convert assembly code to machine code by hand. If all you're looking at is a slab of iron (Arrhn!) that's where you start! It's a little intimidating imagining having to start with nothing but a table of opcodes and a slab of raw iron that you can enter bits into somehow. I'd think you'd want a basic program loader, so you could save the assembler that you carve out of opcodes. Once you have your assembler stored on disk, you can write your initial C compiler (Not the standard library mind you, just the compiler!) At some point along the way, you compile EMACS.

      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.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    30. Re:chicken or egg? by Kielistic · · Score: 2

      Yes it has been mined and is now conveniently placed on the surface instead of buried beneath it. If we hit some global catastrophe all that ore and raw material isn't going to vaporise (unless of course that was the catastrophe). If we have to melt down some sky scrapers for ore so be it.

    31. Re:chicken or egg? by Darinbob · · Score: 1

      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.

    32. Re:chicken or egg? by bosef1 · · Score: 0

      Hickory switches? A real man toggles his machine code in with his dick. We do it in octal, 'cause that's what seperates us from the animals.

    33. Re:chicken or egg? by ShanghaiBill · · Score: 2

      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. You only need to bootstrap a language once.

    34. Re:chicken or egg? by Sulphur · · Score: 1

      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.

    35. Re:chicken or egg? by Intrepid+imaginaut · · Score: 1

      Intimidating? That sounds like a blast!

    36. Re:chicken or egg? by badboy_tw2002 · · 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!"

    37. Re:chicken or egg? by Anonymous Coward · · Score: 0

      Except of course for fossil fuels. Charcoal will only get you so far.

    38. Re:chicken or egg? by alexo · · Score: 4, 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.

    39. Re:chicken or egg? by ld+a,b · · Score: 1

      The first build of the compiler used to bootstrap everything else was helpfully provided by the CIA's new Amazon cloud.
      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.

      --
      10 little-endian boys went out to dine, a big-endian carp ate one, and then there were -246.
    40. Re:chicken or egg? by Bearhouse · · Score: 1

      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.

    41. Re:chicken or egg? by _Shad0w_ · · Score: 1

      And there's a distinct shortage of people who even know how to make charcoal.

      --

      Yeah, I had a sig once; I got bored of it.

    42. Re:chicken or egg? by larry+bagina · · Score: 2

      I think it's shorthand for "bugger the questioner", i.e. if someone asks you a question, you sodomize them. It's some sort of British thing, I guess.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    43. Re:chicken or egg? by Brannoncyll · · Score: 2
    44. Re:chicken or egg? by interval1066 · · Score: 0

      You kids must be to young to remember the MITS Altair 8800... before keyboards it was indeed a switch aluminum though...

      --
      Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
    45. Re:chicken or egg? by Clueless+Moron · · Score: 1

      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"?

    46. Re:chicken or egg? by Anonymous Coward · · Score: 0

      Sadist. :)

    47. Re:chicken or egg? by wallsg · · Score: 1

      Back in '87 in my assembly language class, which was on some ancient DEC machine (Think it was a PDP 11-03 or something,) our instructor gave us all a sheet with the bootstrap code we had to type in, in octal, to make the system jump to the OS instructions on our 8" floppy disks. He showed us how to use a table in our assembly language book to convert assembly code to machine code by hand. If all you're looking at is a slab of iron (Arrhn!) that's where you start! It's a little intimidating imagining having to start with nothing but a table of opcodes and a slab of raw iron that you can enter bits into somehow. I'd think you'd want a basic program loader, so you could save the assembler that you carve out of opcodes. Once you have your assembler stored on disk, you can write your initial C compiler (Not the standard library mind you, just the compiler!) At some point along the way, you compile EMACS.

      Sounds like what I did around 1985 on a Data General Nova, except the bootstrap was to a paper tape which we punched to contain the code that read Block 0 from the disk and then jumped to it. I seem to recall no backspace on the tape punch, but that was a long time ago. It may have let you edit input before punching.

    48. Re:chicken or egg? by Greyfox · · Score: 1

      Not much call for it these days. One of my later classes in college had a project to write a machine emulator -- it had its own instruction set, registers, program counter, etc. You could load up and run simple programs in it. Sadly we didn't get to spend as much time as I'd have liked to playing with the thing. Writing one of those really doesn't take that long, then you could bootstrap a simple OS and tools onto it. Might be a fun project for rainy/snowy weekends!

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    49. Re:chicken or egg? by Impy+the+Impiuos+Imp · · Score: 1

      You need to compile this compiler with a compiler which begs the question....

      How was the first compiler compiled?

      As mentioned, the first one was done in assembly language.

      In fact, one of the standard tests for such self-compiled "new" compilers is they are compiled using the old compiler, producing the new one, then re-compiled using the new one. Then the even newer one re-compiles it and they see if the product is identical. If so, bingo! (And if not, why?) The new compiler compiled by the old one and the new one compiled by the new one should themselves both produce identical products, if you follow that.

      Creation of compilers got so common they automated the compiler construction by creating compiler specification languages that fed compiler compilers. And those themselves got so common someone created one called YACC, Yet Another Compiler Compiler. Give it an input syntax and map it to an output syntax and press a button.

      --
      (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
    50. Re:chicken or egg? by dbIII · · Score: 1

      Awesome books. Still very relevant today since you could adapt the lathe and the mill to CNC with controlled motors on the hand controls.

    51. Re:chicken or egg? by Impy+the+Impiuos+Imp · · Score: 1

      And large virgin deposits of virgins who will step up to the technical challenge.

      --
      (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
    52. Re:chicken or egg? by Impy+the+Impiuos+Imp · · Score: 1

      how do you build a lathe without a lathe? Or a generator without electricity?

      Or high-speed rotating gravity nullification discs without high-speed rotating gravity nullification discs?

      --
      (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
    53. Re:chicken or egg? by Anonymous Coward · · Score: 1

      Easily accessible deposits of any useful ore or fuel has been mined out ages ago.

      There is a sizeable deposit of iron in my garage. High-purity stuff, too.

    54. Re:chicken or egg? by demonlapin · · Score: 5, Interesting

      I remember seeing a pretty cool 8080 program to zero memory. It went something like:
      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.

    55. Re:chicken or egg? by Anonymous Coward · · Score: 0

      Sorry, I left my copy of the RIM loader in my other pants pocket...

    56. Re:chicken or egg? by Anonymous Coward · · Score: 0

      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.

      No you couldn't. That PoS was locked down in all kinds of awful ways, unless you paid for some stupid module to open things up. Other kids were PEEKing and POKEing and I knew I was missing out on something. That machine was my first too; but it was a surprise from my parents at Christmas. I never would have asked for it if they had come to me first.

      It took a couple years of begging and the price drop to $400 for me to get a C-64. The upside of that is that I might have ended up with the far less capable Vic-20 if it hadn't been for the delay, and no excuse for an upgrade. Even my parents understood the shortcomings of the TI after a while--nothing but BASIC, and a severe lack of 3rd party software due to the closed nature of the platform. They were naive enough to be duped by Bill Cosby's endorsement. God bless 'em; when you're a working class WW2 era parent, what else do you have to go in?

      I tried not to hold too much of a grudge against Cosby or the TI. They were just trying to help themselves like anybody else...

    57. Re:chicken or egg? by macbeth66 · · Score: 1

      I still have the scars from 'programming' the PDP-8.

    58. Re:chicken or egg? by demonlapin · · Score: 1

      Been a long time since I heard it that way - but I've heard "That's begging the question" a fair bit to mean "you're making a circular argument", and it helps people keep the two straight in their head if they consciously choose to separate them. That said, it would be a lot simpler to call the logical fallacy "circular reasoning" instead of "begging the question".

    59. Re:chicken or egg? by demonlapin · · Score: 1

      Did you actually do it? I don't have anywhere to set up shop, though I do know a guy who owns a welding supply company... between the two of us I bet we could do it. I've seriously considered joining the local blacksmithing group for this reason.

    60. Re:chicken or egg? by ShanghaiBill · · Score: 1

      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.

    61. Re:chicken or egg? by Anonymous Coward · · Score: 0

      philosophy 101
      captcha: compute

    62. Re:chicken or egg? by Intrepid+imaginaut · · Score: 1

      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.

    63. Re:chicken or egg? by Anonymous Coward · · Score: 0

      Well-trolled sir, well-trolled.

    64. Re:chicken or egg? by Anonymous Coward · · Score: 0

      I dont know about hickory switches or directly toggled opcodes, but a lot of my code involves whiskey.

    65. Re:chicken or egg? by Anonymous Coward · · Score: 0

      Sigh. It raises the question.

      The phrase "beg the question" might be justified here because one of the meanings of "to beg" is "to urgently ask". Hence, it's a stylized way of saying "to urgently ask the question".

      "To urgently ask the question" is somewhat similar in meaning to "to raise the question". Because of this, it's not a logic error to use the phrase "to beg the question" as a replacement for "to raise the question".

      (I personally don't use the phrase because I feel it tends to suggest a sense of urgency where none is called for.)

    66. Re:chicken or egg? by Anonymous Coward · · Score: 0

      You need an assembler (necessary for any compiler, because as soon as the compiler creates object code, you need to turn that object code into binary and also (usually) acts as a linker). Then you write a (very small) compiler in object code. ....then use the assembler to create the binary. Then use that binary compiler to create your new compiler. Then you can re-compile your new compiler with your old compiler (are you confused yet?) for further optimization.

    67. Re:chicken or egg? by Anonymous Coward · · Score: 1

      You MADE 1's??? Why, back in my day, every program was just a different amount of zeroes. The length of a zero-string (being a natural number and thus interchangeable with binary) was used to execute every legal program.

    68. Re:chicken or egg? by flargleblarg · · Score: 1

      Damn, that is cool. Thanks for sharing.

    69. Re:chicken or egg? by Anonymous Coward · · Score: 0

      I was talking to a guy on an airplane today who did this sort of thing with SGI and Cray hardware. His tales were frightening.

    70. Re:chicken or egg? by rs79 · · Score: 1

      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.

      --
      Need Mercedes parts ?
    71. Re:chicken or egg? by rs79 · · Score: 1

      Rightfully so. That thing was a pig.

      DIBOL?

      --
      Need Mercedes parts ?
    72. Re:chicken or egg? by rs79 · · Score: 1

      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

      --
      Need Mercedes parts ?
    73. Re:chicken or egg? by rs79 · · Score: 1

      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.

      --
      Need Mercedes parts ?
    74. Re:chicken or egg? by rs79 · · Score: 1

      A compiler written in FORTRAN? Really? Which one?

      --
      Need Mercedes parts ?
    75. Re:chicken or egg? by dryeo · · Score: 3, 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,
      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).

      --
      https://en.wikipedia.org/wiki/Inverted_totalitarianism
    76. Re:chicken or egg? by Tough+Love · · Score: 1

      How was the first compiler compiled?

      How was the first dictionary written?

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    77. Re:chicken or egg? by Tough+Love · · Score: 1

      How was the first compiler compiled?

      With an assembler.

      Incorrect, that is "assembled" not "compiled".

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    78. Re:chicken or egg? by demonlapin · · Score: 1

      Yeah, it's pretty strange. But it's both semi modern and understandable, and I have had a great time reading annotated assembler code for CP/M and MS BASIC, which use some very cool tricks. The best I have seen was one where they had some instructions that were all 2 bytes long and only one of them should be executed based on a jump instruction. So you jumped to the one you wanted and the two byte instructions were each followed by the opcode for loading an irrelevant register with a two byte value... you jumped to the one you wanted, any subsequent code just looked like (load register with next two bytes) which swallowed up other two byte commands.

    79. Re:chicken or egg? by ArsonSmith · · Score: 1

      It's dumb because it is stupid.

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    80. Re:chicken or egg? by ldobehardcore · · Score: 1

      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.

      --
      Hectice, baby, Mercator says hello to you
    81. Re:chicken or egg? by CAIMLAS · · Score: 1

      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' society. Any town with a college campus that teaches decent science is going to have the intellectual capital (either in minds or in books) to get things off the ground. In any town, there are a handful of people who already do these 'cottage industry hobbies', too: I know two local knifemakers, a tanner, and 3 bootmakers (two of which are good enough to make a modest living at it). And this isn't a 'big' town, the local population is under 70k with not much of any other population centers nearby (Denver is 8 hours away).

      I've also electroplated and done crude welding with a car battery. I know others who have as well.

      I'm pretty sure a 'general contractor' who loves spending time outdoors would be pretty quick to be able to fashion

      Car hoods and body panels would quickly be hammered out into crude furnaces or stoves, as needed.

      All available PV cells would be put to use charging all available automotive batteries once petrofuels were unavailable, and inventive people would turn their children into gerbils to charge the batteries, possibly through means of a game.

      People would end up turning Home Depot into a massive greenhouse (or similar stores, at least).

      All of this is easily possible in a connected community. Yeah, they'll have to be fighting back the barbarians, but it's not such an unsurvivable/bleak situation as you paint.

      --
      ~/ssh slashdot.org ssh: connect to host slashdot.org port 22: too many beers
    82. Re:chicken or egg? by Anonymous Coward · · Score: 0

      You create a simple compiler by hand in assembly using a hexeditor. Then you use the simple compiler to compile the next compiler, that to create the next one and so on. Gradually you get a more and more complex compiler. The current generation would be impossible to create by hand in a hexeditor.

      It's known as Bootstrapping

    83. Re:chicken or egg? by dbIII · · Score: 1

      No, I got to know a guy at a foundry that let me do stuff with aluminium casting and most places where I worked had few machine tools and some heat treatment furnaces - have to admit I miss having access to that stuff. The only real blacksmithing I've done is steel tent pegs made from rod using charcoal and a chimney made from a few drums, and that's just about as easy as it gets.

    84. Re:chicken or egg? by Greyfox · · Score: 1

      Yeah, my parents got it because it was the cheapest thing they could find -- $50 at K-Mart right after TI had discontinued the product line. I like to say it was due to the distressing tendency of the power supply to catch on fire if left on too long. I finally convinced them to spring for the assembly language module for it and wrote some code to move a sprite around the screen with one of the joysticks. I pretty much stopped using it as soon as I could get my hands on the various Apple 2 machines at school, though. All those early machines were pretty bad though. I think the first one I ever actually drooled over was the Amiga. Never did own one of those, sadly. At least I got an intro to basic and some early assembly a few years earlier than I would have otherwise.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    85. Re:chicken or egg? by Anonymous Coward · · Score: 0

      Hi dad!

    86. Re:chicken or egg? by marcello_dl · · Score: 1

      >Presumably any post-apocalyptic society will have ample supplies of scrap iron to work with.

      *Radioactive scrap iron :P

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
    87. Re:chicken or egg? by nateb · · Score: 1

      Rapid? Latest survey is about 112k for the MSA.

      --
      -- Nate
    88. Re:chicken or egg? by Alioth · · Score: 1

      You just listed the very things that make English such a rich language!

      That it *is* the product of the "cross-fertilization" of other languages is exactly what makes it rich. That the rules aren't rigid is what makes it richer still. Compare this to French, which the French government is hell bent in ossifying by preventing terms from other languages being "francofied" (although I suspect the French government will be no more successful than King Canute was at holding back the sea)

    89. Re:chicken or egg? by rajanala83 · · Score: 1

      Maybe you are right, but there is a guy who did a toaster from scratch: www.thetoasterproject.org

    90. Re:chicken or egg? by smittyoneeach · · Score: 1

      But it built character, eventually arriving at UTF-32, no?

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    91. Re:chicken or egg? by serviscope_minor · · Score: 1

      I was like "Oh, the number is just an opcode! Derp!"

      By the way, this is an exceptionally good way to troll LISP programmers.

      When they get evangelical and tell you how code is just data and data is code you must first look confused. Then act as if a light slowly dawns, then exclaim "ooooooooooooh you mean just like machine code?".

      Works every time :)

      --
      SJW n. One who posts facts.
    92. Re:chicken or egg? by HenryT88 · · Score: 1

      Oh my - thanks for the memories of TTY, magnetic tape drives and sequences of switch flipping for bootstrapping / loading /dumping....Are these things still in service?

    93. Re:chicken or egg? by Anonymous Coward · · Score: 0

      It's not over yet.I can forgive others using the phrase that way - for now, but I will never do so myself. Gonna take this fight underground

    94. Re:chicken or egg? by Anonymous Coward · · Score: 0

      That the rules aren't rigid is what makes it richer still.

      The rules are pedantic as all hell. Furthermore, some of English's rules are just plain useless and nonsensical. What language have you been using?

    95. Re:chicken or egg? by Anonymous Coward · · Score: 0

      Remember the PDP 8i, 12 bit serial bus processor, crazy device.

    96. Re:chicken or egg? by Zontar+The+Mindless · · Score: 1

      Don't forget to nuke LVNV.

      --
      Il n'y a pas de Planet B.
    97. Re:chicken or egg? by jmccue · · Score: 1

      blacksmith ? You had a blacksmith. Back in my day we would have to take over a village, group people in sets of 8. Hands at the side was 0, hands raised was 1. Bit complement was always fun to watch

    98. Re:chicken or egg? by Zontar+The+Mindless · · Score: 1

      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.

      Evidently "rich" to you means something other than what it does to the rest of us, since most people would say that its unusually large lexicon and wide range of syntactic choices are *exactly* what make English a comparatively "rich" language.

      It's the Perl of human languages.

      --
      Il n'y a pas de Planet B.
    99. Re:chicken or egg? by Anonymous Coward · · Score: 0

      Nope, there's two of you. Go have insufferable children together.

    100. Re:chicken or egg? by Anonymous Coward · · Score: 0

      PROLOG.

    101. Re:chicken or egg? by innerweb · · Score: 1

      Z80 is what I cut my teeth on for serious binary programming. I really like the index instructions and the relative simplicity of the overall instruction set compared to others I worked with.

      --
      Freud might say that Intelligent Design is religion's ID.
    102. Re:chicken or egg? by gtall · · Score: 1

      Not crazy, it turns out 12 bits is just perfect for motor control. More than that and you are just shuffling noise, less and you don't have the resolution. It was so popular that Intersil (don't know whatever happened to them) produced a PDP-8 microprocessor.

    103. Re:chicken or egg? by bondsbw · · Score: 1

      I've wondered, if I were stuck on an island without the materials needed to build a radio, but access to an intercontinental submarine communications cable, what would it take to send a viable TCP/IP signal from scratch to request help?

      Difficulty: Cutting the cable to force a repair mission doesn't count.

      --
      All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
    104. Re:chicken or egg? by bondsbw · · Score: 1

      So what, I could care less.

      --
      All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
    105. Re:chicken or egg? by wonkey_monkey · · Score: 3, Funny

      Which begs the question of why you felt the need to post, thus bringing us full circle.

      --
      systemd is Roko's Basilisk.
    106. Re:chicken or egg? by rs79 · · Score: 1

      This is a joke, right?

      --
      Need Mercedes parts ?
    107. Re:chicken or egg? by robi5 · · Score: 1

      If much of the population is wiped out and a few centuries of nomadity steps in, then most of those surface-brought metals etc. will have vanished, corroded away, or became impossible to process. I think that any oil and gas reserves on the surface or near it will be exhausted, depleted, contaminated etc. first. Then in those few hundred years, those mutants will have forgotten what any remaining artifacts are; and maybe another few thousand years will elapse when steel is the new gold.

      So let's get real, if a catastrophe occurs that stops civilization for more than a few decades, we might be in it for a long ride again.

      There is a tightrope as well: if all fossils become quickly inaccessible but otherwise we remain intact (water/nuclear power plants etc.) then it may bring about an accelerated route to solar based economy, the end of the asphalt roads and beginning of glass / ceramics roads etc.

    108. Re:chicken or egg? by Anonymous Coward · · Score: 0

      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)

      Entering opcodes in hex isn't as bad as you think. 6502 has a very small instruction set: I've not used it for years but I still remember some of the codes (JMP is 4C, JSR is 6C etc).

    109. Re:chicken or egg? by ebvwfbw · · Score: 1

      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.

      Answers:
      1) The egg came first.
      2) By hand. Heat up metal and forge it with a hammer. They aren't that hard to make if you have a good forge set up.
      3) Now you're getting silly. Same way they did it originally, wrap the windings by hand. It's not hard.
      4) Not really. Depends on how close to stone we get and how many people are still left that are free. We could be back where we are today in just 200 years. I'm probably off by 100 years. It may take only 100. If we aren't free and it goes into more socialism/communism or outright anarchy, we may never get back.

    110. Re:chicken or egg? by Clueless+Moron · · Score: 1

      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.

      Did they really say "begs the question" or did they say "begging the question"? There's a big difference. If you say the former, you're obviously saying "raises the question". If you say the latter, it's "making a circular argument".

      I just don't see why people get so hysterical when "beg" and "question" end up in the same sentence. I think the context always makes it clear. "That begs the question, ..." has an obvious meaning.

    111. Re:chicken or egg? by smittyoneeach · · Score: 1

      I'm sure a lot of that gear is. Even if you can refresh the hardware, you don't go yanking all that noise without affecting the ship's trim.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    112. Re:chicken or egg? by dave87656 · · Score: 1

      Don't laugh, my first programming (and only) on a commodore 64 was using the basic interpreter to poke 6502 (IIRC) instruction codes into memory which copied the screen contents from the screen register area to memory and wrote another program to restore it.

    113. Re:chicken or egg? by Pseudonym · · Score: 1

      Assuming we really were starting from scratch, I think you might be underestimating how long it would take to re-domesticate enough plants and animals.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    114. Re:chicken or egg? by Pseudonym · · Score: 1

      The first compiler was ARITH-MATIC, and was indeed written in assembler.

      The first Lisp compiler, however, was written in Lisp. Or, more accurately, the first Lisp compiler was a set of instructions on paper for translating Lisp to assembler which people "ran" by hand. The second Lisp compiler was written in Lisp, and bootstrapped by hand.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    115. Re:chicken or egg? by CAIMLAS · · Score: 1

      Hah, are you from here?

      The MSA is of the "Metro area", which is inclusive up to Spearfish (Hill City, Lead, Deadwood...), 40 minutes from here, and east to Wall. RC itself is still under 70k afaik.

      --
      ~/ssh slashdot.org ssh: connect to host slashdot.org port 22: too many beers
    116. Re:chicken or egg? by nateb · · Score: 1

      Yep, I live near exit 78. Interested if meeting other slashdorks (used lovingly!) if you're interested in a free cup of coffee.

      --
      -- Nate
    117. Re:chicken or egg? by charles2678 · · Score: 1
  4. All right, by Anonymous Coward · · Score: 3, Funny

    This should be in the Debian repositories by the end of the decade.

  5. Already in experimental by tuppe666 · · Score: 1

    http://packages.debian.org/search?suite=experimental&searchon=names&keywords=GCC 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.

    1. Re:Already in experimental by twistedcubic · · Score: 1

      Oh, c'mon, you messed up the joke. Debian is the best operating system in the world. It is thick-skinned--it can take a joke.

  6. Nice new feature by EvanED · · 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.

    1. Re:Nice new feature by Anonymous Coward · · Score: 0

      It's for use by O.G k-rad l33t c0d3rZ only..

    2. Re:Nice new feature by drinkypoo · · 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.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    3. Re:Nice new feature by Impy+the+Impiuos+Imp · · 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.

      --
      (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
    4. Re:Nice new feature by EvanED · · Score: 1

      My impression is that's not uncommon for software where reliability is paramount; I first heard of it with respect to NASA. The argument was essentially the same as yours -- they do all their testing and validation on debug builds, and why would they fly something that they didn't test?

      For most day-to-day software though, a rarely-encountered crashing bug (for instance) is probably more attractive than putting up with a significantly slower build.

    5. Re:Nice new feature by nateb · · Score: 1

      Perhaps today is a good day to die!

      --
      -- Nate
    6. Re:Nice new feature by 0ld_d0g · · Score: 1

      hmm..

      gcc's -g switch already creates debug information with zero impact on performance. You can use -g with any optimization level you want.

    7. Re:Nice new feature by 0ld_d0g · · Score: 1

      What extra debug information did you require that the -g flag already didn't provide?

    8. Re:Nice new feature by TheRaven64 · · Score: 1

      In theory. In practice (and this is not limited to gcc), a number of optimisations make debug information harder to make sense of. Even simple things, like common subexpression elimination, can result in debug information that is difficult to understand. Inlining, function specialisation, basic block reordering, and so on can make it hard to understand the debug info even if it's correctly preserved by all of the optimisation passes, which it isn't.

      --
      I am TheRaven on Soylent News
    9. Re:Nice new feature by 0ld_d0g · · Score: 1

      a number of optimisations make debug information harder to make sense of. Even simple things, like common subexpression elimination, can result in debug information that is difficult to understand. Inlining, function specialisation, basic block reordering, and so on can make it hard to understand the debug info even if it's correctly preserved by all of the optimisation passes, which it isn't.

      And? 4.8.x doesn't help with any of those so I am not sure why they're advertising it as such. In most cases -g does a good enough job of telling you which line of code you're at when you break inside a debugger. Single stepping (if you're stepping via lines and not instructions fails in the typical cases as expected) I've been using a build of 4.8 for the past week or so. My original point was having debug info preserved in addition with having optimizations turned on - is not particularly new or noteworthy.

    10. Re:Nice new feature by TheRaven64 · · Score: 1

      4.8.x doesn't help with any of those so I am not sure why they're advertising it as such.

      The new -Og runs optimisations, but only those that won't destroy debug information. Previously, if you wanted -g, you were recommended to use -O0, or you lose debugging fidelity, but you sacrifice performance. -Og will be faster than -O0, but should have the same debugging fidelity. If you use -O2, then you will get worse debug output (for example, variables not able to be rematerialised in the debugger, flow control bouncing around the source code).

      --
      I am TheRaven on Soylent News
    11. Re:Nice new feature by jgrahn · · Score: 1

      Previously, if you wanted -g, you were recommended to use -O0, or you lose debugging fidelity

      That's partially true and partially misleading. No matter what optimization you use, -g provides stuff like instruction to file:line mapping, which is important in many scenarios (valgrind, gprof, pstack, analyzing core dumps ...). The debugging fidelity you speak of is mostly applicable when stepping around in a symbolic debugger, and many of us use those very rarely.

      Personally I'll keep doing what I do now: compile using -g -Os from start to finish. If others are helped by -Og that's fine, as long as it doesn't hurt the features I'm interested in.

    12. Re:Nice new feature by Anonymous Coward · · Score: 0

      Previously, if you wanted -g, you were recommended to use -O0, or you lose debugging fidelity

      That's partially true and partially misleading.
      No matter what optimization you use, -g provides stuff like instruction to file:line mapping, which is important in many scenarios (valgrind, gprof, pstack, analyzing core dumps ...).
      The debugging fidelity you speak of is mostly applicable when stepping around in a symbolic debugger, and many of us use those very rarely.

      "you lose debugging fidelity" != "you lose all debugging fidelity"

      Same as how "losing money" doesn't mean you've gone completely broke.

    13. Re:Nice new feature by jelle · · Score: 1

      While I understand pragmatism vs perfection, quite probably your code (or your os/libraries/api definitions) still had actual bugs, they simply didn't result in the same (language correct but unintended) behaviour or they didn't get triggered (as easily) in debug compiles. Even simple oob access bugs could still exist.

      I personally don't feel fully comfortable releasing programs/firmware with bugs that I know are dependent on compiler optimization or instrumentation flags, unless I understand exactly how the compiler flag makes that happen for each specific bug. Actually, when possible I like to compile and test a program with varying flags, and for varying ABI's and platforms for the sole purpose of identifying and fixing those bugs. It can be a good help for locating bugs, similar to running a program in valgrind, with libefence, etc.

      --
      --- Hindsight is 20/20, but walking backwards is not the answer.
  7. It gets around by Sponge+Bath · · Score: 1

    [GUARD #1] Are you suggesting compilers migrate?
    [ARTHUR] Not at all, they could be carried.

    1. Re:It gets around by colinrichardday · · Score: 0

      Arthur: They could grip it by the source code.

      Guard: It's not a question of grip; it's a question of executable ratios!

  8. RHEL version? by DoofusOfDeath · · Score: 1

    Anyone know when RedHat is going to make a version of devtoolset which offers GCC 4.8?

    1. Re:RHEL version? by Anonymous Coward · · Score: 1

      yeah.. they'll call it gcc-2.96.4.8 and i'll make broken binaries.

    2. Re:RHEL version? by kthreadd · · Score: 1

      It's currently on 4.7.2 and as far as I know has no problem with making binaries.

    3. Re:RHEL version? by Mr+Thinly+Sliced · · Score: 1

      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:

      tar zxf gcc-4.8.0.tar.gz
      cd gcc-4.8.0
      ./contrib/download_prerequisites
      cd ..
      mkdir gcc-4.8.0-build
      cd gcc-4.8.0-buid
      ../gcc-4.8.0/configure --prefix=/SOMEINSTALLDIR --disable-multilib --disable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran
      make -j #NUMPROCESSORS
      make install

      then add to PATH, LD_LIBRARY_PATH etc

      That'll get you up and running.

    4. Re:RHEL version? by DoofusOfDeath · · Score: 1

      Thanks!

  9. How to boot up civilization by Animats · · Score: 1, 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, by David Gingery, just for this purpose. The first book, Build Your Own Charcoal Foundry, starts the process. The books do assume there's plenty of metal scrap around; you're not expected to start from ore.

    Getting up to pre-WWII levels from very little can be done. Much of Europe and Japan had to do it after WWII. Although many of the skills have been lost. How many people today can operate a lathe?

    1. Re:How to boot up civilization by _Shad0w_ · · Score: 1

      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.

      --

      Yeah, I had a sig once; I got bored of it.

    2. Re:How to boot up civilization by Anonymous Coward · · Score: 0

      That's a pretty critical point. The level of professionalism in "blue collar" jobs has increased enormously. There once was a time when people regularly had fingers lopped off and nobody thought twice about it. Our tolerance for accidents is dramatically lower than it once was. That's why so few people have experience operating these machines. Imagine if everybody had to go to school for 6 months of intensive training before being allowed to drive a car. A lot fewer people would be driving cars, and people would expect much more professionalism from car drivers. And we'd all be more scared of them as dangerous machines.

    3. Re:How to boot up civilization by dbIII · · Score: 1

      How many people today can operate a lathe?

      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.

    4. Re:How to boot up civilization by Anonymous Coward · · Score: 0

      I found this web page discussing a similar microfiche library, the Appropriate Technology Library, which appears to be available only on CD-ROM or DVD now, which is unfortunate.

      I'm not sure it's the same thing; the earliest copies in libraries seem to date only from 1986 or so.

  10. Yessssss! by Greyfox · · Score: 4, Funny

    Now! Witness the power of this FULLY OPERATIONAL C++ Compiler! Muahahahahahaha! Erm... damn it... what's the flag for debug symbols again?

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    1. Re:Yessssss! by _Shad0w_ · · Score: 1

      -g?

      --

      Yeah, I had a sig once; I got bored of it.

  11. Does it dance yet? by Anonymous Coward · · 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?

    1. Re:Does it dance yet? by dannys42 · · Score: 1

      There was an old saying that C++ will make every project late over budget. I'll be curious to see how this affects the gcc project.

    2. Re:Does it dance yet? by Alioth · · Score: 1

      GCC has always been usable on things other than the command line. GUI IDEs all run a command line invocation when you compile a program, including the Microsoft one. No C compiler I know actually has a GUI.

    3. Re:Does it dance yet? by 0ld_d0g · · Score: 1

      Then its a good thing that the old saying is not only false and meaningless, but also ridiculously uninformed.

    4. Re:Does it dance yet? by Anonymous Coward · · Score: 0

      Try Borland C. Not only did it compile directly from the IDE, but the command line compiler had a slightly different set of bugs.

    5. Re:Does it dance yet? by TheRaven64 · · Score: 2

      No. The front ends are still tied to the middle in a strange way (for example, doing constant folding in the parser, so you can't get an accurate parse tree to use in refactoring tools from the gcc front end). It's also interesting to note that two of the features that they highlighted in this release, Address Sanitizer and Thread Sanitizer are things that began life in Clang / LLVM. This is largely due to the progression of Google's shift from GCC to LLVM (these tools were developed at Google). Given that Google currently employs about half of the active GCC developers, it will be interesting to see what happens in the long run.

      --
      I am TheRaven on Soylent News
    6. Re:Does it dance yet? by TheRaven64 · · Score: 1

      Even the standard was late. C++0x was released in 2011...

      --
      I am TheRaven on Soylent News
    7. Re:Does it dance yet? by wootest · · Score: 1

      C compilers aren't well served by having GUIs, but IDEs are well served by compilers being libraries since it makes accurate and consistent analysis possible. If an IDE continuously uses compiler-like logic all the time anyway and has several files pre-parsed and in a known state, compilation can happen faster by not having to start over from scratch every time. And that's before we get to real semantic/static analysis and refactoring assistance.

      GCC has been usable as a component in making some stuff happen, but as the OP pointed out, it was an explicit goal of RMS's to not make embedding too easy lest someone bake in the smarts without going whole hog GPL.

  12. Licensed under the GPLv3 or later by snikulin · · Score: 2

    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).

    1. Re:Licensed under the GPLv3 or later by thirdpoliceman · · Score: 2

      I was going to say yes, and I'm fairly sure the answer is yes. But, I have not read the GPL3, so I do not really know the difference between it an GPL2. It seems unlikely that they would force people to release code under an open source license because you compiled it with GCC. In fact, that is probably not possible because you own the copyright on your code and any compiler should be able to make it work (depending on portability). So, I would say yes, you can compile non-OSS projects with GCC 4.8.0.

    2. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      Problem are the required libraries which form the C runtime environment and are part of the compiler system. Pure GPL compilers would only be allowed for open source programs but GCC was up to now GPL2 with an additional linking exception. I assume but didn't check that GCC 4.8 uses GPL3 with a linking exception.

    3. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      Are you intending to distribute the compiler on your embedded device? That is about the only way it would matter and im guessing you are not.

      Just like using an foss media encoder the license does not cover this.

    4. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 2, Informative

      The license 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.

    5. Re:Licensed under the GPLv3 or later by thirdpoliceman · · Score: 1

      I'm not sure how compiling my copyrighted work with a program would force me to change its copyright to GPL3. The GPL has to be applied to the source code, and this requires the creators of binary distributions of the source code to provide the source for the binaries. I do not think the GPL3 could make a binary created by GCC 4.8.0 count as covered under the GPL because the GPL isn't applied to binaries its is applied to source code. I am almost 100% certainly GCC 4.8.0 can't make my source code use the GPL. That is something I, as the copyright owner, have to do. Perhaps there is some weird language in the GPL3 that says by using GCC 4.8.0 I, by default, am assigning the GPL3 to my code, but that seems unlikely. I will take the time to read the GPL3 this weekend.

    6. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      But, I have not read the GPL3,

      That hasn't stopped anyone else from trashing it.

    7. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 1

      If you don't know the answer to your question, you're not an embedded developer, you're an aspiring embedded developer. Anyone with any experience knows that GCC dominates in this area. Many GCC developers are employed by companies in the embedded industry.

      There are many other embedded compiler vendors--some which may even ship more product---but none as singularly significant as GCC.

    8. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      Spoken like someone who clearly is not an experienced embedded developer across numerous brands. GCC does not dominate this area. Thanks for playing.

    9. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      A compiled binary *might* be considered a derivative work of both the source code and the compiler. Compilers sometimes copy substantial chunks of code which is either embedded in the compiler binary or stored in header files which are provided as part of the compiler.
      Which is why the licences for the GNU "toolchain" components (gcc, binutils, bison, etc) normally include specific language waiving any copyright which may otherwise arise from such usage.
      But don't forget: the GPL is a licence, not a contract. It permits you to do certain things for which copyright law requires a licence. Unlike most EULAs (which are actually contracts rather than licences), it doesn't attempt to impose terms as a condition of use. Any "conditions" in the GPL are actually limitations on the granted copyright licence, and they only apply if you need a licence, i.e. if you distribute a derivative work. And what constitutes a derivative work is up to the legislature and the courts, not the program's authors.

    10. Re:Licensed under the GPLv3 or later by donscarletti · · Score: 4, Informative
      The license for the runtime is here, and yes, binaries compiled with gcc can be distributed under any license the author chooses, even after linking with the gcc runtime.

      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.

      --
      When Argumentum ad Hominem falls short, try Argumentum ad Matrem
    11. Re:Licensed under the GPLv3 or later by Nivag064 · · Score: 1

      Formally you should consult a lawyer.
      (Check that they are both competent and ethical.
      It is very important that they understand the legal
      and ethical implications of the GPL.)

      I am _NOT_ lawyer!

      The GPL v2 & 3, apply to the compiler not its output.

      Any software that extends the gcc software, by virtue of incorporating the actual source code of the gcc compiler, is subject to the GPL. However, the output of the gcc during compilation and linking is _NOT_ subject to the GPL, unless the source code was already under the GPL.

      Or to put it more simply, compiling using gcc does not change the status of the program being compiled with respect to the GPL.

    12. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      oh? then who does? instead of posting to one up the parent and resolve your butt hurt feelings about your own favorite environment, you could actually contribute to the discussion..

    13. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      Name _any_ single compiler vendor that works on more chips and is used by more developers? You can't, and you won't.

      There are a ton of embedded compilers out there, though most license their code from a handfull of vendors like Green Hills, etc, and rebrand it as Acme C compiler.

      The problem w/ embedded folks is they get so wrapped up in the little industry niches that they occupy that they're pretty much oblivious to everything else.

      I would point out that Android and iOS (until recently) are GCC users, and they ship hundreds of millions of units and have millions of developers. That almost holds water. There are much more widespread products, and I hesitate to discount them, although often times their hardware vendors don't provide fully C-compliant compilers.

    14. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      Formally you should consult a lawyer.

      Are you one of those people who'd consult a philosopher of ethics when facing a moral question?

    15. Re:Licensed under the GPLv3 or later by tlhIngan · · Score: 1

      I'm not sure how compiling my copyrighted work with a program would force me to change its copyright to GPL3. The GPL has to be applied to the source code, and this requires the creators of binary distributions of the source code to provide the source for the binaries. I do not think the GPL3 could make a binary created by GCC 4.8.0 count as covered under the GPL because the GPL isn't applied to binaries its is applied to source code. I am almost 100% certainly GCC 4.8.0 can't make my source code use the GPL. That is something I, as the copyright owner, have to do. Perhaps there is some weird language in the GPL3 that says by using GCC 4.8.0 I, by default, am assigning the GPL3 to my code, but that seems unlikely. I will take the time to read the GPL3 this weekend.

      The problem is because the OUTPUT of GCC may consist of GPL copyrighted stuff.

      First, there's stuff like runtime libraries like libgcc which provide helper functions in case GCC is unable to emit instructions to do so (a common one is integer division - on ARM, libgcc often comes into play on some of the more esoteric divisions. You may see symbols like _uldivs). This library is shipped with GCC and compiled as part of the build of GCC. The source is GPL(v3), which in theory would make the library GPLv3 so if you link it (which is default otherwise you'll get link errors), your final binary will be GPLv3. However, an exception in the GCC license makes it so libgcc is NOT GPLv3.

      The second part is a bit more tricky. Part of the output of GCC comes out from the source code of GCC. I.e., when the compilation is being done, you have an intermediate representation which falls out from GCC's internal code, followed by a back end that emits assembly code, which also falls out from GCC's source code. A very strict interpretation could imply that this output was partially derived from GCC's source code and thus is GPLv3 as well.

      Again, the license exception means that the output is NOT GPLv3. This also applies to a few other tools that take in source and transform it in some way producing more source code.

      Note that I think GCC also ships with some libraries that are optional and thus do not have the GPL exception to them.

      General upshot of it is that yes, you can compile proprietary code with GCC and GCC will NOT alter the license.

      And yes, you're right to ask. A lot of companies are scared of GPLv3 and have instituted policies to restrict and limit what kind of open-source code is used in their company to avoid accidentally producing licensing violations. Especially since GPLv3 is incompatible with GPLv2-only code. I've seen some go as far as declare all GPLv3 code is verboten, except for a small lit of approved programs. And these policies apply not only to open-source code bundled with a product, but open-source tools. New versions may have to be re-sent to legal in order for them to compare the licensing terms to ensure they haven't changed.

      And if you wonder why there's such an interest in LLVM - well that's how scared they are

    16. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      GPL IS NOT AN EULA !!!!!!!!!!!! GPL IS NOT AN EULA !!!!!!!!!!!! GPL IS NOT AN EULA !!!!!!!!!!!! GPL IS NOT AN EULA !!!!!!!!!!!!

      Repeat that over and and over until you get it!

      GPL is a distribution license which starts applying only if you're going to modify the program itself (in this case, GCC). NOT AN EULA.

    17. Re:Licensed under the GPLv3 or later by serviscope_minor · · Score: 1

      I've seen some go as far as declare all GPLv3 code is verboten, except for a small lit of approved programs. And these policies apply not only to open-source code bundled with a product, but open-source tools. New versions may have to be re-sent to legal in order for them to compare the licensing terms to ensure they haven't changed.

      Well, I guess that's how the free market should work: if a company hires incompetent lawyers they will make themselves less competitive and lose business.

      And if you wonder why there's such an interest in LLVM - well that's how scared they are

      And plenty of companies are petrified of even the LGPL, despite Webkit proving it's nothing to be frightened of.

      To be honest lots of companies also thing they have some super secret special sauce proprietary advantage in software when they don't. Especially hardware companies. They almost universally have awful software and seem inexplicably proud of it.

      --
      SJW n. One who posts facts.
    18. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      I tried this once and my computer caught on fire. I had to say a prayer to RIchard Stallman and visit a Gnu Shrine for absolution.

      W

    19. Re:Licensed under the GPLv3 or later by TheRaven64 · · Score: 1

      The GPL v2 & 3, apply to the compiler not its output.

      Not quite. They apply to the compiler and everything that is a derived work of the compiler. A compiler like gcc inserts things like specialised versions of standard functions and includes libraries for things like exception unwinding and so on. The GPL would certainly apply to these, except that GCC includes a specific exemption.

      In the case of recent versions of GCC, the exemption is actually stronger. Older GCCs had an exemption to GPLv2 that only applied for code compiled with GCC. Newer ones include an exemption that applies to any 'eligible compilation process' so they can be used with other compilers too.

      --
      I am TheRaven on Soylent News
    20. Re:Licensed under the GPLv3 or later by Nivag064 · · Score: 1

      Thanks, I understand the situation a lot better now!

      I was aware of less than half of what you wrote, but not the full subtleties.

      So in essence, the code that gcc compiles without using extensions is safe. And gcc can be combined with other software in the specified ways, to produce compiled code that is also safe (see the post I've replied to for the 'specified ways'). Here 'safe' means does not have its GPL status changed.

      So the questioner can use gcc safely, and safely in more ways than I had stated.

    21. Re:Licensed under the GPLv3 or later by Anonymous Coward · · Score: 0

      Don't you hate it when people don't get it?

      For example, gcc, flex, and bison take an input language and transform it. Part of this transformation includes inserting boilerplate code, licensed under the GPL. Therefore, non-GPL code that goes through gcc, flex, or bison becomes infected with GPL code. Hope you didn't want to distribute it!

      That's obviously a problem, so they added an exception.

  13. C++ by packrat0x · · Score: 1

    Apparently compiling speed is less important when using powerful CPUs and cross compiling for slower architectures.

    --
    227-3517
    1. Re:C++ by Anonymous Coward · · Score: 0

      i think any performance loss will be outweighed by the ability to write the compiler at a higher level
      of abstraction. which for the end user means a compiler thats more stable and produces better code.

      now if you want to argue whether or not c++ is the right language, i'm right there with you. but apparently
      its what the developers were most comfortable with.

    2. Re:C++ by Anonymous Coward · · Score: 0

      Also, it appears that they actually improved the compiling speed if you read the change log. Notably, they removed a few bottlenecks in the compilation of large functions.

      As is (nearly) always the case, the algorithms you use are typically much more important than the language you implement it in.

    3. Re:C++ by Carewolf · · Score: 1

      Troll or idiot? C++ are C are equivalents, C++ is just more convinient and faster for both for good development and foot shooting.

    4. Re:C++ by serviscope_minor · · Score: 1

      C++ is much slower to compile than C (kind of). So yeah, I wouldn't relish compiling GCC on a Rpi, but as you point out you can cross compile it from a 48 core AMD megabeast if you wish.

      However C++ is only generally much slower than C on debug builds. On builds with the full optimizer, the optimizer takes much longer to run than the parsing phase. Try it: compile times go WAY up with -O3

      Since gcc is built with optimizations, this won't in practice make things as bad as first appears.

      Anyway, given that I can access a reasonably fast computer (quad core i5 and above) and generally spend much more time using GCC than compiling it, C++ is a net win since it'll mean the compiler is faster, less buggy and uses less memory.

      --
      SJW n. One who posts facts.
    5. Re:C++ by unixisc · · Score: 1

      One question here - in a multicore system or a multi-CPU environment, do more cores help compilation happen faster? In particular, do compilers have enough parallelism built into them to take full advantage of all the available processing recources, or are compilers like ordinary software programs that don't run much faster by throwing more cores at them?

    6. Re:C++ by TheRaven64 · · Score: 1

      However C++ is only generally much slower than C on debug builds. On builds with the full optimizer, the optimizer takes much longer to run than the parsing phase.

      Not true. Templates expansion can be a significant part of compilation time. Additionally, C++ encourages a lot of things that rely on the one definition rule. For example, an inline function in C is typically only compiled if it is used, and there must be an explicit compilation unit containing the version to use when it is called but the compiler decides not to inline it. In C++, every compilation unit containing the function must emit it and then the linker will remove all except one. This means that a large project can often end up compiling (and optimising) dozens of copies of a single function in C++, only to have the linker remove all except one of them (which also increases your linking time).

      --
      I am TheRaven on Soylent News
    7. Re:C++ by TheRaven64 · · Score: 1

      Compilers, not so much. Build systems, absolutely. I routinely build llvm on a 32-core machine, and while each compiler or linker job is only using a single core, ninja is capable of ensuring that there is one running on every core for most of the build process. Linking tends to be the bottleneck. Of course if you're using link-time optimisation, then this is even more of a bottleneck...

      --
      I am TheRaven on Soylent News
  14. Interesting. But only in an academic way by Takatata · · Score: 1

    I am software developer and I don't really care in what language my compiler is written. It is more important for me that it compiles my code correctly and as fast as possible.

    1. Re:Interesting. But only in an academic way by Anonymous Coward · · Score: 1

      .... and as fast as possible.

      then you do care...

    2. Re:Interesting. But only in an academic way by Anonymous Coward · · Score: 1

      Well-written C++ will outperform mediocre C, and in the documentation at the GCC site they explicitly plan to avoid using the C++ features that are slow.

      So depending upon how much good C++ they write and how much mediocre C it replaces, the speed changes could be small.

    3. Re:Interesting. But only in an academic way by 0ld_d0g · · Score: 1

      Technically speaking, The only C++ features that are "slow" are ones that are not optimized for in the compiler. This happened quite a bit during early years of C++ and people mistook non-optimizing compilers producing bloated code as an indictment on the language itself.

    4. Re:Interesting. But only in an academic way by Anonymous Coward · · Score: 0

      Thanks for the correction. (I'm not being sarcastic.)

    5. Re:Interesting. But only in an academic way by maxwell+demon · · Score: 1

      This phenomenon is also not restricted to C++. Fortran 90 (which was a very big update to FORTRAN 77, as one might guess from the 23 years between those standards) also acquired a reputation of being slow due to early compilers. Given that Fortran programmers typically care even more about performance than C programmers (FORTRAN programs are typically numeric calculations), this mattered very much for the adoption of Fortran 90.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    6. Re:Interesting. But only in an academic way by maxwell+demon · · Score: 1

      Oops, 13 years, of course ...

      --
      The Tao of math: The numbers you can count are not the real numbers.
  15. GCC vs. CLang by alexo · · Score: 1

    What is the current situation with GCC vs. CLang?

    1. Re:GCC vs. CLang by Anonymous Coward · · 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

    2. Re:GCC vs. CLang by Anonymous Coward · · 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 intention is mostly politics.

      Having competition is good in any case. I'm sure that while there are plenty of fanboys and zealots on each side, I wouldn't be surprised if the major players behind each compiler collection were pretty cordial with eachother.

    3. Re:GCC vs. CLang by dgatwood · · Score: 1

      To me it seems like the major motivation behind LLVM / Clang were to make a great open source compiler that wasn't GPL.

      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 today (static analysis, code refactoring, etc.).

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    4. Re:GCC vs. CLang by 0ld_d0g · · Score: 1

      On performance, they are comparable. (Intel's compiler beating both of them quite handily)

      On design, clang is superior because of its modular design. Afterall the LLVM project was designed with the sole intention of replacing GNU GCC toolchain. Historically FSF had an negative opinion on modularity (esp w.r.t plugins) when it came to the gcc toolchain ( http://lwn.net/Articles/301135/ ) and the llvm project has no such requirement, freeing them up from a design POV.

      Thats about a tweet sized answer as you can get for such a broad question :-P

    5. Re:GCC vs. CLang by TheRaven64 · · Score: 1

      It's more than just the license. If all that you're doing is compiling code, then there honestly isn't much in it. Most code will be fast enough at -O0 with either compiler. For code where performance matters, there's typically less than a 10% difference between the two, and neither is always faster than the other. If, however, you want to reuse parts of the compiler, the LLVM ecosystem is a lot more friendly. For example, libclang provides a stable C API for inspecting C/C++/Objective-C source code. It's used in IDEs for syntax highlighting, refactoring, and cross-referencing, but it's also used in other languages for FFI - you can use it to get the types of C functions trivially. LLVM is easy to use as the back end for other languages, giving static and JIT compilation. It also has a very modular optimisation infrastructure, so it's easy to write an optimisation for a pattern that's common in your program or library, or specific to your source language. It's also very easy to add a back end to LLVM. The ARMv8 back end was written by one person over a few months.

      --
      I am TheRaven on Soylent News
    6. Re:GCC vs. CLang by gnasher719 · · Score: 1

      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.

      The license killed gcc on MacOS X. The license didn't allow Apple to do things they wanted to do (and I suspect that was the intent of the license change), so 4.2 is the latest gcc version available with Xcode, and I think Xcode now doesn't ship with gcc at all.

    7. Re:GCC vs. CLang by Tough+Love · · Score: 1

      Even if GCC were BSD-licensed, it is just not capable of doing half the things that Apple's developer tools use Clang for today (static analysis, code refactoring, etc.).

      Never mind that Coverity built their entire business model around a hacked version of GCC that does truly amazing static analysis.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
    8. Re:GCC vs. CLang by dgatwood · · Score: 1

      Although some of the prototypes at Stanford might have been based on GCC, to the best of my knowledge, all commercial versions of Coverity are based on the EDG parser. So no, they did not build their business model around a hacked version of GCC.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

  16. Re:anyone even using GCC anymore? by Anonymous Coward · · Score: 0

    Nice troll but Linux is still mostly compiled with GCC. Since Linux devices dominate non-Linux in numbers... yes GCC is still relevant, probably more so than other compilers. The world isn't exclusively desktop computing anymore. Get over it. Linux+GCC has practically taken over the world.

  17. Re:anyone even using GCC anymore? by _Shad0w_ · · Score: 1

    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.

    --

    Yeah, I had a sig once; I got bored of it.

  18. Building GCC by Anonymous Coward · · Score: 0

    The summary states building GCC requires a compiler, but doesn't GCC bootstrap itself? Older versions were able to do so.

    1. Re:Building GCC by maxwell+demon · · Score: 1

      Bootstrapping GCC always required a compiler. Originally, it required a K&R C compiler, later I think they required a C89 compiler. And now, it requires a C++ compiler.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  19. Re:anyone even using GCC anymore? by Anonymous Coward · · Score: 0

    How many millions of devices are running software compiled with GCC all for the sake of for the sake of habit? LOL. Try harder, hairyfeet.

  20. except that by decora · · Score: 2, 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-toolchain builds.

    clang has vastly better error messages than gcc. this is increasingly important with the popularity of huge complex template libraries like boost, eigen, cgal, etc etc etc.

    1. Re: except that by robertchin · · Score: 1

      I don't know if their changes are closed or not, but Apple uses clang to cross compile to arm with their toolchain.

    2. Re:except that by Anonymous Coward · · Score: 1

      The gcc folks did a lot of improvements to their error messages in the 4.8 release.

    3. Re:except that by lordholm · · 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 automatically build clang for you. You then use cmake or autotools to configure, the first one is usually faster. GCC does take quite some time to build, but a lot of that time is spent in the configuration process which is slow as hell.

      Clang does support multiple targets out of the box, but it is not very easy to use (you need to pass a lot of different compiler switches to set the host triple, target cpu, system include directories et.c.). GCC on the other hand requires one installation per cross target and supports spec files that configures all these flags (e.g. system include directories) using the -B option.

      --
      "Civis Europaeus sum!"
    4. Re: except that by Anonymous Coward · · Score: 0

      ARM itself is actively supporting the ARM architectures and cross-compiling works nicely.

      Installing clang is quite trivial and well explained: http://clang.llvm.org/get_started.html

    5. Re:except that by 0ld_d0g · · Score: 1

      You couldn't be more wrong. Both llvm/clang and g++ are easy to compile on most unix-like systems. Neither is easier. For relative definitions of easy ofcource. We're not talking grandma-level-easy here :-P I maintain builds of both for my work - which I build from source every couple of months or so.

    6. Re:except that by TheRaven64 · · Score: 1

      clang++ is still using GNU libraries for C++ stuff.

      On FreeBSD, we are shipping libc++ and libcxxrt. Our C++11 stack does not use any of the GNU C++ code.

      clang is still a pain in the ass to compile, with unclear instructions,

      Really? Here's how you build llvm:

      $ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
      $ cd llvm/tools
      $ svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
      $ cd ../..
      $ mkdir Build
      $ cmake ..
      $ make -j32

      Optionally, add -G Ninja to the cmake line and then run ninja instead of make. This makes a huge difference to incremental builds, but only a small difference on clean builds.

      and a massive, huge compile time

      On my laptop, it takes about 10-15 minutes to do a clean build, on the 32-core machine I have in a rack for this kind of thing, it's about 2.

      gcc on the other hand is built by automated scripts quite frequently as part of, for example, cross-toolchain builds.

      You don't need to recompile clang as part of a cross-compile toolchain, it's a cross-compiler our of the box. Just add -target {target triple} to the command line, or create a {target triple}-clang symlink, and you've got a cross-compiler. In contrast, GCC uses compile-time specialisation to get the cross-compiler, so you must build it once for every target.

      but i have never seen a clang->arm cross chain.

      Then you have never looked at the iOS or Android SDKs, as both include clang (Android also includes GCC, iOS only supports clang).

      --
      I am TheRaven on Soylent News
    7. Re:except that by robi5 · · Score: 1

      CMake Error: The source directory "/home" does not appear to contain CMakeLists.txt.

    8. Re:except that by TheRaven64 · · Score: 1

      Ooops, missed cd Build from the instructions.

      --
      I am TheRaven on Soylent News
    9. Re:except that by maxwell+demon · · Score: 1

      So you need to have svn installed just to build clang? What happened to good old tar archives?

      Don't get me wrong, there's nothing wrong with svn if you want to develop the compiler (although I think distributed systems like mercurial or git would be better). But if all you want to do is to compile it from sources, you should not have to deal with version control.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    10. Re:except that by larry+bagina · · Score: 1

      You can find tar archives here

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    11. Re:except that by TheRaven64 · · Score: 1

      If all you want to do is build the latest release, you download the tarball. If all you want to do is use the latest release, you grab the binary. There are binaries for FreeBSD, OS X, Ubuntu and MinGW on the LLVM web site, and for a number of other systems in their respective repositories. Unlike gcc, you don't have to build it if you want a cross-compiler for some random architecture: every cross-compilation target that clang supports works with a single binary. This eliminates a significant fraction of the people who'd want to compile it themselves.

      --
      I am TheRaven on Soylent News
  21. boot straps itself with the system compiler by decora · · Score: 1

    i mean if you dont have a compiler on your system, how do you 'compile' c source code?

    1. Re:boot straps itself with the system compiler by rs79 · · Score: 2

      You find a compiler binary or cross-compile it on another system.

      --
      Need Mercedes parts ?
  22. Linux kernel is moving to C++ by csumpi · · Score: 1, Funny

    Linus seems rather impressed by the quality and performance of GCC 4.8.0. From google+:

    "All these years I might have been wrong about c++. I've decided to migrate the whole kernel to c++. Sorry to all the folks whom I called morons for not using c. From this point on only c++ patches will be accepted."

    1. Re:Linux kernel is moving to C++ by Anonymous Coward · · Score: 0

      Linus seems rather impressed by the quality and performance of GCC 4.8.0. From google+:

      "All these years I might have been wrong about c++. I've decided to migrate the whole kernel to c++. Sorry to all the folks whom I called morons for not using c. From this point on only c++ patches will be accepted."

      He accidentally posted his message 10 days early, that's all.

    2. Re:Linux kernel is moving to C++ by funkboy · · Score: 1

      but he's a week too early!

  23. Re:anyone even using GCC anymore? by Nivag064 · · Score: 1

    gcc is the standard compiler for Linux.

    It is the only compiler I've used on Linux.

  24. Re:anyone even using GCC anymore? by Anonymous Coward · · Score: 0

    Pretty much anyone using linux, or windows for that matter.. Mingw is quite popular for the latter, though obviously not as popular as visual studio.

    I've never seen an OS stagger a modern core2 cpu like osx, so I can't say much positive about anything apple's done with their compiler.

  25. Re:anyone even using GCC anymore? by guacamole · · Score: 1

    My understanding Microsoft now dropped ALL C support. It's now official.

  26. Re:Useless if it can't compile my HOSTS files by pescadero · · Score: 1

    Ha, it's the Time Cube rant with random phrases pasted in. I knew there was something familiar about it.

  27. As someone who has been using both for quite by Anonymous Coward · · Score: 0

    a while I have to ask if that's still true post 2.9

    3.0, 3.1 and 3.2 all appear to have made dramatic drops in performance compared to previous iterations, and the closer the compiler comes to supporting gcc/g++'s compilable base of applications the slower it appears to run.

    That may just be my experience, but it seems to hold true, especially against gcc 4.2 nevermind certain earlier versions (3.3.6 and 2.95.3, neither of which are really usable with a 'modern' toolchain, other than musl.)

    1. Re:As someone who has been using both for quite by TheRaven64 · · Score: 1

      Do you have some example applications where LLVM performance has reduced? We have a performance regression test suite, and it hasn't shown any regressions. In 3.3, we're enabling autovectorisation by default, and currently it's outperforming GCC 4.8 in LINPAC. In 3.2 and earlier, GCC and LLVM were within 10% of each other in most benchmarks, but GCC was a clear winner in cases where its autovectoriser ran in a performance critical segment.

      --
      I am TheRaven on Soylent News
    2. Re:As someone who has been using both for quite by maxwell+demon · · Score: 1

      I think you and the AC you answered to are talking about different performances. You are obviously talking about the performance of the generated code, while I think the AC talks about the performance of the compiler (that is, the time it takes to compile your code).

      --
      The Tao of math: The numbers you can count are not the real numbers.
    3. Re:As someone who has been using both for quite by TheRaven64 · · Score: 1

      In that case, he's just plain wrong. I have two build directories where I compile LLVM itself (a large C++ codebase) with g++ and with clang++. Compiling with clang++ is at least 20% faster. It's a sufficient difference that you can tell which is running just by watching the speed of the build system output.

      --
      I am TheRaven on Soylent News
    4. Re:As someone who has been using both for quite by maxwell+demon · · Score: 1

      What he said is not that LLVM is slower than gcc (although he clearly wanted to hint in that direction), but that there was a dramatic drop of performance in the latest versions of LLVM compared to previous ones.

      Disclaimer: I have no idea about whether the claim is true or not. I just notice a discrepancy between the claim of the AC and your refutation of a different claim.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  28. Re:anyone even using GCC anymore? by kthreadd · · Score: 1

    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.

  29. Re:GPLv3 .... by kthreadd · · Score: 3, 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

  30. Re:GNU just lost a customer by kthreadd · · Score: 1

    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?

  31. No more articles on C++, please! by Anonymous Coward · · Score: 1

    Ever since the hyped introduction of java, the C++ neighborhood has been nice and orderly. The streets are clean, the trash is picked up, everything works. No marauding gangs of script-kiddies to stink up the native code neighborhood, because the eye of Sauron is busy with the latest interpreted language-of-the-day. We like our cul-de-sac, and want to keep it that way.

  32. Re:anyone even using GCC anymore? by Zontar+The+Mindless · · Score: 1

    ICC isn't bad. It's not open source, but you can obtain it gratis for non-commercial use.

    --
    Il n'y a pas de Planet B.
  33. Re:anyone even using GCC anymore? by Anonymous Coward · · Score: 0

    Do they use those compilers to build the Linux kernel? The point is Linux is relevant. Linux (kernel) is almost always compiled with GCC. Ergo GCC is almost as relevant as Linux.

    Anyone know of any distributions using something other than GCC to compile the kernel? Anyone know of any Android or Android like platforms that use something other than GCC to compile the kernel?

    Like it or not, GCC is still being used on a very large scale. More so than any other compiler in existence.

  34. well of course by decora · · Score: 1

    how stupid of me. i was going on personal experience having spent 15+ hours compiling clang on 3 different architectures. now, while i personally think that what i experienced was valid, and that my estimation of it as being difficult, having been compiling gcc since around 1997, is probably somewhat accurate, you obviously know me better than i know myself. you also can somehow intuit my true experiences which have somehow obviously been scrambled in my brain. when i thought to myself over and over 'oh, is that for 3.0 or... and where exactly is the binary', that was actually a fun sort of adventure, that was actually very easy, and that somehow it was MY fault for interpreting these things wrong. and for going to clang.org wrong. and for reading the official instructions wrong. and for reading bug reports filed by many, many other people - i mean, what do they know? after all, they are not you. . . you who can see into peoples true experiences, and understand that what they thought of as 'difficult' was simply a lie, caused by their own incompetence if nothing else!!!! yes. you, truly, are the savior of clang. thank god you are here on the internet to set poor fools like me correct. poor stupid muzhiks that we are, we need your guidance, we need your holy word, we need your very soul to correct the wrongs of history!

    1. Re:well of course by sydneyfong · · Score: 1

      i mean, what do they know? after all, they are not you. . . you who can see into peoples true experiences, and understand that what they thought of as 'easy' was simply a lie, caused by their own competence if nothing else!!!! yes. you, truly, are the bane of clang. thank god you are here on the internet to set poor fools like me correct. poor stupid muzhiks that we are, we need your guidance, we need your holy word, we need your very soul to correct the wrongs of history!

      --
      Don't quote me on this.
    2. Re:well of course by 0ld_d0g · · Score: 1

      Wow. Are you high by any chance? I wasn't commenting on your entire life experience.

      I don't know what ancient processor you're using that requires 15 hours of compiling. Even if I generously consider that sum to be the total for 5 architectures. Any modern $100 cpu can build either one in less than an hour. And if you have an SSD as you probably should - if this is your professional work and not a hobby - that time can be cut by quite a large amount. Anyway.. good luck with your 15 hour compilation marathons.

  35. uhmmm ok... by decora · · Score: 1

    and what is your point?

  36. there was no cd build in the instructions by decora · · Score: 1

    but hey, lets not bicker and argue about whose script doesnt actually fucking work and whose does

  37. Several superior substitutes serve systematically by stoploss · · Score: 2

    The problem with that approach is that you lose an important idiom that doesn't have a good substitute.

    The idiom has already been lost, if only because communication is fundamentally about conveying concepts among those involved in discourse. The term "begs the question" at best is ambiguous now, but truly the original definition has been supplanted in common usage. Thus, using the idiom increases confusion in discourse (which is considered harmful).

    Besides, "begs the question" (original idiom) doesn't mesh with the common usage of the word "beg" anymore, unlike how the "begs the question" (modern idiom) does. I argue that it was a poor choice of term in the first place.

    Better to start promulgating the Latin term "petitio principii" for the fallacy, which should remain unambiguous forever. Or try "presumes the argument" or "presumes the point" instead, both of which are self-explanatory and are unlikely to become obsolete. Hell, the latter form has the same syllable count as "begs the question".

  38. Re:GNU just lost a customer by Anonymous Coward · · Score: 0

    It is akin to killing a fly with a tank cannon. Some people just want a flyswatter.