Skip to content

Commit

Permalink
inline: use the gcc inline version instead of the c99 one.
Browse files Browse the repository at this point in the history
---
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
  • Loading branch information
jhofstee committed Jun 9, 2014
1 parent b7a851d commit 5cd261f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/linux/compiler-gcc.h
Expand Up @@ -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))
Expand Down

0 comments on commit 5cd261f

Please sign in to comment.