Fix a bug in common.mk.
authorcoderain <coderain@sdf.org>
Sat, 8 Sep 2018 18:55:58 +0000 (20:55 +0200)
committercoderain <coderain@sdf.org>
Sat, 8 Sep 2018 18:55:58 +0000 (20:55 +0200)
common.mk

index 766e3bd66ab0b68936ecc25c82eea3e639c3eb68..6d79050633ac8bbe4758c2740f7549c427d8a978 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -38,7 +38,7 @@ ASM  := nasm
 ifneq ($(ARCH), host)
        CC   := $(ARCH)-gcc
        LINK := $(ARCH)-ld
-       LDFLAGS += -eprocess_startup
+       LDFLAGS_PROGRAM += -eprocess_startup
 else
        CC   := gcc
        LINK := gcc
@@ -90,7 +90,7 @@ $(OUTPUT_KERNEL): $(OBJECTS) $(ADDITIONAL_OBJECTS)
        $(LINK) -o $@ $(OBJECTS) $(LDFLAGS)
 
 $(OUTPUT_PROGRAM): $(OBJECTS)
-       $(LINK) -o $@ $(OBJECTS) $(LDFLAGS)
+       $(LINK) -o $@ $(OBJECTS) $(LDFLAGS) $(LDFLAGS_PROGRAM)
 
 $(OUTPUT_STATIC_LIB): $(OBJECTS)
        $(AR) rcs $@ $^