Fix PPC build not actually working

This commit is contained in:
UnknownShadow200 2024-08-10 19:18:55 +10:00
parent 9dd2addba0
commit 5f937f6a06
2 changed files with 13 additions and 8 deletions

View File

@ -46,7 +46,7 @@ jobs:
ln -s /usr/local/compiler/ppc/target/bin/powerpc64-apple-darwin9-as /home/minty/repos/osxcross-ppc-test/target/bin/powerpc64-apple-darwin9-as
cd src
PATH=$PATH:/usr/local/compiler/ppc/target/bin
powerpc-apple-darwin9-base-gcc *.c Window_cocoa.m ${{ env.COMMON_FLAGS }} $LATEST_FLAG -o cc-mac32-ppc -mmacosx-version-min=10.3.0 -m32 -framework Cocoa -framework OpenGL -framework IOKit -lobjc
powerpc-apple-darwin9-base-gcc *.c Window_cocoa.m ${{ env.COMMON_FLAGS }} $LATEST_FLAG -o cc-mac32-ppc -mmacosx-version-min=10.2.0 -m32 -framework Cocoa -framework OpenGL -framework IOKit -lobjc
- uses: ./.github/actions/notify_failure

View File

@ -16,14 +16,19 @@ CC_BEGIN_HEADER
#define Math_Deg2Packed(x) ((cc_uint8)((x) * 256.0f / 360.0f))
#define Math_Packed2Deg(x) ((x) * 360.0f / 256.0f)
#if defined __GNUC__ && !defined CC_PLAT_PS1
/* fabsf/sqrtf are single intrinsic instructions in gcc/clang */
/* (sqrtf is only when -fno-math-errno though) */
#define Math_AbsF(x) __builtin_fabsf(x)
#define Math_SqrtF(x) __builtin_sqrtf(x)
#if defined __GNUC__ && defined __APPLE__ && defined _ARCH_PPC
/* fabsf is single intrinsic instructions in gcc/clang */
/* (sqrtf doesn't seem to exist in 10.3 and earlier SDKs) */
#define Math_AbsF(x) __builtin_fabsf(x)
#define Math_SqrtF(x) __builtin_sqrt(x)
#elif defined __GNUC__ && !defined CC_PLAT_PS1
/* fabsf/sqrtf are single intrinsic instructions in gcc/clang */
/* (sqrtf is only when -fno-math-errno though) */
#define Math_AbsF(x) __builtin_fabsf(x)
#define Math_SqrtF(x) __builtin_sqrtf(x)
#else
float Math_AbsF(float x);
float Math_SqrtF(float x);
float Math_AbsF(float x);
float Math_SqrtF(float x);
#endif
float Math_Mod1(float x);