summaryrefslogtreecommitdiff
path: root/libre/uboot-mx6_cubox-i/u-boot-002-gcc5-use_gcc_inline_version_instead_c99.patch
blob: 4a5e0de4ea4d2ea59b26762faf448b91c1409ee6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[RFC 08/10] inline: use the gcc inline version instead of	the c99 one.

Jeroen Hofstee jeroen at myspectrum.nl 
Sat May 31 22:32:22 CEST 2014
Previous message: [U-Boot] [RFC 07/10] ARM: make gd a function a function for clang
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
---
This fixes errors like:

make[1]: Entering directory `/home/jeroen/software/u-boot/arch/arm/cpu/armv7/omap-common'
arm-linux-gnueabi-ld.bfd  -r -o libomap-common.o  reset.o timer.o utils.o
timer.o: In function `get_tbclk':
/home/jeroen/software/u-boot/include/asm/io.h:81: multiple definition of `__raw_writesb'
reset.o:/home/jeroen/software/u-boot/include/asm/io.h:81: first defined here
timer.o: In function `__udelay':
/home/jeroen/software/u-boot/include/asm/io.h:88: multiple definition of `__raw_writesw'
reset.o:/home/jeroen/software/u-boot/include/asm/io.h:88: first defined here
timer.o: In function `get_ticks':
/home/jeroen/software/u-boot/include/asm/io.h:95: multiple definition of `__raw_writesl'
reset.o:/home/jeroen/software/u-boot/include/asm/io.h:95: first defined here
timer.o: In function `__raw_readsb':
/home/jeroen/software/u-boot/include/asm/io.h:102: multiple definition of `__raw_readsb'
reset.o:/home/jeroen/software/u-boot/include/asm/io.h:102: first defined here
timer.o: In function `__raw_readsw':
/home/jeroen/software/u-boot/include/asm/io.h:109: multiple definition of `__raw_readsw'
reset.o:/home/jeroen/software/u-boot/include/asm/io.h:109: first defined here
timer.o: In function `__raw_readsl':
/home/jeroen/software/u-boot/include/asm/io.h:116: multiple definition of `__raw_readsl'
reset.o:/home/jeroen/software/u-boot/include/asm/io.h:116: first defined here
make[1]: *** [libomap-common.o] Error 1
make[1]: Leaving directory `/home/jeroen/software/u-boot/arch/arm/cpu/armv7/omap-common'
make: *** [arch/arm/cpu/armv7/omap-common/libomap-common.o] Error 2
---
 include/linux/compiler-gcc.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 9896e54..99c6dcc 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -44,9 +44,10 @@
  */
 #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
     !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
-# define inline		inline		__attribute__((always_inline))
-# define __inline__	__inline__	__attribute__((always_inline))
-# define __inline	__inline	__attribute__((always_inline))
+/* XXX: check __GNUC_STDC_INLINE__, fix line length */
+# define inline		inline		__attribute__((always_inline)) __attribute__((__gnu_inline__))
+# define __inline__	__inline__	__attribute__((always_inline)) __attribute__((__gnu_inline__))
+# define __inline	__inline	__attribute__((always_inline)) __attribute__((__gnu_inline__))
 #endif
 
 #define __deprecated			__attribute__((deprecated))
-- 
1.8.3.2