From 213a30d4df6f1df29e0d8108aa2cf865318e079d Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 24 Nov 2015 18:27:57 +0000 Subject: uboot-imx6: fix build with gcc-5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Fernández Rojas git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47611 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../uboot-imx6/patches/002-use-static-inline.patch | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 package/boot/uboot-imx6/patches/002-use-static-inline.patch (limited to 'package/boot/uboot-imx6/patches/002-use-static-inline.patch') diff --git a/package/boot/uboot-imx6/patches/002-use-static-inline.patch b/package/boot/uboot-imx6/patches/002-use-static-inline.patch new file mode 100644 index 0000000000..ca77482910 --- /dev/null +++ b/package/boot/uboot-imx6/patches/002-use-static-inline.patch @@ -0,0 +1,72 @@ +From: Jeroen Hofstee +Date: Sun, 22 Jun 2014 21:10:39 +0000 (+0200) +Subject: ARM:asm:io.h use static inline +X-Git-Tag: v2014.10-rc2~47 +X-Git-Url: http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=8863aa5c984460ce1112d8db895cbf8b13a6ac9d + +ARM:asm:io.h use static inline + +When compiling u-boot with W=1 the extern inline void for +read* is likely causing the most noise. gcc / clang will +warn there is never a actual declaration for these functions. +Instead of declaring these extern make them static inline so +it is actually declared. + +cc: Albert ARIBAUD +Signed-off-by: Jeroen Hofstee +--- + +--- a/arch/arm/include/asm/io.h ++++ b/arch/arm/include/asm/io.h +@@ -75,7 +75,7 @@ static inline phys_addr_t virt_to_phys(v + #define __arch_putw(v,a) (*(volatile unsigned short *)(a) = (v)) + #define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v)) + +-extern inline void __raw_writesb(unsigned long addr, const void *data, ++static inline void __raw_writesb(unsigned long addr, const void *data, + int bytelen) + { + uint8_t *buf = (uint8_t *)data; +@@ -83,7 +83,7 @@ extern inline void __raw_writesb(unsigne + __arch_putb(*buf++, addr); + } + +-extern inline void __raw_writesw(unsigned long addr, const void *data, ++static inline void __raw_writesw(unsigned long addr, const void *data, + int wordlen) + { + uint16_t *buf = (uint16_t *)data; +@@ -91,7 +91,7 @@ extern inline void __raw_writesw(unsigne + __arch_putw(*buf++, addr); + } + +-extern inline void __raw_writesl(unsigned long addr, const void *data, ++static inline void __raw_writesl(unsigned long addr, const void *data, + int longlen) + { + uint32_t *buf = (uint32_t *)data; +@@ -99,21 +99,21 @@ extern inline void __raw_writesl(unsigne + __arch_putl(*buf++, addr); + } + +-extern inline void __raw_readsb(unsigned long addr, void *data, int bytelen) ++static inline void __raw_readsb(unsigned long addr, void *data, int bytelen) + { + uint8_t *buf = (uint8_t *)data; + while(bytelen--) + *buf++ = __arch_getb(addr); + } + +-extern inline void __raw_readsw(unsigned long addr, void *data, int wordlen) ++static inline void __raw_readsw(unsigned long addr, void *data, int wordlen) + { + uint16_t *buf = (uint16_t *)data; + while(wordlen--) + *buf++ = __arch_getw(addr); + } + +-extern inline void __raw_readsl(unsigned long addr, void *data, int longlen) ++static inline void __raw_readsl(unsigned long addr, void *data, int longlen) + { + uint32_t *buf = (uint32_t *)data; + while(longlen--) -- cgit v1.2.3