mirror of
https://github.com/zeldaret/oot.git
synced 2025-01-14 12:17:08 +00:00
[iQue] Define EGCS macro instead of relying on __GNUC__
(#2423)
* [iQue] Define EGCS macro instead of relying on __GNUC__ * Revert longlong.h
This commit is contained in:
parent
dbfa95fd01
commit
bdc6b50153
7 changed files with 15 additions and 21 deletions
4
Makefile
4
Makefile
|
@ -376,10 +376,10 @@ else
|
|||
# compiler does support but warns for their usage).
|
||||
CFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -non_shared -fullwarn -verbose -Xcpluscomm $(INC) -Wab,-r4300_mul -woff 516,609,649,838,712,807
|
||||
CCASFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -non_shared -fullwarn -verbose -Xcpluscomm $(INC) -Wab,-r4300_mul -woff 516,609,649,838,712,807 -o32
|
||||
EGCS_CFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -G 0 -nostdinc $(INC) -mcpu=vr4300 -mabi=32 -mgp32 -mfp32 -fno-PIC
|
||||
MIPS_VERSION := -mips2
|
||||
|
||||
EGCS_CCASFLAGS := -Wall -nostdinc $(CPP_DEFINES) $(INC) -c -G 0 -Wa,-irix-symtab -D_ABIO32=1 -D_ABI64=3 -D_MIPS_SIM_ABI64=_ABI64 -D_MIPS_SIM_ABI32=_ABIO32 -DMIPSEB -D_LANGUAGE_ASSEMBLY -mabi=32 -fno-PIC -non_shared -mcpu=4300 -mfix4300
|
||||
EGCS_CFLAGS += $(CPP_DEFINES) $(GBI_DEFINES) -DEGCS -G 0 -nostdinc $(INC) -mcpu=vr4300 -mabi=32 -mgp32 -mfp32 -fno-PIC
|
||||
EGCS_CCASFLAGS := -Wall -nostdinc $(CPP_DEFINES) -DEGCS $(INC) -c -G 0 -Wa,-irix-symtab -D_ABIO32=1 -D_ABI64=3 -D_MIPS_SIM_ABI64=_ABI64 -D_MIPS_SIM_ABI32=_ABIO32 -DMIPSEB -D_LANGUAGE_ASSEMBLY -mabi=32 -fno-PIC -non_shared -mcpu=4300 -mfix4300
|
||||
EGCS_ASOPTFLAGS :=
|
||||
endif
|
||||
|
||||
|
|
|
@ -1,16 +1,7 @@
|
|||
#ifndef STDARG_H
|
||||
#define STDARG_H
|
||||
|
||||
// When building with modern GCC, use the official vaarg macros to avoid warnings and possibly bad codegen.
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
|
||||
#define va_list __builtin_va_list
|
||||
#define va_start __builtin_va_start
|
||||
#define va_arg __builtin_va_arg
|
||||
#define va_end __builtin_va_end
|
||||
|
||||
#elif defined(__sgi) /* IDO */
|
||||
#if defined(__sgi) /* IDO */
|
||||
|
||||
#ifndef _VA_LIST_
|
||||
# define _VA_LIST_
|
||||
|
@ -52,7 +43,7 @@ typedef char* va_list;
|
|||
/* No cleanup processing is required for the end of a varargs list: */
|
||||
#define va_end(__list)
|
||||
|
||||
#else /* EGCS */
|
||||
#elif defined(EGCS) /* EGCS */
|
||||
|
||||
typedef char * __gnuc_va_list;
|
||||
|
||||
|
@ -75,6 +66,14 @@ typedef char * __gnuc_va_list;
|
|||
|
||||
typedef __gnuc_va_list va_list;
|
||||
|
||||
#else /* Modern GCC */
|
||||
|
||||
// When building with modern GCC, use the official vaarg macros to avoid warnings and possibly bad codegen.
|
||||
#define va_list __builtin_va_list
|
||||
#define va_start __builtin_va_start
|
||||
#define va_arg __builtin_va_arg
|
||||
#define va_end __builtin_va_end
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -52,10 +52,10 @@
|
|||
|
||||
#if DEBUG_FEATURES
|
||||
#define PRINTF osSyncPrintf
|
||||
#elif defined(EGCS)
|
||||
#define PRINTF(format, args...) while (0) osSyncPrintf(format, ##args)
|
||||
#elif IDO_PRINTF_WORKAROUND
|
||||
#define PRINTF(args) (void)0
|
||||
#elif defined(__GNUC__) && __GNUC__ < 3
|
||||
#define PRINTF(format, args...) while (0) osSyncPrintf(format, ##args)
|
||||
#else
|
||||
#define PRINTF(format, ...) (void)0
|
||||
#endif
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
#define AUDIO_PRINTF osSyncPrintf
|
||||
#elif IDO_PRINTF_WORKAROUND
|
||||
#define AUDIO_PRINTF(args) (void)0
|
||||
#elif defined(__GNUC__) && __GNUC__ < 3
|
||||
#define AUDIO_PRINTF(format, args...) (void)0
|
||||
#else
|
||||
#define AUDIO_PRINTF(format, ...) (void)0
|
||||
#endif
|
||||
|
|
|
@ -62,8 +62,6 @@ vs32 sSchedDebugPrintfEnabled = false;
|
|||
PRINTF
|
||||
#elif IDO_PRINTF_WORKAROUND
|
||||
#define SCHED_DEBUG_PRINTF(args) (void)0
|
||||
#elif defined(__GNUC__) && __GNUC__ < 3
|
||||
#define SCHED_DEBUG_PRINTF(format, args...) (void)0
|
||||
#else
|
||||
#define SCHED_DEBUG_PRINTF(format, ...) (void)0
|
||||
#endif
|
||||
|
|
|
@ -24,8 +24,6 @@ static s32 sCurCeilingBgId;
|
|||
PRINTF
|
||||
#elif IDO_PRINTF_WORKAROUND
|
||||
#define ACTOR_DEBUG_PRINTF(args) (void)0
|
||||
#elif defined(__GNUC__) && __GNUC__ < 3
|
||||
#define ACTOR_DEBUG_PRINTF(format, args...) (void)0
|
||||
#else
|
||||
#define ACTOR_DEBUG_PRINTF(format, ...) (void)0
|
||||
#endif
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
#define umul_ppmm(w1, w0, u, v) \
|
||||
__asm__("multu %2,%3" : "=l"((USItype)(w0)), "=h"((USItype)(w1)) : "d"((USItype)(u)), "d"((USItype)(v)))
|
||||
#else
|
||||
/* Non-matching version for modern GCC */
|
||||
#define umul_ppmm(w1, w0, u, v) \
|
||||
__asm__("multu %2,%3\n\t" \
|
||||
"mflo %0\n\t" \
|
||||
|
|
Loading…
Reference in a new issue