From 4cb25cda0737584a7b4fa72fc4031605c7f59e86 Mon Sep 17 00:00:00 2001 From: Simon Eriksson Date: Wed, 23 Oct 2024 23:25:50 +0200 Subject: [PATCH] Move threads.h to new newlib override folder searched before other includes --- Makefile | 3 ++- include/{ => newlib_overrides}/threads.h | 0 n64.mk | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename include/{ => newlib_overrides}/threads.h (100%) diff --git a/Makefile b/Makefile index ba97dc351..8244791d4 100755 --- a/Makefile +++ b/Makefile @@ -126,7 +126,6 @@ install: install-mk libdragon install -Cv -m 0644 include/mi.h $(INSTALLDIR)/mips64-elf/include/mi.h install -Cv -m 0644 include/interrupt.h $(INSTALLDIR)/mips64-elf/include/interrupt.h install -Cv -m 0644 include/kernel.h $(INSTALLDIR)/mips64-elf/include/kernel.h - install -Cv -m 0644 include/threads.h $(INSTALLDIR)/mips64-elf/include/threads.h install -Cv -m 0644 include/ksemaphore.h $(INSTALLDIR)/mips64-elf/include/ksemaphore.h install -Cv -m 0644 include/kqueue.h $(INSTALLDIR)/mips64-elf/include/kqueue.h install -Cv -m 0644 include/kirq.h $(INSTALLDIR)/mips64-elf/include/kirq.h @@ -212,6 +211,8 @@ install: install-mk libdragon install -Cv -m 0644 src/fatfs/ff.h $(INSTALLDIR)/mips64-elf/include/fatfs/ff.h install -Cv -m 0644 src/fatfs/ffconf.h $(INSTALLDIR)/mips64-elf/include/fatfs/ffconf.h install -Cv -m 0644 include/ioctl.h $(INSTALLDIR)/mips64-elf/include/ioctl.h + mkdir -p $(INSTALLDIR)/mips64-elf/include/newlib_overrides + install -Cv -m 0644 include/newlib_overrides/threads.h $(INSTALLDIR)/mips64-elf/include/newlib_overrides/threads.h clean: rm -f *.o *.a diff --git a/include/threads.h b/include/newlib_overrides/threads.h similarity index 100% rename from include/threads.h rename to include/newlib_overrides/threads.h diff --git a/n64.mk b/n64.mk index 43e8bca0b..c3826305d 100644 --- a/n64.mk +++ b/n64.mk @@ -55,7 +55,7 @@ N64_DSO = $(N64_BINDIR)/n64dso N64_DSOEXTERN = $(N64_BINDIR)/n64dso-extern N64_DSOMSYM = $(N64_BINDIR)/n64dso-msym -N64_C_AND_CXX_FLAGS = -march=vr4300 -mtune=vr4300 -I$(N64_INCLUDEDIR) -include ktls.h +N64_C_AND_CXX_FLAGS = -march=vr4300 -mtune=vr4300 -I$(N64_INCLUDEDIR)/newlib_overrides -I$(N64_INCLUDEDIR) -include ktls.h N64_C_AND_CXX_FLAGS += -falign-functions=32 # NOTE: if you change this, also change backtrace() in backtrace.c N64_C_AND_CXX_FLAGS += -ffunction-sections -fdata-sections -g -ffile-prefix-map="$(CURDIR)"=$(N64_BACKTRACE_FILE_PREFIX) N64_C_AND_CXX_FLAGS += -ffast-math -ftrapping-math -fno-associative-math