u-boot-brain/arch
Peng Fan 397d7d5a1b arm: config: enforce -fno-pic for gcc
Android's tool chain enable the -mandroid at default.
This option will enable the -fpic, which cause uboot compilation
failure:
"
 LD      u-boot
 u-boot contains unexpected relocations: R_ARM_ABS32
 R_ARM_RELATIVE
"

In my testcase, arm-linux-androideabi-gcc-4.9 internally
enables '-fpic', so when compiling code, there will be
relocation entries using type R_ARM_GOT_BREL and .got
section. When linking all the built-in.o using ld, there
will be R_ARM_ABS32 relocation entry and .got section
in the final u-boot elf image. This can not be handled
by u-boot, since u-boot only expects R_ARM_RELATIVE
relocation entry.
arm-poky-linux-gnueabi-gcc-4.9 default does not enable '-fpic',
so there is not .got section and R_ARM_GOT_BREL in built-in.o.
And in the final u-boot elf image, all relocation entries are
R_ARM_RELATIVE.

we can pass '-fno-pic' to xxx-gcc to disable pic. whether
the toolchain internally enables or disables pic, '-fno-pic'
can work well.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-31 16:32:56 +01:00
..
arc Fix board init code to respect the C runtime environment 2016-01-13 21:05:17 -05:00
arm arm: config: enforce -fno-pic for gcc 2016-01-31 16:32:56 +01:00
avr32 avr32: Use the generic bitops headers 2015-11-05 10:52:31 -05:00
blackfin Move console definitions into a new console.h file 2015-11-19 20:27:50 -07:00
m68k m68k: M54418TWR: drop board/freescale/m54418twr/config.mk 2016-01-20 10:19:34 -05:00
microblaze microblaze: Remove empty file - cpu.c 2016-01-27 15:55:53 +01:00
mips mips: asm/io.h: Add in <linux/bug.h> 2016-01-25 18:52:23 -05:00
nds32 nds32: Fix compile error. 2016-01-21 10:41:43 +08:00
nios2 Fix board init code to respect the C runtime environment 2016-01-13 21:05:17 -05:00
openrisc openrisc: Fix build errors 2016-01-25 10:40:01 -05:00
powerpc Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2016-01-27 15:05:36 -05:00
sandbox dm: video: test: Add tests for the video uclass 2016-01-20 19:10:16 -07:00
sh Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
sparc sparc: Remove non-generic board init files: board.c, time.c 2015-12-03 13:15:50 +02:00
x86 x86: Correct spi node alias 2016-01-28 13:53:30 +08:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig MIPS: add initial infrastructure for device-tree files 2016-01-16 21:06:45 +01:00