summarylogtreecommitdiffstats
path: root/fix_ldflags.patch
blob: e1cb20deefe9f0f0cf989b9801f621623c548e38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- a/Makefile
+++ b/Makefile
@@ -14,12 +14,12 @@
 ASFLAGS += -felf64
 
 ${BIN}: ${OBJ}
-	$(LD) -o $@ $(LDFLAGS) $^
+	ld -o $@ $^
 
 ${BUILDDIR}/%.o: %.asm
 	@mkdir -p ${@D}
-	@$(AS) -o $@ -M -MF ${@:.o=.d} $<
-	$(AS) -o $@ $(ASFLAGS) $<
+	@$(AS) -o $@ -M -MF ${@:.o=.d} $< $(ASFLAGS) $(LDFLAGS)
+	$(AS) -o $@ $(ASFLAGS) $(LDFLAGS) $<
 
 ${BINTAR}: ${BIN}
 	tar czf $@ $^