summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Panzlaff <michael.panzlaff@fau.de>2021-04-17 22:48:57 +0200
committerMichael Panzlaff <michael.panzlaff@fau.de>2021-04-17 22:48:57 +0200
commit38d0cca903b4cc886bf0ed2a4d5714f20b14caef (patch)
treed5d5d490a21fc631ebb0f9a9aafeb4c7f51584d1
parent7a480adafe1f1f8f5b764ad21a7f8e113c63cb1f (diff)
modern: link against libnosys
Without libnosys undefined references will occur if libc functions are used.
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c76c24a5d..33cde3a01 100644
--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,7 @@ CC1 = $(shell $(CC) --print-prog-name=cc1) -quiet
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -g
ROM := pokeemerald_modern.gba
OBJ_DIR := build/modern
-LIBPATH := -L "$(dir $(shell $(CC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(CC) -mthumb -print-file-name=libc.a))"
+LIBPATH := -L "$(dir $(shell $(CC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(CC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(CC) -mthumb -print-file-name=libc.a))"
endif
CPPFLAGS := -iquote include -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN)
@@ -82,7 +82,7 @@ endif
LDFLAGS = -Map ../../$(MAP)
-LIB := $(LIBPATH) -lc -lgcc -L../../libagbsyscall -lagbsyscall
+LIB := $(LIBPATH) -lc -lnosys -lgcc -L../../libagbsyscall -lagbsyscall
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
GFX := tools/gbagfx/gbagfx$(EXE)