Skip to content

Support for os.name=Linux, os.arch=aarch64 #219

@lanmaoxinqing

Description

@lanmaoxinqing

The os.arch system variable may be aarch64 in some linux arm64 machines like below and OSInfo.java in native module doesn't recognize it.

$ uname -a
Linux xxx xxx.aarch64 #1 SMP Fri Aug 9 04:09:13 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

caused by

    public static String getArchName() {
        String osArch = System.getProperty("os.arch");
        // For Android
        if (isAndroid()) {
            return "android-arm";
        }

        if (osArch.startsWith("arm")) {    //  <-- linux arch named `aarch64` can not go into this
            osArch = resolveArmArchType();
        } else {
            String lc = osArch.toLowerCase(Locale.US);
            if (archMapping.containsKey(lc))
                return archMapping.get(lc);
        }
        return translateArchNameToFolderName(osArch);
    }

And arm64 and aarch64 should be same according to differences-between-arm64-and-aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions