diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-05-14 07:10:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-05-14 07:10:55 +0200 |
commit | cc31adf78d10eb1a5880ef51e240ab4273315e4b (patch) | |
tree | 4a33bb60a4e230634e60dfe7503e60c2536ecdcd /arch/powerpc/Makefile | |
parent | e4ea8e8bfa7a37fea2d97c3d268206417e196bdf (diff) | |
parent | 992116ba3aeda6635c103ea2d04682bdd081fb4b (diff) | |
download | barebox-cc31adf78d10eb1a5880ef51e240ab4273315e4b.tar.gz barebox-cc31adf78d10eb1a5880ef51e240ab4273315e4b.tar.xz |
Merge branch 'for-next/kbuild'
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r-- | arch/powerpc/Makefile | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile new file mode 100644 index 0000000000..aa76260496 --- /dev/null +++ b/arch/powerpc/Makefile @@ -0,0 +1,64 @@ +KBUILD_DEFCONFIG := p2020rdb_defconfig + +KBUILD_CPPFLAGS += -ffixed-r14 -m32 \ + -meabi -D __PPC__ \ + -fno-strict-aliasing + +KBUILD_CPPFLAGS += $(call cc-option,-mno-spe) +KBUILD_CPPFLAGS += $(call cc-option,-mspe=no) + +ifdef CONFIG_RELOCATABLE +KBUILD_CPPFLAGS += -fPIC -mrelocatable +endif + +ifdef CONFIG_MPC85xx +KBUILD_CPPFLAGS += -Wa,-me500x2 -msoft-float -mno-string +endif + +board-$(CONFIG_MACH_PHYCORE_MPC5200B_TINY) := pcm030 +board-$(CONFIG_P1010RDB) := freescale-p1010rdb +board-$(CONFIG_P2020RDB) := freescale-p2020rdb +board-$(CONFIG_P1022DS) := freescale-p1022ds +board-$(CONFIG_DA923RC) := owc-da923rc + +machine-$(CONFIG_ARCH_MPC5200) := mpc5xxx +machine-$(CONFIG_ARCH_MPC85XX) := mpc85xx + +TEXT_BASE = $(CONFIG_TEXT_BASE) + +KBUILD_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) + +# Add cleanup flags +ifndef CONFIG_MODULES +KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections +LDFLAGS_barebox += --gc-sections +endif + +machdirs := $(patsubst %,arch/powerpc/mach-%/,$(machine-y)) + +KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) + +archprepare: maketools + +PHONY += maketools + + +ifneq ($(board-y),) +BOARD := arch/powerpc/boards/$(board-y)/ +else +BOARD := +endif + +ifneq ($(machine-y),) +MACH := arch/powerpc/mach-$(machine-y)/ +else +MACH := +endif + +common-y += $(BOARD) $(MACH) arch/powerpc/ + +ifdef CONFIG_MPC85xx +lds-y += $(MACH)/barebox.lds +else +lds-y += $(BOARD)/barebox.lds +endif |