EasyRPG / buildscripts

The scripts used to compile needed libraries for supported platform ports on our Jenkins server
https://ci.easyrpg.org/view/Toolchains/
Other
17 stars 18 forks source link

More updates #121

Closed Ghabry closed 3 years ago

carstene1ns commented 3 years ago

So cpufeatures again. I wonder if we are the only ones experiencing these crashes.

Ghabry commented 3 years ago

This crashes in pthread_once that is invoked by cpufeatures so it could be also some bug with the pthread runtime on old Android. Or some linknig problem like this "whole-archive" on Vita. (but pthread is part of libc on Android it seems)

Ghabry commented 3 years ago

https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/19 here is a discussion about cpufeatures hang on <4.3

They solved it by not using pixman anymore xD

Ghabry commented 3 years ago

hm just assuming NEON will actually not work for all devices, e.g. the Tegra2 does not support NEON but is armeabi-v7a.

Starting with Android 6.0 NEON is a requirement. I would just enable it and then lets see how many crash. Will be probably an extremely low number.

I will get our install base for Tegra2 ...

Ghabry commented 3 years ago

Patch is hard to read, this gives:

(tested on my 4.0.3 phone, works for me... but seems to have Neon :D)

#include <cpu-features.h>
#include <android/api-level.h>

static arm_cpu_features_t
detect_cpu_features (void)
{
    arm_cpu_features_t features = 0;
    AndroidCpuFamily cpu_family;
    uint64_t cpu_features;

    if (android_get_device_api_level() > 18)
    {
        cpu_family = android_getCpuFamily();
        cpu_features = android_getCpuFeatures();

        if (cpu_family == ANDROID_CPU_FAMILY_ARM)
        {
        if (cpu_features & ANDROID_CPU_ARM_FEATURE_ARMv7)
            features |= ARM_V7;

        if (cpu_features & ANDROID_CPU_ARM_FEATURE_VFPv3)
            features |= ARM_VFP;

        if (cpu_features & ANDROID_CPU_ARM_FEATURE_NEON)
            features |= ARM_NEON;
        }
    } else {
#if defined(__arm__) || defined(__aarch64__)
        features |= ARM_V7;
        features |= ARM_VFP;
        features |= ARM_NEON;
#endif
    }

    return features;
}
Ghabry commented 3 years ago

Updated fluidsynth and fixed ICU for vcpkg/windows.

Can be merged now :)