lkml.org 
[lkml]   [2011]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH trace-cmd 3/3] Revert "trace-cmd: Use conditional assignment of CC and AR"
On 03/09/2011 07:26 PM, Steven Rostedt wrote:
> On Wed, 2011-03-09 at 21:51 -0500, Steven Rostedt wrote:
>
>> I'll play with some other make tricks and see if I can come up with a
>> better solution.
>
> OK, it didn't take me long to come up with "Makefiles suck" ;)

Yeah, that little tidbit I sent took longer to come up with than it
should have :/

>
> But I did come up with a solution:
>
> ifneq ("$(origin CC)", "environment")
> CC = gcc
> endif
>
> CC := $(CROSS_COMPILE)$(CC)

Why do we want to force CC=gcc? Isn't the right thing to make your OS
setup cc to point to your preferred compiler since it is known to be the
default for make?

On Ubuntu, cc -> gcc
On Fedora 13, cc -> ccache

seems strange to force it to be gcc when users/distros have gone through
the trouble to set it up on their system.


> This wont let make CC=xx work unless I also add a:
>
> ifneq ("$(origin CC)", "command line")
>
> around the above if, but do we care?
>

This starts to get to the point where others looking at it will choke on
the expert Makefile usage.

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


\
 
 \ /
  Last update: 2011-03-10 07:43    [W:0.113 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site