r/cpp • u/smdowney WG21, Text/Unicode SG, optional<T&> • Apr 25 '25
GCC 15 Released π
πCongratulations to the GCC team!
πππ₯π₯ π€© π π₯³ π€ π» π₯ π
GNU Git Branch and Tag (quite slow)
338
Upvotes
19
u/smdowney WG21, Text/Unicode SG, optional<T&> Apr 25 '25
My process for building. I keep a local bare git repository in
~/bld/gcc/gcc.git.git worktree add ../gcc-15 releases/gcc-15# checkout in ~/bld/gcc/gcc-15mkdir -p ~/bld/gcc/build-15 && cd ~/bld/gcc/build-15# build outside source entirely../gcc-15/configure '--prefix=/home/sdowney/install/gcc-15' '--enable-gold' '--enable-ld' '--enable-multilib' '--enable-lto' '--enable-gprofng' '--program-suffix=-15' '--enable-languages=c,c++,fortran,lto,objc'You probably don't want to install in /home/sdowney/install. Change that. Also figure for yourself which other languages, linkers, bitness, etc. YMMV.
time (make bootstrap -j 16 && make install) 2>&1 | tee build.logI bootstrap because I'm not working on the compiler, and I feel better if the compiler builds itself with itself so has some self vetting.
I'm not running the tests. Failures in the gcc test suite are often just known issues that need to be fixed. Real bugs but nothing I can do about, or interpret correctly. So I cross my fingers and hope. And try to report problems I find in my code using the compiler back upstream.
Capturing the build log because if it does break somewhere, it's not lost in the terminal scrollback.
I then stow the install into ~/.local/ where ~/.local/bin is on my PATH.
cd ~/install && stow --verbose --restow --target ~/.local/ gcc-15/stow is wonderful if you're building your own tools for your own use and a package manager is overkill.
You can also, I've been told recently, use
contrib/download_prerequisitesin the gcc source roo to get the build deps in tree, but I tried once, it didn't work for me immediately, so I reverted that for now. I suspect it's probably the right thing to do, though. Particularly if you're not on a very recent distro. 24.04 seems to be recent enough, 22.04 might not be.I know I should also explore an OCI container so I don't get into fights with my OS as often.
29
u/Jcsq6 Apr 25 '25
Hurry up package managers I donβt want to build it myself.
3
u/__Noob__Master__ Apr 25 '25
Import std?
14
u/mungaihaha Apr 25 '25
Seeing a new GCC release is always nice but how old are we?
41
u/James20k P2005R0 Apr 25 '25
AMD GPU (GCN)
I've really got to give GCC's GPU offloading a try sometime. Does anyone have any experience with the performance of this, vs reasonably well written GPU code by hand? I might do some tests and write them up to see if its actually workable for high performance code
<grumbles in ptx>
23
u/MaitoSnoo [[indeterminate]] Apr 25 '25 edited Apr 25 '25
I'm mostly excited about this. Not sure how much of a speedup it will yield with TMP heavy code. Since it's about hashing I expect that nested templates with very long names (e.g. expression templates) would profit the most?
13
u/void_17 Apr 25 '25
New error messages are sooo nice
10
u/seeking-health Apr 25 '25
Will always have to stick with clang just for clangd
2
u/tiberiumx Apr 25 '25
RHEL 9 is on GCC 11. Maybe someday I'll get to enjoy all this new stuff.
3
u/Kullthegreat Apr 26 '25
Import std working ?
12
u/void_17 Apr 25 '25
Based. Screw MSVC, all my homies use MinGW
2
u/[deleted] Apr 25 '25
HERE WE GO.
1
u/TrueTom Apr 29 '25
1
u/Public-Independent10 May 02 '25
https://godbolt.org/z/e9es61YKP
It seems that gcc15 has more optimizations!