public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: Mohamed Atef <mohamedatef1698@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Compiling GCC source
Date: Sun, 06 Feb 2022 22:22:34 +0100	[thread overview]
Message-ID: <ri6k0e7u1ut.fsf@suse.cz> (raw)
In-Reply-To: <CAPFh8NLutn9Qz=xRJnF=-uVrB+ho48ZqU_g=+LO7XoQOG540Rg@mail.gmail.com>

Hello,

On Sun, Feb 06 2022, Mohamed Atef via Gcc wrote:
> Hello everyone,
>         I built gcc from the repo and it took around 2 hours but I am
> wondering should I wait two hours after every modification?
> Is there any way to recompile faster.
> That's very important as we will add some files and tests  for OMPD.

Of course it depends on the hardware that you use but generally no, it
should not take hours, certainly not to recompile after simple
modifications.

Above all, at configure time:

1) Make sure that you disable bootstrap by passing --disable-bootstrap

   If you make any modifications to the compiler, please make sure you
   test them with bootstrap enabled before you submit them upstream,
   though.

2) If you use x86_64, you can speed up compilation by disabling building
   of 32-bit libraries by using --disable-multilib.

3) Only select languages that you need.  For example, if you just need
   C, C++ and Fortran, use: --enable-languages=c,c++,fortran

   Again, the final test should cover every language you might have
   affected, but for OMPT the above could suffice.

And of course, pass an appropriate -j option to make.

This should help to significantly reduce build times for you.

Martin

      parent reply	other threads:[~2022-02-06 21:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-06 18:55 Mohamed Atef
2022-02-06 19:05 ` Mir Immad
2022-02-06 19:07   ` Mohamed Atef
2022-02-06 19:08     ` Mir Immad
2022-02-06 19:13       ` Mohamed Atef
2022-02-06 19:18         ` Mir Immad
2022-02-06 19:28           ` Mohamed Atef
2022-02-07  9:20         ` Richard Biener
2022-02-06 21:22 ` Martin Jambor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ri6k0e7u1ut.fsf@suse.cz \
    --to=mjambor@suse.cz \
    --cc=gcc@gcc.gnu.org \
    --cc=mohamedatef1698@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).