From patchwork Thu Mar 14 09:40:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Naumann X-Patchwork-Id: 1056420 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ultratronik.de Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44KkHR3ZNfz9s3q for ; Thu, 14 Mar 2019 20:41:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 93E3B87EB8; Thu, 14 Mar 2019 09:41:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UdWa1mBn+oO9; Thu, 14 Mar 2019 09:41:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 2072887FE8; Thu, 14 Mar 2019 09:41:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 9E5CE1BF30C for ; Thu, 14 Mar 2019 09:41:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9BF9587EB8 for ; Thu, 14 Mar 2019 09:41:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wnGw-vxv8-yn for ; Thu, 14 Mar 2019 09:40:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from dd5424.kasserver.com (dd5424.kasserver.com [85.13.138.252]) by hemlock.osuosl.org (Postfix) with ESMTPS id C441287EA7 for ; Thu, 14 Mar 2019 09:40:58 +0000 (UTC) Received: from wslxew902.fritz.box (ipb21bb577.dynamic.kabel-deutschland.de [178.27.181.119]) by dd5424.kasserver.com (Postfix) with ESMTPA id AD5DDB58530B; Thu, 14 Mar 2019 10:40:56 +0100 (CET) From: Andreas Naumann To: buildroot@buildroot.org Date: Thu, 14 Mar 2019 10:40:18 +0100 Message-Id: <20190314094024.1961-8-anaumann@ultratronik.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190314094024.1961-1-anaumann@ultratronik.de> References: <20190314094024.1961-1-anaumann@ultratronik.de> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 07/13] Makefile: allow top-level parallel build with BR2_PER_PACKAGE_DIRECTORIES=y X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: dev@andin.de Cc: Andreas Naumann , Peter Seiderer , =?utf-8?q?Ga=C3=ABl_Portay?= , thomas.petazzoni@bootlin.com Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas Petazzoni With per-package folder support, top-level parallel build becomes safe, so we can enclose the .NOTPARALLEL statement in a !BR2_PER_PACKAGE_DIRECTORIES condition. Signed-off-by: Thomas Petazzoni Signed-off-by: Andreas Naumann --- Makefile | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 58282dc098..4bbc3e5be9 100644 --- a/Makefile +++ b/Makefile @@ -228,21 +228,12 @@ ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) -include $(BR2_CONFIG) endif -# Parallel execution of this Makefile is disabled because it changes -# the packages building order, that can be a problem for two reasons: -# - If a package has an unspecified optional dependency and that -# dependency is present when the package is built, it is used, -# otherwise it isn't (but compilation happily proceeds) so the end -# result will differ if the order is swapped due to parallel -# building. -# - Also changing the building order can be a problem if two packages -# manipulate the same file in the target directory. -# -# Taking into account the above considerations, if you still want to execute -# this top-level Makefile in parallel comment the ".NOTPARALLEL" line and -# use the -j option when building, e.g: -# make -j$((`getconf _NPROCESSORS_ONLN`+1)) +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),) +# Disable top-level parallel build if per-package directories is not +# used. Indeed, per-package directories is necessary to guarantee +# determinism and reproducibility with top-level parallel build. .NOTPARALLEL: +endif # timezone and locale may affect build output ifeq ($(BR2_REPRODUCIBLE),y)