MCPcopy Index your code
hub / github.com/java-native-access/jna / getMultiArchPath

Method getMultiArchPath

src/com/sun/jna/NativeLibrary.java:991–1013  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

989 }
990
991 private static String getMultiArchPath() {
992 String cpu = Platform.ARCH;
993 String kernel = Platform.iskFreeBSD()
994 ? "-kfreebsd"
995 : (Platform.isGNU() ? "" : "-linux");
996 String libc = "-gnu";
997
998 if (Platform.isIntel()) {
999 cpu = (Platform.is64Bit() ? "x86_64" : "i386");
1000 }
1001 else if (Platform.isPPC()) {
1002 cpu = (Platform.is64Bit() ? "powerpc64" : "powerpc");
1003 }
1004 else if (Platform.isARM()) {
1005 cpu = "arm";
1006 libc = "-gnueabi";
1007 }
1008 else if (Platform.ARCH.equals("mips64el")) {
1009 libc = "-gnuabi64";
1010 }
1011
1012 return cpu + kernel + libc;
1013 }
1014
1015 /**
1016 * Get the library paths from ldconfig cache. Tested against ldconfig 2.13.

Callers 1

NativeLibraryClass · 0.95

Calls 7

iskFreeBSDMethod · 0.95
isGNUMethod · 0.95
isIntelMethod · 0.95
is64BitMethod · 0.95
isPPCMethod · 0.95
isARMMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected