From patchwork Mon Nov 11 14:27:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 3167671 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BC89EC045B for ; Mon, 11 Nov 2013 14:28:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95325202E6 for ; Mon, 11 Nov 2013 14:28:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CD216202BE for ; Mon, 11 Nov 2013 14:28:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753857Ab3KKO2H (ORCPT ); Mon, 11 Nov 2013 09:28:07 -0500 Received: from mail.skyhub.de ([78.46.96.112]:53568 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753345Ab3KKO2G convert rfc822-to-8bit (ORCPT ); Mon, 11 Nov 2013 09:28:06 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1384180085; bh=+ktSIF+DjdAlwvGxRznL37Q+K7djalQbTqMDGtnFxj0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=qbIJOnXM0pGa yI0zi9cFEY5wGnTD/MOyVkRYnXZXeCmyxOGRos/mWWf+rouvKdtjx9CdYW2Qdb2ig1A dGAll8gax36VigHLFjdQs28e76qJKcrKY3hcZSCbK49UtpDPaod4uL9V0kEXEI/R6Ru 04y+LqKSRBfShebO7ysziZQcQ= Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EmuF2Svkbskk; Mon, 11 Nov 2013 15:28:05 +0100 (CET) Received: from liondog.tnic (p54B46E05.dip0.t-ipconnect.de [84.180.110.5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id C9DE0244943; Mon, 11 Nov 2013 15:28:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1384180085; bh=+ktSIF+DjdAlwvGxRznL37Q+K7djalQbTqMDGtnFxj0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=qbIJOnXM0pGa yI0zi9cFEY5wGnTD/MOyVkRYnXZXeCmyxOGRos/mWWf+rouvKdtjx9CdYW2Qdb2ig1A dGAll8gax36VigHLFjdQs28e76qJKcrKY3hcZSCbK49UtpDPaod4uL9V0kEXEI/R6Ru 04y+LqKSRBfShebO7ysziZQcQ= Received: by liondog.tnic (Postfix, from userid 1000) id 4A7351027D2; Mon, 11 Nov 2013 15:27:43 +0100 (CET) Date: Mon, 11 Nov 2013 15:27:43 +0100 From: Borislav Petkov To: Michal Marek Cc: linux-kbuild@vger.kernel.org, lkml , x86-ml Subject: [PATCH -v1.1] Kbuild: Ignore GREP_OPTIONS env variable Message-ID: <20131111142743.GE28219@pd.tnic> References: <20131030160635.GE13290@pd.tnic> <527AB7D1.9080307@suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <527AB7D1.9080307@suse.cz> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Borislav Petkov Subject: [PATCH] Kbuild: Ignore GREP_OPTIONS env variable When building the kernel in a shell which defines GREP_OPTIONS so that grep behavior is modified, we can break the generation of the syscalls table like so: __SYSCALL_COMMON(0, sys_read, sys_read) __SYSCALL_COMMON(1, sys_write, sys_write) __SYSCALL_COMMON(10, sys_mprotect, sys_mprotect) ... This is just the initial breakage, later we barf when generating modules. In this case, GREP_OPTIONS contains "--color=always" which adds the shell colors markup and completely fudges the headers under ...generated/asm/. Fix that by unexporting the GREP_OPTIONS variable for the whole kernel build as we tend to use grep at a bunch of places. Signed-off-by: Borislav Petkov --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 868c0eb67b08..73503a7755fd 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,9 @@ LC_COLLATE=C LC_NUMERIC=C export LC_COLLATE LC_NUMERIC +# Avoid interference with shell env settings +unexport GREP_OPTIONS + # We are using a recursive build, so we need to do a little thinking # to get the ordering right. #