Thread: GCC 4.4.0 released!

  1. #1
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229

    GCC 4.4.0 released!

    GCC, the GNU Compiler Collection - GNU Project - Free Software Foundation (FSF)

    Current release series: GCC 4.4.0
    Status: 2009-03-13 (regression fixes and docs only).
    Serious regressions. All regressions.
    Previous release series: GCC 4.3.3
    Status: 2009-01-24 (regression fixes and docs only).
    Serious regressions. All regressions.
    Active development: GCC 4.5.0 (changes)
    Status: Stage 1, open for development.
    Serious regressions. All regressions.
    I will try building a MinGW distribution some time later (and possibly x86-64 cross-compiler, too).

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Now if only the GNU ld guys would get on the ball and fix the core dump I've been seeing for three years...
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  3. #3
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Hmm for some reason 4.4.0 is not up on the GNU FTP and mirrors yet. Guess we still have to wait a bit, or SVN it.

  4. #4
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    So what's new in 4.4?
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  5. #5
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    GCC 4.4 Release Series — Changes, New Features, and Fixes - GNU Project - Free Software Foundation (FSF)

    Mostly optimizations from what I heard, with a new register allocator (IRA).

    And more C++0x stuff of course (including <thread>!).

  6. #6
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    yeah, no direct download though, which is one thign that always ........es me off about open source, as if everyone is going to go through the trouble of setting up an SVN directory for every project they download. I mean for sciences sake, at least rar the ........ers up and give people a direct link, not a link to a mirror that doesnt respond.

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by abachler
    yeah, no direct download though, which is one thign that always ........es me off about open source, as if everyone is going to go through the trouble of setting up an SVN directory for every project they download.
    The keyword is "yet". If you are going to hack on the code or use the bleeding edge, then yes, you should go through the trouble of downloading the version control repository for the project (unless the project also provides nightly snapshots to download or something). Otherwise, wait for the release to be properly available.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    I keep trying to build this under cygwin and then mfpr fails damnit

  9. #9
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    I will try it with MSYS tonight.

  10. #10
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    i have it compiling because i couldn't find any binary distribution for cygwin. there's a binary distribution for mingw and msys though TDM's GCC/mingw32 Builds

    i've had it compiling for like 10 hours now @_@

  11. #11
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Hmm my computer decided to die on me tonight, so no building GCC for me . Building all that stuff on my 12" AMD tablet that doesn't need any help to overheat is probably not a good idea.

    I don't think it took that long when I last tried it, though. More like 30 mins - 1 hr (on my Core 2). Maybe it's Cygwin. Apparently Cygwin has a very slow implementation of fork(), so configure scripts all run forever. Not sure if make is affected by that, too.

  12. #12
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Done!

    MSYS version, no cygwin requirement.

    Code:
    C:\Documents and Settings\Administrator\My Documents>gcc -v
    Using built-in specs.
    Target: i686-pc-mingw32
    Configured with: ../configure --enable-languages=c,c++ --target=i686-pc-mingw32
    --prefix=/mingw32 --with-sysroot=/mingw32 --disable-shared --disable-nls
    Thread model: win32
    gcc version 4.4.0 20090404 (prerelease) (GCC)
    Built on a new 64-bit XP virtual machine (since I'm going to build the mingw-w64 cross compiler next, and presumably want to test it).

    Took me a whole afternoon + night hunting for the bits and pieces, compiling, troubleshooting, etc. GCC itself took about 2 hours to compile.

    This version uses the CRT and headers from the mingw-w64 project (NOT the original mingw). It seems to be better maintained, and more feature-rich, and supports 64-bit (as well as 32-bit). No multilib for now, though (-m32/-m64).

    I only tested it briefly, and it seems to work (-std=gnu++0x is too nice ). Didn't test any Windows API code, though, since I don't have any...

    If anyone wants to try it out -
    http://cyberfish.wecheer.com/mingw32.7z (~27MB, decompresses to 250MB)

    how I compiled everything (I'm really inexperienced at this... anyone see anything wrong?)
    CFLAGS="-pipe -O2 -mms-bitfields -march=i686"
    SourceForge.net Repository - [mingw-w64] View of /trunk/mingw-w64-doc/howto-build/mingw-w64-howto-build.txt

    binutils 2.19
    mkdir build-32
    cd build-32
    ../configure --target=i686-pc-mingw32 --prefix=/mingw32 --with-sysroot=/mingw32 --disable-nls --disable-shared
    csmake -j 2
    csmake install

    GMP 4.2.4 (Nabble - MinGW - User - help to compile gmp-4.2.2 fixes the Makefile)
    mkdir build-32
    cd build-32
    ABI=32 ../configure --prefix=/mingw --disable-shared
    csmake -j 2
    csmake check #all tests passed
    csmake install

    mpfr 2.4.1
    mkdir build-32
    cd build-32
    ../configure --prefix=/mingw --disable-shared
    csmake -j 2
    csmake install

    gcc 4.4 SVN branch (checked out Apr 4, 2009)
    mkdir build-32
    cd build-32
    ../configure --enable-languages=c,c++ --target=i686-pc-mingw32 --prefix=/mingw32 --with-sysroot=/mingw32 --disable-shared --disable-nls
    csmake -j 2 all-gcc
    csmake install-gcc

    mingw-w64-crt
    export PATH=$PATH:/mingw32/bin
    mkdir build-32
    cd build-32
    ../configure --host=i686-pc-mingw32 --enable-lib32 --disable-lib64 --prefix=/mingw32 --with-sysroot=/mingw32
    csmake -j 2
    csmake install

    rest of GCC
    rm -rf /mingw32/mingw
    cp -r /mingw32/i686-pc-mingw32 /mingw32/mingw
    cd build-32
    csmake -j 2
    csmake install
    Last edited by cyberfish; 04-06-2009 at 02:33 AM.

  13. #13
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    For my chess program, GCC 4.4 (on Linux) doesn't make it measurably faster than with GCC 4.3, but "-O3" compilation time is about 30% longer.

    cyberfish@cyberfish-desktop:/data/cpp/Brainless$ time g++ -march=native -g -O3 -Wall Brainless.cpp -o bin/Release/Brainless -lboost_thread

    real 0m6.711s
    user 0m5.616s
    sys 0m0.348s
    cyberfish@cyberfish-desktop:/data/cpp/Brainless$ time g++-4.4 -march=native -g -O3 -Wall Brainless.cpp -o bin/Release/Brainless -lboost_thread

    real 0m8.929s
    user 0m8.569s
    sys 0m0.172s
    cyberfish@cyberfish-desktop:/data/cpp/Brainless$ time g++-4.4 -march=native -g -O0 -Wall Brainless.cpp -o bin/Release/Brainless -lboost_thread

    real 0m3.502s
    user 0m2.904s
    sys 0m0.200s
    At least I can switch to std::thread from boost::thread now .

  14. #14
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by cyberfish View Post
    For my chess program, GCC 4.4 (on Linux) doesn't make it measurably faster than with GCC 4.3, but "-O3" compilation time is about 30% longer.
    But did you build GCC the same way the older one was built?
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  15. #15
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Hmm good point.

    I didn't.

    4.3 is from Ubuntu APT. I only built 4.4 myself.

    And I just realized I actually checked out trunk (4.5.0) instead of 4.4 release branch. Not sure what difference that makes, since it was just branched a few days ago. I am checking out 4.4 branch now.

    GCC trunk was built with -O2, though, and I suspect the Ubuntu people build with -O2, too.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Visual Studio Express / Windows SDK?
    By cyberfish in forum C++ Programming
    Replies: 23
    Last Post: 01-22-2009, 02:13 AM
  2. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  3. Replies: 4
    Last Post: 09-02-2007, 08:47 PM
  4. Compiles on gcc 3.3 but not on gcc 4.0.3
    By cunnus88 in forum C++ Programming
    Replies: 5
    Last Post: 03-29-2007, 12:24 PM
  5. gcc
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 10-22-2003, 03:46 PM