[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: lockrun



On Sun, 2008-05-25 at 16:37 -0500, Raphael Geissert wrote:
> Neil Williams wrote:
> 
> Just re-reading what you said:

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CC=$(DEB_HOST_GNU_TYPE)-gcc
else
CC=cc
endif

$(CC) $(CFLAGS) lockrun.c -o lockrun

> ...
> > CC=cc
> > endif
> > 
> 
> That will cause troubles when using CC=gcc-4.3 dpkg-buildpackage (for
> example in i386, where 4.3 is not the default gcc).

> Something like CC=$(CC) should be used (the intention is to preserve the
> original $(CC), but of course that line won't work).
> 
> Something like:
> 
> ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
> OURCC=$(DEB_HOST_GNU_TYPE)-$(CC)
> else
> OURCC=$(CC)
> endif
> 
> $(OURCC) $(CFLAGS) lockrun.c -o lockrun

OUR is the wrong prefix, CROSSCC is probably better.

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CROSSCC=$(DEB_HOST_GNU_TYPE)-gcc
else
CROSSCC=$(CC)
endif

$(CROSSCC) $(CFLAGS) lockrun.c -o lockrun

You might want to set a default for $(CC) if using that:
CC:=cc

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/


Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: