1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 23:36:22 +00:00

Add NO_SQRTF_INTRINSIC for z_rumble.c and audio/general.c (#2067)

This commit is contained in:
cadmic 2024-08-23 00:11:41 -07:00 committed by GitHub
parent 98ba7ad2ab
commit c38adc1036
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -425,6 +425,10 @@ $(BUILD_DIR)/src/code/fault_drawer.o: CFLAGS += -trapuv
$(BUILD_DIR)/src/code/fault_drawer.o: OPTFLAGS := -O2 -g3
$(BUILD_DIR)/src/code/ucode_disas.o: OPTFLAGS := -O2 -g3
ifeq ($(PLATFORM),N64)
$(BUILD_DIR)/src/code/z_rumble.o: CFLAGS += -DNO_SQRTF_INTRINSIC
endif
ifeq ($(DEBUG),1)
$(BUILD_DIR)/src/libc/%.o: OPTFLAGS := -g
else
@ -436,6 +440,10 @@ $(BUILD_DIR)/src/audio/%.o: OPTFLAGS := -O2
# Use signed chars instead of unsigned for this audio file (needed to match AudioDebug_ScrPrt)
$(BUILD_DIR)/src/audio/general.o: CFLAGS += -signed
ifeq ($(PLATFORM),N64)
$(BUILD_DIR)/src/audio/general.o: CFLAGS += -DNO_SQRTF_INTRINSIC
endif
# Put string literals in .data for some audio files (needed to match these files with literals)
$(BUILD_DIR)/src/audio/sfx.o: CFLAGS += -use_readwrite_const
$(BUILD_DIR)/src/audio/sequence.o: CFLAGS += -use_readwrite_const

View file

@ -42,7 +42,9 @@ f32 fabsf(f32 f);
#endif
f32 sqrtf(f32 f);
#ifdef __sgi
// IDO has a sqrtf intrinsic, but in N64 versions it's not used for some files.
// For these files we define NO_SQRTF_INTRINSIC to use the sqrtf function instead.
#if defined(__sgi) && !defined(NO_SQRTF_INTRINSIC)
#pragma intrinsic(sqrtf)
#endif