]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
AVR32: Build position-independent u-boot
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Sat, 18 Nov 2006 16:32:31 +0000 (17:32 +0100)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Sat, 14 Apr 2007 13:20:27 +0000 (15:20 +0200)
Add -fPIC -mno-init-got to the avr32-specific CFLAGS to make u-boot
position independent. This will make relocation a lot easier.

-mno-init-got means that gcc shouldn't emit code to load the GOT
address into r6 in every function prologue. We do it once and for
all in the early startup assembly code, so enabling this option
makes u-boot a bit faster and smaller.

The assembly parts have always been position-independent, so no code
changes should be necessary.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
avr32_config.mk

index 0b92053e1af9d0fe65051fe25d9b08af4157e3ed..441caa405ae3c5e2a8a1c66c0ee5c3970c4480a2 100644 (file)
@@ -21,5 +21,5 @@
 # MA 02111-1307 USA
 #
 
-PLATFORM_RELFLAGS      += -ffixed-r5 -mno-pic -mrelax
+PLATFORM_RELFLAGS      += -ffixed-r5 -fPIC -mno-init-got -mrelax
 PLATFORM_LDFLAGS       += --relax