Hello Simon, On Sat, Dec 12, 2020 at 08:39:45AM -0700, Simon Glass wrote: > > +#if !defined(USE_HOSTCC) && defined(CONFIG_MULTI_DTB_FIT) > > Is there a way to use 'if IS_ENABLED() 'instead? Here Perhaps we need > a new host_build() function in a suitable header file that returns the > value of USE_HOSTCC?
That should work. I suppose host_build() could look like this, or do you have a better suggestion? -------------------------------------------------------------- diff --git a/include/compiler.h b/include/compiler.h index 90b7afae5376..27b9843497a4 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -6,6 +6,7 @@ #define __COMPILER_H__ #include <stddef.h> +#include <stdbool.h> #ifdef USE_HOSTCC @@ -150,4 +151,12 @@ typedef unsigned long int uintptr_t; #define MEM_SUPPORT_64BIT_DATA 0 #endif +static inline bool host_build(void) { +#ifdef USE_HOSTCC + return true; +#else + return false; +#endif +} + #endif -------------------------------------------------------------- -- Sebastian
signature.asc
Description: PGP signature