u-boot-brain/arch/arm
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
..
cpu ARM: Disable "DISCARD" for secure section if CONFIG_ARMV7_SECURE_BASE isn't defined 2016-01-31 16:32:56 +01:00
dts Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2016-01-27 15:05:36 -05:00
imx-common imx_common: check for Serial Downloader in spl_boot_device 2016-01-03 15:57:56 +01:00
include arm: Remove S bit from MMU section entry 2016-01-31 16:32:56 +01:00
lib arm: Replace test for CONFIG_ARMV7 with CONFIG_CPU_V7 2016-01-31 16:32:56 +01:00
mach-at91 arm: at91/spl: atmel_sfr: move saic redirect to separate file 2015-11-30 22:27:55 +01:00
mach-bcm283x Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
mach-davinci arm: Remove da830evm board 2015-09-28 10:48:23 -04:00
mach-exynos arm: exynos: clean up checkpatch issues 2015-11-02 10:38:22 +09:00
mach-highbank ARM: highbank: move SoC sources to mach-highbank 2015-02-21 08:23:51 -05:00
mach-integrator integrator: switch to DM serial port 2015-08-12 20:47:49 -04:00
mach-keystone ARM: k2g: add SD card and eMMC support 2015-10-22 14:22:25 -04:00
mach-kirkwood arm: mvebu/kirkwood: Use common timer functions 2016-01-14 14:08:59 +01:00
mach-mvebu arm: mvebu: Add support for the Armada XP theadorable board 2016-01-27 07:45:43 +01:00
mach-orion5x arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD 2015-11-10 15:03:48 +01:00
mach-rockchip rockchip: Add support for Raxda Rock 2 2016-01-21 20:42:37 -07:00
mach-s5pc1xx arm: s5pc1xx: move SoC to mach-s5pc1xx 2015-11-30 17:17:01 +09:00
mach-socfpga socfpga: Modify qts-filter args to allow input for bsp generated files and quartus project directories 2016-01-16 07:07:23 +01:00
mach-stm32 stm32: move stm32 specific code to mach-stm32 2016-01-20 10:19:41 -05:00
mach-tegra ARM: tegra: shut down USB device controller at boot 2016-01-28 21:01:23 -07:00
mach-uniphier ARM: uniphier: remove unneeded if conditionals 2016-01-20 08:40:33 +09:00
mach-versatile arm: Remove versatileab board 2015-09-11 15:01:25 -04:00
mach-zynq ARM: zynq: Remove memory division by 2 for ECC case 2016-01-27 15:55:55 +01:00
thumb1/include/asm/proc-armv arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD 2015-11-10 15:03:48 +01:00
config.mk arm: config: enforce -fno-pic for gcc 2016-01-31 16:32:56 +01:00
Kconfig ARM: zynq: Do not select options if SPL is not enabled 2016-01-27 15:55:55 +01:00
Kconfig.debug arm: debug: add Kconfig entries for lowlevel debug 2014-10-26 22:23:12 +01:00
Makefile stm32: move stm32 specific code to mach-stm32 2016-01-20 10:19:41 -05:00