Browse Source

Fix a bug in common.mk.

coderain 4 months ago
parent
commit
ae4db17b61
1 changed files with 2 additions and 2 deletions
  1. 2 2
      common.mk

+ 2 - 2
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 $@ $^