[dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC

Richardson, Bruce bruce.richardson at intel.com
Tue Jun 24 19:22:21 CEST 2014


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Tuesday, June 24, 2014 2:39 AM
> To: Richardson, Bruce
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/2] mk: overriding CC also overrides HOSTCC
> 
> Hi Bruce,
> 
> 2014-06-24 01:23, Bruce Richardson:
> > when overriding the CC variable on the commandline, the HOSTCC value
> > was remaining at "gcc", which caused errors on Free BSD10 when using a gcc
> > as e.g. gcc48, without a binary just called "gcc". This change overrides
> > HOSTCC when CC is overridden, which means that setting CC=gcc48, will
> > now also set HOSTCC=gcc48, allowing the "testhost" app to compile on BSD10
> 
> So you are mixing CC and HOSTCC which would break cross-compilation.
> Why don't you set HOSTCC on command line?
> 

Because I shouldn't need to set HOSTCC unless I am cross compiling and need a different CC and HOSTCC. If my compiler is called "gcc48", and I tell the build system that my compiler is called "gcc48", it should use that value everywhere in place of gcc, unless I also tell it that my HOSTCC should be something completely different. This patch only affects HOSTCC if you specify CC on the command-line to override that value, otherwise things are left as they are. 
If you do want to override CC and do cross compiling with a separate HOSTCC that can be done too, by overriding HOSTCC also, i.e. CC=x HOSTCC=y. For those not cross compiling, they should never need to know about HOSTCC at all.


More information about the dev mailing list