From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 202AA3858D3C for ; Sun, 6 Feb 2022 21:22:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 202AA3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id C2D25210E5; Sun, 6 Feb 2022 21:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1644182557; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6g7oIzihVxC0EZwM4zlWqLMUKM7GJVbWFz0TV6cPt8Q=; b=RcecqXTqi5Eb/lA2pQG+vg/jIgeaOgvUy8vi5TO7/aRYxKqgBbwrrLZVOrGWISP7ui9MK+ 3uhujkFfNs4SVEsyh602R2HYYgytsFoWbqco3D1Ou4LcPa84g/eEQd/ofFV+xpW5o2wgVf CYzSaycxgjVePXj1x86aVej1d+guM6A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1644182557; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6g7oIzihVxC0EZwM4zlWqLMUKM7GJVbWFz0TV6cPt8Q=; b=z8zjB0YNQ2jHsGg9bCD1c9YPwsUmNd0ZM78Wqdhdwj3YL74r3M5fMFMKSWDio81kQcwue0 wxMKoNIrxNyHiZDQ== Received: from suse.cz (unknown [10.100.200.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 9B7C5A3B81; Sun, 6 Feb 2022 21:22:37 +0000 (UTC) From: Martin Jambor To: Mohamed Atef Cc: gcc@gcc.gnu.org Subject: Re: Compiling GCC source In-Reply-To: References: User-Agent: Notmuch/0.34.1 (https://notmuchmail.org) Emacs/27.2 (x86_64-suse-linux-gnu) Date: Sun, 06 Feb 2022 22:22:34 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2022 21:22:40 -0000 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