LTO progress indicator
I build GCC from git repo regularly. Unfortunately my system is old and a full GCC build takes about 30 hours. I learnt that the maximum build time spent is in LTO. I wrote a simple shell script to check LTO progress: #!/bin/sh AWKP=' BEGIN { RS=" " ; w = COLS - 19 } END { progressbar(current, total) } /ltrans.o/ { current++ } /ltrans[0-9]+.o/ { total++ } function progressbar(current, total) { if (total == 0) { printf(" %s Waiting!\r", substr("|/-\\", 1 + systime() % 4, 1)) return } progress = current / total prefix = sprintf(" %d/%d [", current, total) suffix = sprintf("] %.1f%%", 100 * progress) width = COLS - length(prefix) - length(suffix) bar = "" for (col = 0; col < width; col++) bar = bar (col / width < progress ? "=" : " ") printf("%s%s%s\r", prefix, bar, suffix) }' while [ 1 ] ; do echo $(ls /tmp/*ltrans* 2> /dev/null) | gawk -v COLS=`tput cols` "$AWKP" sleep 1 done Is there any change to have some LTO progress indicator information in upstream GCC output? Do I need to report a bug? I need LTO. Is there a way to have LTO in GCC, without LTOing the GCC itself? This way my builds will be many times faster. Regards and thanks to your awesome compilers -- *Ghorban M. Tavakoly* Phone number: +98 (902) (2²⁰+2¹⁹+2¹⁸+…+2²+2¹+2⁰)
Re: LTO progress indicator
>> Is there any change to have some LTO progress indicator information in upstream GCC output? Do I need to report a bug? Is there any chance ... (sorry for typo) On Sat, Sep 14, 2024 at 2:41 PM Ghorban M. Tavakoly wrote: > I build GCC from git repo regularly. Unfortunately my system is old and a > full GCC build takes about 30 hours. I learnt that the maximum build time > spent is in LTO. I wrote a simple shell script to check LTO progress: > > #!/bin/sh > > AWKP=' > BEGIN { RS=" " ; w = COLS - 19 } > END { progressbar(current, total) } > > /ltrans.o/ { current++ } > /ltrans[0-9]+.o/ { total++ } > > function progressbar(current, total) { > if (total == 0) { > printf(" %s Waiting!\r", substr("|/-\\", 1 + systime() % 4, 1)) > return > } > progress = current / total > prefix = sprintf(" %d/%d [", current, total) > suffix = sprintf("] %.1f%%", 100 * progress) > width = COLS - length(prefix) - length(suffix) > bar = "" > for (col = 0; col < width; col++) > bar = bar (col / width < progress ? "=" : " ") > printf("%s%s%s\r", prefix, bar, suffix) > }' > > while [ 1 ] ; do > echo $(ls /tmp/*ltrans* 2> /dev/null) | gawk -v COLS=`tput cols` > "$AWKP" > sleep 1 > done > > Is there any change to have some LTO progress indicator information in > upstream GCC output? Do I need to report a bug? > > I need LTO. Is there a way to have LTO in GCC, without LTOing the GCC > itself? This way my builds will be many times faster. > > Regards and thanks to your awesome compilers > > -- > *Ghorban M. Tavakoly* > Phone number: +98 (902) (2²⁰+2¹⁹+2¹⁸+…+2²+2¹+2⁰) > >
Update bootstrap requirement to C++14?
We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after support was stable in GCC 4.8. It is now 8 years since C++14 was the default mode in GCC 6 (and 9 years since support was complete in GCC 5); perhaps it's time to update? IIRC I've previously suggested this in response to a couple of different patches that could have been simplified in C++14, but am failing to find those messages now. Jason
Re: Update bootstrap requirement to C++14?
On Sat, Sep 14, 2024 at 8:53 AM Jason Merrill via Gcc wrote: > > We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after > support was stable in GCC 4.8. > > It is now 8 years since C++14 was the default mode in GCC 6 (and 9 years > since support was complete in GCC 5); perhaps it's time to update? > > IIRC I've previously suggested this in response to a couple of different > patches that could have been simplified in C++14, but am failing to find > those messages now. I think C++14 is a good idea. The biggest cleanup area that might/will happen is in use of constexpr. Since constexpr functions with C++11 limited what could be done. I know we have mentioned this before but I can't find it either. I see the functions/methods in bbitmap.h definitely could be improved with going to C++14. Thanks, Andrew > > Jason
Re: Update bootstrap requirement to C++14?
On Sat, Sep 14, 2024, 11:37 AM Andrew Pinski via Gcc wrote: > On Sat, Sep 14, 2024 at 8:53 AM Jason Merrill via Gcc > wrote: > > > > We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after > > support was stable in GCC 4.8. > > > > It is now 8 years since C++14 was the default mode in GCC 6 (and 9 years > > since support was complete in GCC 5); perhaps it's time to update? > > > > IIRC I've previously suggested this in response to a couple of different > > patches that could have been simplified in C++14, but am failing to find > > those messages now. > > I think C++14 is a good idea. The biggest cleanup area that might/will > happen is in use of constexpr. Since constexpr functions with C++11 > limited what could be done. I know we have mentioned this before but I > can't find it either. > I think it's a win for GCC code but please document the minimum GCC version. When building RTEMS tools on older host OSes, I sometimes find myself having to guess what the best version to use is and how to step from say GCC 4 to it. Luckily CentOS 7 has the software collections to get newer Python and GCC, but it's harder on other hosts. > > I see the functions/methods in bbitmap.h definitely could be improved > with going to C++14. > > Thanks, > Andrew > > > > > > Jason > --joel >
gcc-14-20240914 is now available
Snapshot gcc-14-20240914 is now available on https://gcc.gnu.org/pub/gcc/snapshots/14-20240914/ and on various mirrors, see https://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 14 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch releases/gcc-14 revision 03b4c7599ed9c3056d9f76d89b1b59262107986f You'll find: gcc-14-20240914.tar.xz Complete GCC SHA256=2bf918c6fa9f1bf27481e1e0d6f5ab1fb2888e71c276f64011f245aa905adf4a SHA1=9a96f29fa28b0c6079e20ea05351476f62c77b7d Diffs from 14-20240907 are available in the diffs/ subdirectory. When a particular snapshot is ready for public consumption the LATEST-14 link is updated and a message is sent to the gcc list. Please do not use a snapshot before it has been announced that way.
Re: Update bootstrap requirement to C++14?
On Sat, Sep 14, 2024 at 11:53 AM Jason Merrill via Gcc wrote: > > We moved to a bootstrap requirement of C++11 in GCC 11, 8 years after > support was stable in GCC 4.8. > > It is now 8 years since C++14 was the default mode in GCC 6 (and 9 years > since support was complete in GCC 5); perhaps it's time to update? > Can we flip the switch from -Wno-narrowing to -Wnarrowing while at it, too? > IIRC I've previously suggested this in response to a couple of different > patches that could have been simplified in C++14, but am failing to find > those messages now. > > Jason
DEI statement and why we should have one
Listening to Nathan Sidwell's 2022 talk on Diversity and Inclusion, he mentioned we (GCC) should have a small statement about Diversity and Inclusion (I think equality should be mentioned too). I agree and I noticed there was no movement on this front and has been no mention of it since either. Maybe just a small statement like the following: ``` The GCC project strives to encourage diverse people to work on and with GCC. The GCC project strives to be inclusive of every kind of developer and user. The GCC project strives to push for equality for developers and users alike. The Code of Conduct (link) is there for when these breakdown. ``` Note I don't mind if wording gets changed or even this gets rejected but I feel like having this kind of statement even if it might seem hollow, it will have a positive impact. Note the statement about equality I have included might be overdoing it so removing it is ok too. Thanks, Andrew Pinski
Re: LTO progress indicator
On Sat, Sep 14, 2024 at 1:17 PM Ghorban M. Tavakoly via Gcc wrote: > > >> Is there any change to have some LTO progress indicator information in > upstream GCC output? Do I need to report a bug? > Is there any chance ... (sorry for typo) You can add -Q to the command line which makes GCC output some sort of progress indication. Otherwise no - we do not really know how long a compile will take so a true progress indicator isn't possible. RIchard. > On Sat, Sep 14, 2024 at 2:41 PM Ghorban M. Tavakoly > wrote: > > > I build GCC from git repo regularly. Unfortunately my system is old and a > > full GCC build takes about 30 hours. I learnt that the maximum build time > > spent is in LTO. I wrote a simple shell script to check LTO progress: > > > > #!/bin/sh > > > > AWKP=' > > BEGIN { RS=" " ; w = COLS - 19 } > > END { progressbar(current, total) } > > > > /ltrans.o/ { current++ } > > /ltrans[0-9]+.o/ { total++ } > > > > function progressbar(current, total) { > > if (total == 0) { > > printf(" %s Waiting!\r", substr("|/-\\", 1 + systime() % 4, 1)) > > return > > } > > progress = current / total > > prefix = sprintf(" %d/%d [", current, total) > > suffix = sprintf("] %.1f%%", 100 * progress) > > width = COLS - length(prefix) - length(suffix) > > bar = "" > > for (col = 0; col < width; col++) > > bar = bar (col / width < progress ? "=" : " ") > > printf("%s%s%s\r", prefix, bar, suffix) > > }' > > > > while [ 1 ] ; do > > echo $(ls /tmp/*ltrans* 2> /dev/null) | gawk -v COLS=`tput cols` > > "$AWKP" > > sleep 1 > > done > > > > Is there any change to have some LTO progress indicator information in > > upstream GCC output? Do I need to report a bug? > > > > I need LTO. Is there a way to have LTO in GCC, without LTOing the GCC > > itself? This way my builds will be many times faster. > > > > Regards and thanks to your awesome compilers > > > > -- > > *Ghorban M. Tavakoly* > > Phone number: +98 (902) (2²⁰+2¹⁹+2¹⁸+…+2²+2¹+2⁰) > > > >