Hi, and thank you for your answer.
Is there an option to have LTO in the final GCC, but without using LTO in
compiling GCC itself?

On Sun, Sep 15, 2024 at 9:00 AM Richard Biener <richard.guent...@gmail.com>
wrote:

> On Sat, Sep 14, 2024 at 1:17 PM Ghorban M. Tavakoly via Gcc
> <gcc@gcc.gnu.org> 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 <gmt3...@gmail.com>
> > 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⁰)
> > >
> > >
>

Reply via email to