All of
 help / color / mirror / Atom feed
From: Borislav Petkov <>
To: Michal Marek <>
Cc:, lkml <>,
	x86-ml <>
Subject: [PATCH -v1.1] Kbuild: Ignore GREP_OPTIONS env variable
Date: Mon, 11 Nov 2013 15:27:43 +0100	[thread overview]
Message-ID: <20131111142743.GE28219@pd.tnic> (raw)
In-Reply-To: <>

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(^[[01;31m^[[K0^[[m^[[K, sys_read, sys_read)
__SYSCALL_COMMON(^[[01;31m^[[K1^[[m^[[K, sys_write, sys_write)
__SYSCALL_COMMON(^[[01;31m^[[K1^[[m^[[K0, sys_mprotect, sys_mprotect) ...

This is just the initial breakage, later we barf when generating

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
+# 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.


Sent from a fat crate under my desk. Formatting is fine.

  reply	other threads:[~2013-11-11 14:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30 16:06 Borislav Petkov
2013-11-06 21:42 ` Michal Marek
2013-11-11 14:27   ` Borislav Petkov [this message]
2013-11-11 17:00     ` [PATCH -v1.1] " Michal Marek
2013-11-11 20:43       ` Ingo Molnar
2013-11-11 20:58         ` Borislav Petkov

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131111142743.GE28219@pd.tnic \ \ \ \ \ \
    --subject='Re: [PATCH -v1.1] Kbuild: Ignore GREP_OPTIONS env variable' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.