From: Arnout Vandecappelle <arnout.vandecappelle@essensium.com>
To: Khem Raj <raj.khem@gmail.com>, Jeff Epler <jepler@unpythonic.net>
Cc: <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 20:21:47 +0100 [thread overview]
Message-ID: <568AC64B.7040107@essensium.com> (raw)
In-Reply-To: <186FF0A1-B6ED-49CA-B83F-3335126F671B@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]
On 04-01-16 17:20, 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 ?
But what is really your issue? Even after this patch, you'll have to run
make CC=<path-to-clang> AR=<path-to-clang-ar>
and this will already override it in the current situation.
Regards,
Arnout
--
Arnout Vandecappelle arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-01-04 19:38 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
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 [this message]
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=568AC64B.7040107@essensium.com \
--to=arnout.vandecappelle@essensium.com \
--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 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.