Date
1 - 3 of 3
[PATCH 1/3] recipes-bsp/u-boot: fixup build for gcc7
Randy 'ayaka' Li <ayaka@...>
Signed-off-by: Randy Li <randy.li@...>
Signed-off-by: Randy 'ayaka' Li <ayaka@...>
---
.../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.20.1
Signed-off-by: Randy 'ayaka' Li <ayaka@...>
---
.../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.20.1
ayaka <ayaka@...>
On 5/4/19 11:02 AM, Trevor Woerner wrote:
If you need, I can change this name.
On Wed 2019-04-24 @ 10:59:16 PM, Randy 'ayaka' Li wrote:Anyway, the u-boot won't work after gcc6. At that time I make this this, yocto still use the gcc7.Signed-off-by: Randy Li <randy.li@...>Why do we care about gcc7 on master? Master only has support for gcc8.
Signed-off-by: Randy 'ayaka' Li <ayaka@...>
---
.../u-boot/u-boot-rockchip/gcc7_fixup.patch | 38 +++++++++++++++++++
If you need, I can change this name.