wdenk | 39f0e5f | 2002-08-14 20:30:46 +0000 | [diff] [blame] | 1 | # |
Wolfgang Denk | 0f5fa87 | 2010-11-21 16:34:05 +0100 | [diff] [blame] | 2 | # (C) Copyright 2000-2010 |
wdenk | 39f0e5f | 2002-08-14 20:30:46 +0000 | [diff] [blame] | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | # |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | # SPDX-License-Identifier: GPL-2.0+ |
wdenk | 39f0e5f | 2002-08-14 20:30:46 +0000 | [diff] [blame] | 6 | # |
| 7 | |
Mike Frysinger | 8378ba4 | 2009-06-14 23:33:14 -0400 | [diff] [blame] | 8 | CROSS_COMPILE ?= ppc_8xx- |
| 9 | |
Wolfgang Denk | 33a5734 | 2011-02-04 14:25:17 +0100 | [diff] [blame] | 10 | CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 |
Haiying Wang | 3935873 | 2011-02-22 16:38:05 -0500 | [diff] [blame] | 11 | LDFLAGS_FINAL += --gc-sections |
Masahiro Yamada | 0573359 | 2013-11-26 10:53:58 +0900 | [diff] [blame] | 12 | PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections \ |
| 13 | -meabi |
| 14 | PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ -ffixed-r2 |
Nobuhiro Iwamatsu | b859b8c | 2011-01-06 10:23:54 +0900 | [diff] [blame] | 15 | PLATFORM_LDFLAGS += -n |
Shinya Kuribayashi | 686d44d | 2008-08-31 05:37:04 +0900 | [diff] [blame] | 16 | |
Simon Glass | fa6945f | 2013-03-11 06:50:01 +0000 | [diff] [blame] | 17 | # Support generic board on PPC |
| 18 | __HAVE_ARCH_GENERIC_BOARD := y |
| 19 | |
Shinya Kuribayashi | 686d44d | 2008-08-31 05:37:04 +0900 | [diff] [blame] | 20 | # |
| 21 | # When cross-compiling on NetBSD, we have to define __PPC__ or else we |
| 22 | # will pick up a va_list declaration that is incompatible with the |
| 23 | # actual argument lists emitted by the compiler. |
| 24 | # |
| 25 | # [Tested on NetBSD/i386 1.5 + cross-powerpc-netbsd-1.3] |
| 26 | |
| 27 | ifeq ($(CROSS_COMPILE),powerpc-netbsd-) |
| 28 | PLATFORM_CPPFLAGS+= -D__PPC__ |
| 29 | endif |
| 30 | ifeq ($(CROSS_COMPILE),powerpc-openbsd-) |
| 31 | PLATFORM_CPPFLAGS+= -D__PPC__ |
| 32 | endif |
Scott Wood | 146f506 | 2012-09-20 19:10:01 -0500 | [diff] [blame] | 33 | |
| 34 | # Only test once |
| 35 | ifneq ($(CONFIG_SPL_BUILD),y) |
| 36 | ALL-y += checkgcc4 |
| 37 | endif |