From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id A1012E00DEF; Thu, 20 Jun 2019 04:14:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from kozue.soulik.info (kozue.soulik.info [108.61.200.231]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 40FC9E00DED for ; Thu, 20 Jun 2019 04:14:23 -0700 (PDT) Received: from misaki.sumomo.pri (unknown [IPv6:2001:470:b30d:2:c604:15ff:0:56c]) by kozue.soulik.info (Postfix) with ESMTPA id 1634B100B70; Thu, 20 Jun 2019 20:15:51 +0900 (JST) From: ayaka To: yocto@yoctoproject.org Date: Thu, 20 Jun 2019 19:14:08 +0800 Message-Id: <20190620111410.4573-2-ayaka@soulik.info> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190620111410.4573-1-ayaka@soulik.info> References: <20190620111410.4573-1-ayaka@soulik.info> MIME-Version: 1.0 Cc: Randy Li , Randy 'ayaka' Li , romain.perier@gmail.com Subject: [PATCH v2 1/3] recipes-bsp/u-boot: fixup build for gcc7 X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2019 11:14:23 -0000 Content-Transfer-Encoding: 8bit From: Randy 'ayaka' Li Signed-off-by: Randy Li Signed-off-by: Randy 'ayaka' Li --- .../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 + #include + +-/* +- * 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