blob: 467c5ca1b12f852659800c53eaa29af3ff7255ee [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
wdenk12490652004-04-18 21:13:41 +00002#
Michal Simekd1e72ac2008-03-28 11:58:45 +01003# (C) Copyright 2007-2008 Michal Simek
4# Michal SIMEK <monstr@monstr.eu>
wdenk12490652004-04-18 21:13:41 +00005#
Michal Simekd1e72ac2008-03-28 11:58:45 +01006# (C) Copyright 2004 Atmark Techno, Inc.
wdenk12490652004-04-18 21:13:41 +00007# Yasushi SHOJI <yashi@atmark-techno.com>
wdenk12490652004-04-18 21:13:41 +00008
Michal Simek922ce202007-03-11 13:48:24 +01009PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
Michal Simek7d8314a2020-11-04 14:01:45 +010010PLATFORM_CPPFLAGS += -fdata-sections -ffunction-sections
11
12LDFLAGS_FINAL += --gc-sections
Michal Simek65e915c2014-05-08 16:08:44 +020013
14ifeq ($(CONFIG_SPL_BUILD),)
15PLATFORM_CPPFLAGS += -fPIC
16endif
Michal Simek1a2f7b82022-06-24 14:14:59 +020017
Michal Simekf942ebb2022-06-24 14:15:01 +020018ifeq ($(CONFIG_STATIC_RELA),y)
19PLATFORM_CPPFLAGS += -fPIC
20LDFLAGS_u-boot += -pic
21endif
22
Michal Simek1a2f7b82022-06-24 14:14:59 +020023ifeq ($(CONFIG_SYS_LITTLE_ENDIAN),y)
24PLATFORM_ELFFLAGS += -B microblaze $(OBJCOPYFLAGS) -O elf32-microblazeel
25else
26PLATFORM_ELFFLAGS += -B microblaze $(OBJCOPYFLAGS) -O elf32-microblaze
27endif