]> git.sur5r.net Git - u-boot/blobdiff - cpu/ppc4xx/config.mk
Merge with /home/tur/git/u-boot#cm5200-si
[u-boot] / cpu / ppc4xx / config.mk
index ffcc24f4389d40b2d39876cdcf94c6f94549b992..4fd510899c59c1c42143804612f8bbf875d89926 100644 (file)
 # MA 02111-1307 USA
 #
 
-PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi
+PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing
+PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -ffixed-r29 -mstring -msoft-float
 
-PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -ffixed-r29 -mstring -Wa,-m405 -mcpu=405 -msoft-float
-##PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -mstring -mcpu=403 -msoft-float
+cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/')
+is440=$(shell grep CONFIG_440 $(TOPDIR)/include/$(cfg))
+
+ifneq (,$(findstring CONFIG_440,$(is440)))
+PLATFORM_CPPFLAGS += -Wa,-m440 -mcpu=440
+else
+PLATFORM_CPPFLAGS += -Wa,-m405 -mcpu=405
+endif