diff --git a/3ds/2_build_toolchain.sh b/3ds/2_build_toolchain.sh index 6a32662a5..4d945d617 100755 --- a/3ds/2_build_toolchain.sh +++ b/3ds/2_build_toolchain.sh @@ -37,6 +37,11 @@ if [ ! -f .patches-applied ]; then autoreconf -fi ) + # Enable pixman SIMD + (cd $PIXMAN_DIR + patch -Np1 < $SCRIPT_DIR/../shared/extra/pixman-simd.patch + ) + cp -rup icu icu-native # Disable pthread and other newlib issues patch -Np0 < $SCRIPT_DIR/icu59-3ds.patch diff --git a/shared/extra/pixman-simd.patch b/shared/extra/pixman-simd.patch new file mode 100644 index 000000000..fd75e2c92 --- /dev/null +++ b/shared/extra/pixman-simd.patch @@ -0,0 +1,34 @@ +diff -Naur pixman-0.36.0-orig/pixman/pixman-arm.c pixman-0.36.0/pixman/pixman-arm.c +--- pixman-0.36.0-orig/pixman/pixman-arm.c 2020-04-02 16:49:09.909533624 +0200 ++++ pixman-0.36.0/pixman/pixman-arm.c 2020-04-02 16:50:44.279533318 +0200 +@@ -176,6 +176,30 @@ + return features; + } + ++#elif defined (_3DS) /* 3DS homebrew (devkitARM) */ ++ ++static arm_cpu_features_t ++detect_cpu_features (void) ++{ ++ arm_cpu_features_t features = 0; ++ ++ features |= ARM_V6; ++ ++ return features; ++} ++ ++#elif defined (PSP2) || defined (__SWITCH__) /* Vita (VitaSDK) or Switch (devkitA64) homebrew */ ++ ++static arm_cpu_features_t ++detect_cpu_features (void) ++{ ++ arm_cpu_features_t features = 0; ++ ++ features |= ARM_NEON; ++ ++ return features; ++} ++ + #else /* Unknown */ + + static arm_cpu_features_t diff --git a/switch/2_build_toolchain.sh b/switch/2_build_toolchain.sh index cd6b943eb..cee0bb10f 100755 --- a/switch/2_build_toolchain.sh +++ b/switch/2_build_toolchain.sh @@ -37,6 +37,11 @@ if [ ! -f .patches-applied ]; then autoreconf -fi ) + # Enable pixman SIMD + (cd $PIXMAN_DIR + patch -Np1 < $SCRIPT_DIR/../shared/extra/pixman-simd.patch + ) + # disable libsamplerate examples and tests (cd $LIBSAMPLERATE_DIR perl -pi -e 's/examples tests//' Makefile.am diff --git a/vita/2_build_toolchain.sh b/vita/2_build_toolchain.sh index 4fabd9845..ae614ab50 100755 --- a/vita/2_build_toolchain.sh +++ b/vita/2_build_toolchain.sh @@ -31,6 +31,11 @@ if [ ! -f .patches-applied ]; then autoreconf -fi ) + # Enable pixman SIMD + (cd $PIXMAN_DIR + patch -Np1 < $SCRIPT_DIR/../shared/extra/pixman-simd.patch + ) + # Fix icu build # Custom patch because vita newlib provides pthread cp -rup icu icu-native