All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/3] image: support board_fit_config_name_match
Date: Sat, 12 Dec 2020 18:05:07 +0100	[thread overview]
Message-ID: <20201212170507.du52gjnrizym42ex@earth.universe> (raw)
In-Reply-To: <CAPnjgZ09Wj19bZRF8chdJXPaFtNr0hnHWJaUYgG-aH3n_cw00A@mail.gmail.com>

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>

  reply	other threads:[~2020-12-12 17:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 18:10 [PATCH 0/3] GE Bx50v3 cleanups Sebastian Reichel
2020-12-08 18:10 ` [PATCH 1/3] image: support board_fit_config_name_match Sebastian Reichel
2020-12-12 15:39   ` Simon Glass
2020-12-12 17:05     ` Sebastian Reichel [this message]
2020-12-12 17:24       ` Simon Glass
2020-12-08 18:10 ` [PATCH 2/3] board: ge: bx50v3: remove confidx magic numbers Sebastian Reichel
2020-12-08 18:10 ` [PATCH 3/3] board: ge: bx50v3: cleanup phy config Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201212170507.du52gjnrizym42ex@earth.universe \
    --to=sebastian.reichel@collabora.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.