Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
wdenk | 507bbe3 | 2004-04-18 21:13:41 +0000 | [diff] [blame] | 2 | # |
Michal Simek | 62032de | 2008-03-28 11:58:45 +0100 | [diff] [blame] | 3 | # (C) Copyright 2007-2008 Michal Simek |
| 4 | # Michal SIMEK <monstr@monstr.eu> |
wdenk | 507bbe3 | 2004-04-18 21:13:41 +0000 | [diff] [blame] | 5 | # |
Michal Simek | 62032de | 2008-03-28 11:58:45 +0100 | [diff] [blame] | 6 | # (C) Copyright 2004 Atmark Techno, Inc. |
wdenk | 507bbe3 | 2004-04-18 21:13:41 +0000 | [diff] [blame] | 7 | # Yasushi SHOJI <yashi@atmark-techno.com> |
wdenk | 507bbe3 | 2004-04-18 21:13:41 +0000 | [diff] [blame] | 8 | |
Wolfgang Denk | 8ae86b7 | 2011-02-04 14:25:17 +0100 | [diff] [blame] | 9 | CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000 |
Mike Frysinger | 262ae0a | 2009-09-03 23:12:47 -0400 | [diff] [blame] | 10 | |
Michal Simek | cfc6711 | 2007-03-11 13:48:24 +0100 | [diff] [blame] | 11 | PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__ |
Michal Simek | 9c2aa7e | 2020-11-04 14:01:45 +0100 | [diff] [blame] | 12 | PLATFORM_CPPFLAGS += -fdata-sections -ffunction-sections |
| 13 | |
| 14 | LDFLAGS_FINAL += --gc-sections |
Michal Simek | e945f6d | 2014-05-08 16:08:44 +0200 | [diff] [blame] | 15 | |
| 16 | ifeq ($(CONFIG_SPL_BUILD),) |
| 17 | PLATFORM_CPPFLAGS += -fPIC |
| 18 | endif |
Michal Simek | 10fd6d6 | 2022-06-24 14:14:59 +0200 | [diff] [blame] | 19 | |
Michal Simek | d58c007 | 2022-06-24 14:15:01 +0200 | [diff] [blame] | 20 | ifeq ($(CONFIG_STATIC_RELA),y) |
| 21 | PLATFORM_CPPFLAGS += -fPIC |
| 22 | LDFLAGS_u-boot += -pic |
| 23 | endif |
| 24 | |
Michal Simek | 10fd6d6 | 2022-06-24 14:14:59 +0200 | [diff] [blame] | 25 | ifeq ($(CONFIG_SYS_LITTLE_ENDIAN),y) |
| 26 | PLATFORM_ELFFLAGS += -B microblaze $(OBJCOPYFLAGS) -O elf32-microblazeel |
| 27 | else |
| 28 | PLATFORM_ELFFLAGS += -B microblaze $(OBJCOPYFLAGS) -O elf32-microblaze |
| 29 | endif |