From patchwork Mon Mar 18 22:03:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 228823 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id CE2822C00A3 for ; Tue, 19 Mar 2013 09:03:21 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1765EA01CF; Mon, 18 Mar 2013 22:03:21 +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 Zoyn2F1C9ZsF; Mon, 18 Mar 2013 22:03:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id BB431A0170; Mon, 18 Mar 2013 22:03:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 909B88F74B for ; Mon, 18 Mar 2013 22:03:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E4FE78CE71 for ; Mon, 18 Mar 2013 22:03:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gS+UAytNubNQ for ; Mon, 18 Mar 2013 22:03:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by whitealder.osuosl.org (Postfix) with ESMTPS id A03EF8CE65 for ; Mon, 18 Mar 2013 22:03:10 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id ds1so2911033wgb.0 for ; Mon, 18 Mar 2013 15:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer; bh=PDzv3CUr0Y9wTrMX7kTgedzv79qt6yWnpzsl5Wgr7uQ=; b=WewrfjM+H4hyxaDudNlzs71KSFx0g2mZNHqJ0Ws2cu3ozJOZGMZoPlsM2jEJtueW9a 4KWsBZ2Xpc81Pvb9u8WTGGXu34R6rNYnuVaYX5u/RHbuxpF6OevR5t7lA++0GoGD3tZJ xjKdw87hy9GKiyQ9mG5yYyoo0RZ8JQ0hbjvzrlKw/y9ZSQgDDUS3PhYGoZFc2Az//qaP KStpEKQnRT7rDxyWrKvrwQZs/drvMaKBkRJMELAQdhudSr0fJuio+8jMe52hxOAlAf/G wSrtoHJdSpo74wCrmWMD/jKQc23YTKqwSOt+1aDhGY2Uf5PfksRpAsdlebkpvUmJSCIv 2wjw== X-Received: by 10.194.120.169 with SMTP id ld9mr28236626wjb.24.1363644188830; Mon, 18 Mar 2013 15:03:08 -0700 (PDT) Received: from localhost.localdomain (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPS id r7sm17666059wiz.2.2013.03.18.15.03.06 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 18 Mar 2013 15:03:07 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Mon, 18 Mar 2013 23:03:03 +0100 Message-Id: <1363644183-29242-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH] toolchain/crosstool-NG: do not depend on the top-level Buildroot's .config X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Previously, the crosstool-NG backend did depend on the top-level Buildroot's .config to detect changes in the toolchain options, using a tentatively-clever heuristic, which also included the full Buildroot's version string to push down to set the components' versions strings. In doing so, any commit in the Buildroot tree would imply a complete rebuild of the toolchain, even in the case the toolchain options did not change, thus being a large annoyance (to say the least). As Buildroot never guaranteed that toolchain options would be detected, even less handled, and that the internal backend does neither detect nor act on toolchain options changes, and delegate that to the user, there is no point in individualising the crosstool-NG backend's behaviour. This reasoning also applies to the depdency on the crosstool-NG's bundled .config file, too. So, just drop the not-so-clever heuristic, and just build the toolchain once, leaving to the user the responsibility to explictly ask Buildroot to rebuild the toolchain. Reported-by: "Przemyslaw Wrzos" Signed-off-by: "Yann E. MORIN" Cc: "Przemyslaw Wrzos" Cc: Thomas Petazzoni --- Changes v1 -> v2: - properly use $(CTNG_CONFIG_FILE) (Przemyslaw) --- toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk index 6554982..59f18c7 100644 --- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk +++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk @@ -362,32 +362,28 @@ endef $(CTNG_DIR)/.config: | host-crosstool-ng # Default configuration -# Depends on top-level .config because it has options we have to shoe-horn -# into crosstool-NG's .config # Only copy the original .config file if we don't have one already. # Check that given config file matches selected C library. # We need to call oldconfig twice in a row to ensure the options # are correctly set ( eg. if an option is new, then the initial sed # can't do anything about it ) Ideally, this should go in oldconfig # itself, but it's much easier to handle here. - -$(CTNG_DIR)/.config: $(CTNG_CONFIG_FILE) $(BUILDROOT_CONFIG) +$(CTNG_DIR)/.config: $(Q)if [ ! -f $@ ]; then \ mkdir -p "$(CTNG_DIR)"; \ - libc="$$(awk -F '"' '$$1=="CT_LIBC=" { print $$2; }' "$<")"; \ + libc="$$(awk -F '"' '$$1=="CT_LIBC=" { print $$2; }' \ + "$(CTNG_CONFIG_FILE)" \ + )"; \ if [ "$${libc}" != "$(BR2_TOOLCHAIN_CTNG_LIBC)" ]; then \ - echo "* Inconsistency in crosstool-NG config file '$<'"; \ + echo "* Inconsistency in crosstool-NG config file '$(CTNG_CONFIG_FILE)'"; \ echo "* - buildroot configured for '$(BR2_TOOLCHAIN_CTNG_LIBC)'"; \ echo "* - given config file for '$${libc}'"; \ exit 1; \ fi; \ - cp -f $< $@; \ + cp -f $(CTNG_CONFIG_FILE) $@; \ fi - $(Q)cp -a $@ $@.timestamp $(call ctng-oldconfig,$@) $(call ctng-oldconfig,$@) - $(call ctng-check-config-changed,$@,$@.timestamp) - $(Q)rm -f $@.timestamp # Manual configuration ctng-menuconfig: $(CTNG_DIR)/.config