[PATCH 1/3] image: support board_fit_config_name_match
Sebastian Reichel
sebastian.reichel at collabora.com
Sat Dec 12 18:05:07 CET 2020
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201212/86c31023/attachment.sig>
More information about the U-Boot
mailing list