linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH 2/2] compat: explicitly export generated variables
Date: Fri, 30 Mar 2012 13:11:44 +0200	[thread overview]
Message-ID: <1333105904.3908.13.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1333105815.3908.11.camel@jlt3.sipsolutions.net> (sfid-20120330_131022_444171_B95DE05C)

From: Johannes Berg <johannes.berg@intel.com>

Doing the blanket "export" statement at the beginning
of the generated file confuses the kernel's Makefiles
and causes extreme build slowdowns.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 scripts/gen-compat-config.sh |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/scripts/gen-compat-config.sh b/scripts/gen-compat-config.sh
index 5d6e34c..6cdac12 100755
--- a/scripts/gen-compat-config.sh
+++ b/scripts/gen-compat-config.sh
@@ -20,9 +20,10 @@ KERNEL_VERSION=$(${MAKE} -C ${KLIB_BUILD} kernelversion | sed -n 's/^\([0-9]\)\.
 COMPAT_LATEST_VERSION="3"
 KERNEL_SUBLEVEL="-1"
 
-# This allows all these variables to be propagated through
-# all of our Makefiles
-echo export
+# Note that this script will export all variables explicitly,
+# trying to export all with a blanket "export" statement at
+# the top of the generated file causes the build to slow down
+# by an order of magnitude.
 
 if [[ ${KERNEL_VERSION} -eq "3" ]]; then
 	KERNEL_SUBLEVEL=$(${MAKE} -C ${KLIB_BUILD} kernelversion | sed -n 's/^3\.\([0-9]\+\).*/\1/p')
@@ -33,14 +34,14 @@ else
 
 	for i in $(seq ${KERNEL_26SUBLEVEL} ${COMPAT_26LATEST_VERSION}); do
 		eval CONFIG_COMPAT_KERNEL_2_6_${i}=y
-		echo "CONFIG_COMPAT_KERNEL_2_6_${i}=y"
+		echo "export CONFIG_COMPAT_KERNEL_2_6_${i}=y"
 	done
 fi
 
 let KERNEL_SUBLEVEL=${KERNEL_SUBLEVEL}+1
 for i in $(seq ${KERNEL_SUBLEVEL} ${COMPAT_LATEST_VERSION}); do
 	eval CONFIG_COMPAT_KERNEL_3_${i}=y
-	echo "CONFIG_COMPAT_KERNEL_3_${i}=y"
+	echo "export CONFIG_COMPAT_KERNEL_3_${i}=y"
 done
 
 # The purpose of these seem to be the inverse of the above other varibales.
@@ -50,14 +51,14 @@ if [[ ! -z ${RHEL_MAJOR} ]]; then
 	RHEL_MINOR=$(grep ^RHEL_MINOR $(KLIB_BUILD)/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
 	for i in $(seq 0 ${RHEL_MINOR}); do
 		eval CONFIG_COMPAT_${RHEL_MAJOR}_${i}=y
-		echo "CONFIG_COMPAT_${RHEL_MAJOR}_${i}=y"
+		echo "export CONFIG_COMPAT_${RHEL_MAJOR}_${i}=y"
 	done
 fi
 
 if [[ ${CONFIG_COMPAT_KERNEL_2_6_33} = "y" ]]; then
-	echo "CONFIG_COMPAT_FIRMWARE_CLASS=m"
+	echo "export CONFIG_COMPAT_FIRMWARE_CLASS=m"
 fi
 
 if [[ ${CONFIG_COMPAT_KERNEL_2_6_36} = "y" ]]; then
-	echo "CONFIG_COMPAT_KFIFO=y"
+	echo "export CONFIG_COMPAT_KFIFO=y"
 fi
-- 
1.7.9.1




  parent reply	other threads:[~2012-03-30 11:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30 11:10 [PATCH 0/2] compat: fix extreme build slowdowns Johannes Berg
2012-03-30 11:11 ` [PATCH 1/2] compat-wireless: include config.mk early Johannes Berg
2012-03-30 11:11 ` Johannes Berg [this message]
2012-03-30 20:30   ` [PATCH 2/2] compat: explicitly export generated variables Luis R. Rodriguez
2012-03-30 20:34     ` Johannes Berg
2012-03-30 20:38       ` Luis R. Rodriguez
2012-03-30 11:26 ` [PATCH 0/2] compat: fix extreme build slowdowns Sujith Manoharan
2012-03-30 11:30   ` Johannes Berg
2012-03-30 14:41     ` Richard Farina
2012-03-30 20:43       ` Luis R. Rodriguez
2012-03-30 21:24         ` Luis R. Rodriguez
2012-03-30 21:48           ` Luis R. Rodriguez
2012-03-31  9:24             ` Luis R. Rodriguez

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=1333105904.3908.13.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=hauke@hauke-m.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@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 NNTP newsgroup(s).