[PATCH] Explicitly use BUILD_CC and TARGET_CC

Simon Horman horms at verge.net.au
Tue Aug 19 19:02:27 EDT 2008


On Tue, Aug 19, 2008 at 10:40:16PM +0800, Jeremy Kerr wrote:
> 
> > That should be fine: we just add a rule for %.o: %.S
> 
> OK, that's not going to work, because rules of the form
> 
>  list: pattern: prereq
> 
> *require* the prereqs to be build. ie, in our case:
> 
>  $(PURGATORY_OBJS): %.o: %.S
> 
> will require a .S for all .o files in PURGATORY_OBJS. Which is not what 
> we want :(
> 
> So, the solution left would be to override COMPILE.c, COMPILE.S and 
> LINK.o for target and build compiles. For example:
> 
> $(PURGATORY_OBJS): COMPILE.c = $(TARGET_CC) $(TARGET_CFLAGS) \
>                                $(TARGET_CPPFLAGS) -c
> 
> It's unlikely that a user is going to override COMPILE.c on the make 
> command-line :)
> 
> How does that sound?

Sounds fine to me.

Another option is to split up PURGATORY_OBJS and PURGATORY_SRCS based
on wheather the source is a .S or a .c file. Though I suspect your
idea is cleaner.



More information about the kexec mailing list