Skip to content

Commit f6d59ac

Browse files
committed
fix: combined linker flags
1 parent 2bf25c8 commit f6d59ac

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

vuru/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
# Makefile for vuru (Odin version)
22

33
ODIN = odin
4-
ODIN_FLAGS = -o:speed -reloc-mode:pic -extra-linker-flags="-pie"
4+
ODIN_FLAGS = -o:speed -reloc-mode:pic
55
DEBUG_FLAGS = -debug -o:none
66

7+
# Linker flags (combined into single -extra-linker-flags for Odin)
8+
LINKER_FLAGS = -pie
9+
710
# Cross-compilation support for xbps-src
811
# XBPS_TARGET_MACHINE is set by xbps-src when cross-compiling
912
ifdef XBPS_TARGET_MACHINE
1013
ifeq ($(XBPS_TARGET_MACHINE),aarch64)
1114
ODIN_TARGET = -target:linux_arm64
1215
# Use the cross-linker provided by xbps-src
1316
ifdef LD
14-
ODIN_FLAGS += -extra-linker-flags="-fuse-ld=$(LD)"
17+
LINKER_FLAGS += -fuse-ld=$(LD)
1518
endif
1619
else ifeq ($(XBPS_TARGET_MACHINE),x86_64)
1720
ODIN_TARGET = -target:linux_amd64
1821
endif
1922
endif
2023

24+
ODIN_FLAGS += -extra-linker-flags="$(LINKER_FLAGS)"
25+
2126
PREFIX ?= /usr/local
2227
DESTDIR ?=
2328

0 commit comments

Comments
 (0)