Slashdot Mirror


GCC 5.2 Released

AmiMoJo writes: The release of GCC 5.2 brings lots of bug fixes and a number of new features. The change list is extensive, featuring improvements to the C compiler, support for new languages like OpenACC, improvements for embedded systems, updates to the standard library and more.

11 of 91 comments (clear)

  1. 5.2 by Anonymous Coward · · Score: 5, Informative

    All of those new features were in 5.1. 5.2 is just a few bug fixes.

  2. Good day by BradleyUffner · · Score: 1, Informative

    It's a good day to be a developer apparently, as Visual Studio 2015 was also released today.

    1. Re:Good day by UnknownSoldier · · Score: 2, Informative

      Ugh. Visual Studio 2015 requires Windows 8.1. No thanks.

      * https://www.visualstudio.com/e...

      Here is the list of bugs fixed in

      * GCC 5.2 compiler issues
      * MSVC 2015 compiler issues

      Additional MSVC 2015 bug fixes ...

      * MSVC 2015 Features
      * MSVC 2015 (C++11/14/17)
      * MSVC 2015 STL part 1
      * MSVC 2015 STL part 2

    2. Re:Good day by Bengie · · Score: 4, Informative

      Visual Studio 2015 development environment supports https://www.visualstudio.com/v...

      Windows 7 Service Pack 1
      Windows 8.1
      Windows 8
      Windows Server 2008 R2 SP1
      Windows Server 2012
      Windows Server 2012 R2
      Windows 10

      But can compile for a target as old as WinXP.

  3. Changed version numbering scheme by Anonymous Coward · · Score: 2, Informative

    This is just a bugfix release. With the old (GCC 4) versioning scheme this would've been called 5.0.1.

  4. Try Stack Overflow and --synclines by tepples · · Score: 4, Informative

    Perhaps you could demonstrate the difficulty of building a cross-GCC by phrasing your rant in the form of a good Stack Overflow question. Explain what you are trying to do, what web search queries you used, what you tried, what you expected, and what each failure looked like. If they are in fact "beginner problems", getting the question onto SO should eventually help future web searchers find the answer more easily. Or if Stack Overflow scares you, you might try looking at how it was done in devkitARM.

    For line numbers in an M4 script, have you tried adding --synclines ?

    If error messages from some compiler or interpreter are unhelpful, have you tried filing bugs against said compiler or interpreter to improve the usefulness of its error messages?

    1. Re: Try Stack Overflow and --synclines by rl117 · · Score: 4, Informative

      You can think of CMake as autoheader, autoconf, automake and libtool rolled up into one tool. It's a scripting language which is evaluated, the end products being generated files of any type you like, plus the files for a specified build system, typically Makefiles on UNIX, but could be many other types. It's a superset of the functionality of the autotools, and is vastly more maintainable and flexible, not to mention portable to non-POSIX platforms. It's not the nicest language I've encountered, but it's certainly better than the multi-language mess of m4/shell/templates we live with in the Autoconf world.

      You can do all the feature testing with CMake that you can with Autoconf. For example, in place of AC_TRY_COMPILE, you use CHECK_C_SOURCE_COMPILES, or the equivalent in another language. There are variants for all sorts of other feature tests and checks, same as with Autoconf. But in general, I think it solves current portability problems somewhat better and more portably that the Autotools, which seem to still be stuck in the 90s in terms of the problems they try to solve. Example: portably enabling threading.

      When creating custom headers for macros from the feature test results, in place of AC_CONFIG_HEADER you would use configure_file, which does exactly the same thing using CMake variables.

      After 15 years of autotools usage, I converted my most important projects to CMake around 22 months ago, and haven't looked back. Most recently, I did conversions from autotools for bzip2 and libtiff. In both cases, the conversion is pretty much a 1:1 change from Autoconf macro or Automake variable to the corresponding CMake macro/function/variable.

      Regards,
      Roger

  5. Re:I hope they fixed the size issue. by tepples · · Score: 4, Informative

    A compiler for embedded systems needs to understand and use a smaller foot print. Current version cannot run in less than 128MB of memory.

    I think the idea is that even if you're targeting an embedded system, you're still hosting the compiler on something with a keyboard big enough to comfortably edit code, such as a server, desktop PC, or laptop PC. Even dinky little Atom-powered tablets come with 2 GB of RAM nowadays.

    But there's a different size issue: footprint of the GNU implementation of the C++ standard library when it is statically linked. Years ago, I used devkitARM, a distribution of GCC targeting the Game Boy Advance, a platform with 256 KiB* of main RAM, 32 KiB of tightly coupled fast RAM generally used for the stack and certain inner loops, and 96 KiB of video memory. (It also had up to 32 MiB of cartridge ROM, but not if receiving the program from a GameCube or from the first player in a multiplayer network.) I compiled C++ "hello world" programs using the static Newlib and libstdc++ that shipped with devkitARM. A hello world program using <cstdio> was less than 16 KiB, including the statically linked terminal. So as long as I stuck to C libraries, I was fine. But a similar program using <iostream> produced an 180,032 byte executable, even after turning on relatively aggressive options to remove dead code. That left less than one-third of main RAM free for actual program code and data. I debugged into it, and the culprit turned out to be "locale" stuff (date, time, and currency formatting) that got initialized on std::cout even if the program never printed any date, time, or currency types.

    * That's 262,144 bytes, about a quarter of a megabyte, or about a four-thousandth of a gigabyte.

  6. Re:People still use GCC? by fahrbot-bot · · Score: 3, Informative

    You are a complete moron for using OpenMP.

    That was very helpful; full of thoughtful reasoning and examples. The level of detail in explaining the rational to avoid OpenMP was, to say the least, above and beyond. You sir or madam have made us proud. Well done.

    --
    It must have been something you assimilated. . . .
  7. Re:autotools is no fun by phantomfive · · Score: 4, Informative

    Building things that will compile on (or in your case, for) completely different systems is not a trivial problem. You have to deal with completely different library formats (sometimes even on the same system, as is the case with Windows), name mangling conventions, as you mentioned MMUs, completely different processors.....figuring out all the places your program needs to be flexible is not an easy thing. There are so many places you need to be flexible.

    Autotools has the same problem. Each system it targets has its own weird idiosyncrasies. Autotools has grown up over time to handle all those idiosyncrasies, as people had them.

    Are autotools perfect? No, they are kind of weird. And moreover, when people write build scripts, they often write the most hacky code (which is the problem Maven's strictness is designed to solve). Some codebases are so poorly written, that to get them to cross-compile, you need to modify the source itself. That has nothing to do with the build system, it's because of a lousy programmer.

    However, for all it's annoyances, there's just no other system that has the same flexibility in configuring a codebase to run on weird systems as autotools. They have all the features, the only weirdness is the strange syntax. (As an aside, I've never used a macro system that had easy-to-remember commands. I don't know if this is a problem with macro systems in general, or just a problem with the ones I've used, or just a problem with my memory).

    --
    "First they came for the slanderers and i said nothing."
  8. Re:People still use GCC? by Forever+Wondering · · Score: 5, Informative

    I'm not the AC, but I'll try to share the knowledge.

    I'm a kernel programmer and worked on a Linux based realtime highdef broadcast quality H.264 video encoder that used a hybrid mix of multiple cores and FPGAs, so I'm fairly familiar with at least one use case.

    openMP has uses for parallelizing workloads via pragmas in the compiler code. That is, take an app that is designed for a single CPU, add some pragmas and some openMP calls and let the compiler parallelize it. It does this [mostly] by paralleling loops that it finds.

    Parallelizing [simple] loops can be done in [at least] two ways:
    (1) A single loop can be parallelized across multiple cores
    (2) If a function does loop A followed by loop B and loop A and B share no data, they can be done in parallel.

    openMP assumes a shared memory architecture (e.g. all cores are on the same motherboard). Contrast this to MPI that can go "off board" [via a network link]. There are hybrid implementations that use both in a complementary fashion.

    A good use case for this is weather prediction/simulation which is highly compute intensive but doesn't have realtime requirements. We just want our final answer ASAP, but what the program does moment-to-moment doesn't matter. Another use case is protein folding.

    But, neither openMP nor MPI is well suited to a realtime situation that requires precise control over latency. Also, openMP doesn't support compare-and-swap. And, it's prone to race conditions.

    Ideally, designing a given app from the ground up for parallelism is a better choice. If one does that, the fanciness of openMP isn't required. My last implementation of an openMP equivalent [that also incorporated what MPI does] was ~1000 lines of code because the app was pre-split into threads set up in a pipeline. It supported a multi-master, distributed, map/reduce equivalent using worker threads [still within 1000 lines].

    Consider the second loop parallelization case. It's easy enough for a programmer to see that loop A and loop B are disjoint and put them in separate threads (e.g. A and B). But, if one is aware of this, the splitup can be done even if loop A and B share some data because one can control the synchronization between threads precisely. Extend this to 40-50 threads that have a more complex dependency graph.

    Note that latency means that a given thread A will deliver its results to thread B in a finite/precise/predictable/repeatable amount of time. In video processing, each stage must finish processing within a the allotted for a video frame [usually 1/30th of a second]. With extra buffering, that can be relaxed a bit, but the average must be 1/30th and can't vary too widely (e.g. no frame could take [say] 1/2 second).

    Thus, the AC, although snide, is partially right. If I were doing an implementation, I believe the result would be better not using openMP. But, I've got 40+ years doing realtime systems. Not everybody does. Most consumers of openMP [and/or MPI] are usually scientists/researchers who are [no doubt] experts in their field, but they're usually not expert level programmers. And, they usually don't have the restrictions imposed by a realtime system. Notable exceptions: programming for MRI/PET/etc machines.

    --
    Like a good neighbor, fsck is there ...