From patchwork Mon Dec 28 19:38:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Nieder X-Patchwork-Id: 70028 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBSJNHup016831 for ; Mon, 28 Dec 2009 19:23:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750892AbZL1TXO (ORCPT ); Mon, 28 Dec 2009 14:23:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751127AbZL1TXO (ORCPT ); Mon, 28 Dec 2009 14:23:14 -0500 Received: from mail-gx0-f211.google.com ([209.85.217.211]:64906 "EHLO mail-gx0-f211.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750892AbZL1TXN (ORCPT ); Mon, 28 Dec 2009 14:23:13 -0500 Received: by gxk3 with SMTP id 3so4498937gxk.1 for ; Mon, 28 Dec 2009 11:23:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=rw2PGfuBgjtRxIF8K36KIXb6vXG4F49GV9PVdO1PPOc=; b=SrLIe7DzJGi9ivspxFJ9XeMUfs6oKQZThOMKV5A2K9lMEiezEPZt5nAMs6eHs+/ys1 UW6GDLq+dTzZPfpIvJvgEFhLG8ysClHFGYM4B1HLaPmIJV87AJi5se9PIOvT3i+Lriwh 29xY3hB2ggHLXjxDoIj3KohCybOrUZCikREHM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=JAXLMo8eN9PCj3yGkU+KTLRdseqDpXNrubYk1oOBNgDTE5r/GdIkL5XoX/mRrdEelT pDgWSL13gA1X/2yT2yPq4ynaePuqIdGT92pV7BSqwkRHkgNbrVssrvL/cBY5qEKJa9ST RoUS5wnlykVrBYSmxT7x1JnI1qVBsuUcDCQmk= Received: by 10.91.63.12 with SMTP id q12mr5770783agk.23.1262028192348; Mon, 28 Dec 2009 11:23:12 -0800 (PST) Received: from localhost (c-76-126-172-197.hsd1.ca.comcast.net [76.126.172.197]) by mx.google.com with ESMTPS id 8sm4807769yxg.60.2009.12.28.11.23.10 (version=SSLv3 cipher=RC4-MD5); Mon, 28 Dec 2009 11:23:10 -0800 (PST) Date: Mon, 28 Dec 2009 19:38:27 +0000 From: Jonathan Nieder To: Michal Marek Cc: sd@sedf.de, Andrew Morton , Michael Tokarev , Alek Du , linux-kbuild@vger.kernel.org Subject: [PATCH] kbuild: really fix bzImage build with non-bash sh Message-ID: <20091228193827.GA2157@localhost> References: <20091222154935.5da4be37.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091222154935.5da4be37.akpm@linux-foundation.org> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index cd815ac..eabedbb 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -219,8 +219,13 @@ for F in $1; do \ fsize=$$(stat -c "%s" $$F); \ dec_size=$$(expr $$dec_size + $$fsize); \ done; \ -printf "%08x" $$dec_size | \ - sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g' \ +printf "%08x\n" $$dec_size | \ + sed 's/\(..\)/\1 /g' | { \ + read ch0 ch1 ch2 ch3; \ + for ch in $$ch3 $$ch2 $$ch1 $$ch0; do \ + printf '%s%03o' '\\' $$((0x$$ch)); \ + done; \ + } \ ) quiet_cmd_bzip2 = BZIP2 $@