File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,10 @@ $(BUILD_DIR)/src/code/fault_drawer.o: CFLAGS += -trapuv
425425$(BUILD_DIR ) /src/code/fault_drawer.o : OPTFLAGS := -O2 -g3
426426$(BUILD_DIR ) /src/code/ucode_disas.o : OPTFLAGS := -O2 -g3
427427
428+ ifeq ($(PLATFORM ) ,N64)
429+ $(BUILD_DIR ) /src/code/z_rumble.o : CFLAGS += -DNO_SQRTF_INTRINSIC
430+ endif
431+
428432ifeq ($(DEBUG ) ,1)
429433$(BUILD_DIR ) /src/libc/% .o : OPTFLAGS := -g
430434else
@@ -436,6 +440,10 @@ $(BUILD_DIR)/src/audio/%.o: OPTFLAGS := -O2
436440# Use signed chars instead of unsigned for this audio file (needed to match AudioDebug_ScrPrt)
437441$(BUILD_DIR ) /src/audio/general.o : CFLAGS += -signed
438442
443+ ifeq ($(PLATFORM ) ,N64)
444+ $(BUILD_DIR ) /src/audio/general.o : CFLAGS += -DNO_SQRTF_INTRINSIC
445+ endif
446+
439447# Put string literals in .data for some audio files (needed to match these files with literals)
440448$(BUILD_DIR ) /src/audio/sfx.o : CFLAGS += -use_readwrite_const
441449$(BUILD_DIR ) /src/audio/sequence.o : CFLAGS += -use_readwrite_const
Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ f32 fabsf(f32 f);
4242#endif
4343
4444f32 sqrtf (f32 f );
45- #ifdef __sgi
45+ // IDO has a sqrtf intrinsic, but in N64 versions it's not used for some files.
46+ // For these files we define NO_SQRTF_INTRINSIC to use the sqrtf function instead.
47+ #if defined(__sgi ) && !defined(NO_SQRTF_INTRINSIC )
4648#pragma intrinsic(sqrtf)
4749#endif
4850
You can’t perform that action at this time.
0 commit comments