All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Diego Elio Pettenò" <flameeyes@gmail.com>
To: Linux-Sparse <linux-sparse@vger.kernel.org>
Cc: "Diego Elio Pettenò" <flameeyes@gmail.com>
Subject: [PATCH 1/3] build: allow easy override of GCC_BASE
Date: Wed, 13 Apr 2011 13:06:04 +0200	[thread overview]
Message-ID: <1302692766-30217-1-git-send-email-flameeyes@gmail.com> (raw)

Sometimes gcc reports the wrong path for its own base (for instance when
ICC is present in the same system); by allowing an override of GCC_BASE in
Makefile, it's easier for packages to fix this up.
---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index cc6176f..e08143a 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,8 @@ HAVE_GCC_DEP:=$(shell touch .gcc-test.c && 				\
 		echo 'yes'; rm -f .gcc-test.d .gcc-test.o .gcc-test.c)
 HAVE_GTK2:=$(shell pkg-config --exists gtk+-2.0 2>/dev/null && echo 'yes')
 
-CFLAGS += -DGCC_BASE=\"$(shell $(CC) --print-file-name=)\"
+GCC_BASE = $(shell $(CC) --print-file-name=)
+CFLAGS += -DGCC_BASE=\"$(GCC_BASE)\"
 
 ifeq ($(HAVE_GCC_DEP),yes)
 CFLAGS += -Wp,-MD,$(@D)/.$(@F).d
-- 
1.7.5.rc1


             reply	other threads:[~2011-04-13 11:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13 11:06 Diego Elio Pettenò [this message]
2011-04-13 11:06 ` [PATCH 2/3] build: add an all-installable target that builds the targets to install Diego Elio Pettenò
2011-04-13 18:34   ` Josh Triplett
2011-04-13 18:35     ` Diego Elio Pettenò
2011-04-13 11:06 ` [PATCH 3/3] Fix build with GCC 4.6 series Diego Elio Pettenò
2011-04-14  9:58   ` Christopher Li
2011-04-14  9:59 ` [PATCH 1/3] build: allow easy override of GCC_BASE Christopher Li

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=1302692766-30217-1-git-send-email-flameeyes@gmail.com \
    --to=flameeyes@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    /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 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.