1a47a12beSStefan Roese# 2fa11dbe5SWolfgang Denk# (C) Copyright 2000-2010 3a47a12beSStefan Roese# Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4a47a12beSStefan Roese# 5a47a12beSStefan Roese# See file CREDITS for list of people who contributed to this 6a47a12beSStefan Roese# project. 7a47a12beSStefan Roese# 8a47a12beSStefan Roese# This program is free software; you can redistribute it and/or 9a47a12beSStefan Roese# modify it under the terms of the GNU General Public License as 10a47a12beSStefan Roese# published by the Free Software Foundation; either version 2 of 11a47a12beSStefan Roese# the License, or (at your option) any later version. 12a47a12beSStefan Roese# 13a47a12beSStefan Roese# This program is distributed in the hope that it will be useful, 14a47a12beSStefan Roese# but WITHOUT ANY WARRANTY; without even the implied warranty of 15a47a12beSStefan Roese# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16a47a12beSStefan Roese# GNU General Public License for more details. 17a47a12beSStefan Roese# 18a47a12beSStefan Roese# You should have received a copy of the GNU General Public License 19a47a12beSStefan Roese# along with this program; if not, write to the Free Software 20a47a12beSStefan Roese# Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21a47a12beSStefan Roese# MA 02111-1307 USA 22a47a12beSStefan Roese# 23a47a12beSStefan Roese 24a47a12beSStefan RoeseCROSS_COMPILE ?= ppc_8xx- 25a47a12beSStefan Roese 26*8ae86b76SWolfgang DenkCONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 276dc1ecebSHaiying WangLDFLAGS_FINAL += --gc-sections 2833ee4c92SJoakim TjernlundPLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections 2939768f77SJoakim TjernlundPLATFORM_RELFLAGS += $(call cc-option,-msingle-pic-base,) 3039768f77SJoakim TjernlundPLATFORM_RELFLAGS += $(call cc-option,-fno-jump-tables,) 31a47a12beSStefan RoesePLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ 328aba9dceSNobuhiro IwamatsuPLATFORM_LDFLAGS += -n 33a47a12beSStefan Roese 34fa11dbe5SWolfgang Denkifdef CONFIG_SYS_LDSCRIPT 35fa11dbe5SWolfgang Denk# need to strip off double quotes 36fa11dbe5SWolfgang DenkLDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) 37fa11dbe5SWolfgang Denkelse ifdef CONFIG_NAND_SPL 38fa11dbe5SWolfgang DenkLDSCRIPT := $(SRCTREE)/$(CONFIG_BOARDDIR)/u-boot-nand.lds 39fa11dbe5SWolfgang Denkelse 40fa11dbe5SWolfgang Denkifneq ($(wildcard $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds),) 41fa11dbe5SWolfgang DenkLDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds 42fa11dbe5SWolfgang Denkendif 43fa11dbe5SWolfgang Denkendif 44fa11dbe5SWolfgang Denk 45a47a12beSStefan Roese# 46a47a12beSStefan Roese# When cross-compiling on NetBSD, we have to define __PPC__ or else we 47a47a12beSStefan Roese# will pick up a va_list declaration that is incompatible with the 48a47a12beSStefan Roese# actual argument lists emitted by the compiler. 49a47a12beSStefan Roese# 50a47a12beSStefan Roese# [Tested on NetBSD/i386 1.5 + cross-powerpc-netbsd-1.3] 51a47a12beSStefan Roese 52a47a12beSStefan Roeseifeq ($(CROSS_COMPILE),powerpc-netbsd-) 53a47a12beSStefan RoesePLATFORM_CPPFLAGS+= -D__PPC__ 54a47a12beSStefan Roeseendif 55a47a12beSStefan Roeseifeq ($(CROSS_COMPILE),powerpc-openbsd-) 56a47a12beSStefan RoesePLATFORM_CPPFLAGS+= -D__PPC__ 57a47a12beSStefan Roeseendif 58