From: ayaka <ayaka@soulik.info>
To: yocto@yoctoproject.org
Cc: Randy Li <randy.li@rock-chips.com>,
Randy 'ayaka' Li <ayaka@soulik.info>,
romain.perier@gmail.com
Subject: [PATCH v2 1/3] recipes-bsp/u-boot: fixup build for gcc7
Date: Thu, 20 Jun 2019 19:14:08 +0800 [thread overview]
Message-ID: <20190620111410.4573-2-ayaka@soulik.info> (raw)
In-Reply-To: <20190620111410.4573-1-ayaka@soulik.info>
From: Randy 'ayaka' Li <ayaka@soulik.info>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: Randy 'ayaka' Li <ayaka@soulik.info>
---
.../u-boot/u-boot-rockchip/gcc7_fixup.patch | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 recipes-bsp/u-boot/u-boot-rockchip/gcc7_fixup.patch
diff --git a/recipes-bsp/u-boot/u-boot-rockchip/gcc7_fixup.patch b/recipes-bsp/u-boot/u-boot-rockchip/gcc7_fixup.patch
new file mode 100644
index 0000000..ccb709a
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-rockchip/gcc7_fixup.patch
@@ -0,0 +1,38 @@
+diff --git a/include/linux/log2.h b/include/linux/log2.h
+index aa1de63090..5526af036d 100644
+--- a/include/linux/log2.h
++++ b/include/linux/log2.h
+@@ -12,12 +12,6 @@
+ #include <linux/types.h>
+ #include <linux/bitops.h>
+
+-/*
+- * deal with unrepresentable constant logarithms
+- */
+-extern __attribute__((const, noreturn))
+-int ____ilog2_NaN(void);
+-
+ /*
+ * non-constant log of base 2 calculators
+ * - the arch may override these in asm/bitops.h if they can be implemented
+@@ -82,7 +76,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
+ #define ilog2(n) \
+ ( \
+ __builtin_constant_p(n) ? ( \
+- (n) < 1 ? ____ilog2_NaN() : \
++ (n) < 2 ? 0 : \
+ (n) & (1ULL << 63) ? 63 : \
+ (n) & (1ULL << 62) ? 62 : \
+ (n) & (1ULL << 61) ? 61 : \
+@@ -145,10 +139,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
+ (n) & (1ULL << 4) ? 4 : \
+ (n) & (1ULL << 3) ? 3 : \
+ (n) & (1ULL << 2) ? 2 : \
+- (n) & (1ULL << 1) ? 1 : \
+- (n) & (1ULL << 0) ? 0 : \
+- ____ilog2_NaN() \
+- ) : \
++ 1 ) : \
+ (sizeof(n) <= 4) ? \
+ __ilog2_u32(n) : \
+ __ilog2_u64(n) \
--
2.21.0
next prev parent reply other threads:[~2019-06-20 11:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-20 11:14 [meta-rockchip] [PATCH v2 0/3] fixup u-boot compiling error ayaka
2019-06-20 11:14 ` ayaka [this message]
2019-06-20 11:14 ` [PATCH v2 2/3] recipes-bsp/u-boot: update build rules ayaka
2019-06-20 11:14 ` [PATCH v2 3/3] recipes-bsp/u-boot: update to the latest version ayaka
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=20190620111410.4573-2-ayaka@soulik.info \
--to=ayaka@soulik.info \
--cc=randy.li@rock-chips.com \
--cc=romain.perier@gmail.com \
--cc=yocto@yoctoproject.org \
/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.