[PATCHv2 1/5] compiler.h: add host_build()

2020-12-26 Thread sbabic
> Add a host_build() function, so that it's possible to > check for software being build with USE_HOSTCC without > relying on preprocessor conditions. In other words > #ifdef USE_HOSTCC > host_only_code(); > #endif > can be written like this instead: > if (host_build()) > host_only_c

Re: [PATCHv2 1/5] compiler.h: add host_build()

2020-12-18 Thread Simon Glass
On Mon, 14 Dec 2020 at 16:42, Sebastian Reichel wrote: > > Add a host_build() function, so that it's possible to > check for software being build with USE_HOSTCC without > relying on preprocessor conditions. In other words > > #ifdef USE_HOSTCC > host_only_code(); > #endif > > can be wri

[PATCHv2 1/5] compiler.h: add host_build()

2020-12-14 Thread Sebastian Reichel
Add a host_build() function, so that it's possible to check for software being build with USE_HOSTCC without relying on preprocessor conditions. In other words #ifdef USE_HOSTCC host_only_code(); #endif can be written like this instead: if (host_build()) host_only_code(); Thi