From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Khem Raj <raj.khem@gmail.com>
Cc: Jeff Epler <jepler@unpythonic.net>,
williams@redhat.com, jkacur@redhat.com,
linux-rt-users@vger.kernel.org
Subject: Re: [PATCH] Makefile: Set CC/AR variable only if it doesn't have a value
Date: Mon, 4 Jan 2016 17:25:07 +0100 [thread overview]
Message-ID: <20160104162507.GE28361@pengutronix.de> (raw)
In-Reply-To: <186FF0A1-B6ED-49CA-B83F-3335126F671B@gmail.com>
On Mon, Jan 04, 2016 at 08:20:01AM -0800, Khem Raj wrote:
>
> > On Jan 4, 2016, at 5:39 AM, Jeff Epler <jepler@unpythonic.net> wrote:
> >
> > I believe the patch does not have the desired effect, because make(1)
> > always sets CC automatically:
> >
> > $ cat raj.mk
> > CROSS_COMPILE=x86_64-linux-gnu-
> > CC?=$(CROSS_COMPILE)gcc
> > .PHONY: default
> > default:
> > @echo CC=$(CC)
> > $ make -f raj.mk
> > CC=cc
> >
> > With your patch, those who specify CROSS_COMPILE, or for whom gcc and cc
> > are different, will get different (worse) behavior.
>
> Right. I think if CC was used as such with out constructing out of CROSS_COMPILE
> in Makefile then my issue would be fixed too. However this would mean that cross compiling users
> now have to pass CC = <cross-compiler> themselves instead of CROSS_COMPILE prefix. Is that
> acceptable ?
You could play with something like:
ifeq($(origin CC),default)
CC=$(CROSS_COMPILE)gcc
endif
but not sure I'd like the result. If you asked me, I'd drop all that
CROSS_COMPILE stuff.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-01-04 16:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-03 18:54 [PATCH] Makefile: Set CC/AR variable only if it doesn't have a value Khem Raj
2016-01-04 13:39 ` Jeff Epler
2016-01-04 14:40 ` Clark Williams
2016-01-05 3:12 ` Jeff Epler
2016-01-04 16:20 ` Khem Raj
2016-01-04 16:25 ` Uwe Kleine-König [this message]
2016-01-05 21:15 ` Henrik Austad
2016-01-05 21:20 ` Khem Raj
2016-01-05 21:42 ` Uwe Kleine-König
2016-01-04 19:21 ` Arnout Vandecappelle
2016-01-04 23:13 ` Khem Raj
2016-01-05 22:59 ` John Kacur
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=20160104162507.GE28361@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=jepler@unpythonic.net \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=raj.khem@gmail.com \
--cc=williams@redhat.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).