Skip to contentSkip to conversation

board: xilinx: mbv: Disable -fpic for SPL

PATCH Applied Michal Simek 1 participant 2 messages Nov 9 – Nov 24 Arm/Zynq architecture

lore
Share & tools
lore

Michal Simek

author maintainer
#0 lore raw

PATCH 1/1 board: xilinx: mbv: Disable -fpic for SPL

MicroBlaze-V SPL runs from a fixed address and doesn't need position independent code. Pass -fno-pic for SPL from the board config.mk, which is included after the arch config.mk, so the later flag takes precedence over -fpic while U-Boot proper keeps -fpic.

It saved more then 1kB of memory.

---

 board/xilinx/mbv/config.mk | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 board/xilinx/mbv/config.mk
board/xilinx/mbv/config.mk new file +5 -0
new file mode 100644
index 000000000000..ec4d0412c27e
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0
+
+ifdef CONFIG_XPL_BUILD
+PLATFORM_CPPFLAGS += -fno-pic
+endif

---
base-commit: 4b2c5fa37b4ce7235de2908f20ba433e79626ffb

Signature · 1 line
2.43.0
author maintainer Applied
#1 lore raw
Quoted 26 lines · Michal Simek

MicroBlaze-V SPL runs from a fixed address and doesn't need position independent code. Pass -fno-pic for SPL from the board config.mk, which is included after the arch config.mk, so the later flag takes precedence over -fpic while U-Boot proper keeps -fpic.

It saved more then 1kB of memory.

---

  board/xilinx/mbv/config.mk | 5 +++++
  1 file changed, 5 insertions(+)

create mode 100644 board/xilinx/mbv/config.mk

board/xilinx/mbv/config.mk new file +5 -1
new file mode 100644
index 000000000000..ec4d0412c27e
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0
+
+ifdef CONFIG_XPL_BUILD
+PLATFORM_CPPFLAGS += -fno-pic
+endif
---
Quoted 2 lines

base-commit: 4b2c5fa37b4ce7235de2908f20ba433e79626ffb

Applied.
M