From d4d7512cb6c4560a61cc6b7d036c4b46a6fc3a19 Mon Sep 17 00:00:00 2001 From: cadmic Date: Thu, 25 Apr 2024 04:10:31 -0700 Subject: [PATCH] Force string.o to be in boot for gcc builds (#1948) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In retail builds, memcpy is linked in code, not boot, but GCC likes to call memcpy when copying structs so currently GCC builds immediately crash in __osInitialize_common. --- spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec b/spec index 349060f28e..a0f411d40e 100644 --- a/spec +++ b/spec @@ -66,7 +66,7 @@ beginseg #endif include "$(BUILD_DIR)/src/libultra/os/unmaptlball.o" include "$(BUILD_DIR)/src/libultra/io/epidma.o" -#if OOT_DEBUG +#if OOT_DEBUG || COMPILER_GCC include "$(BUILD_DIR)/src/libultra/libc/string.o" #endif include "$(BUILD_DIR)/src/libultra/os/invalicache.o" @@ -532,6 +532,8 @@ beginseg include "$(BUILD_DIR)/src/libultra/gu/lookathil.o" #if !OOT_DEBUG include "$(BUILD_DIR)/src/libultra/libc/xprintf.o" +#endif +#if !OOT_DEBUG && !COMPILER_GCC include "$(BUILD_DIR)/src/libultra/libc/string.o" #endif include "$(BUILD_DIR)/src/libultra/io/sp.o"