public static CPUArch getCPUArchFromGNUString ( String gnuString ) { final String nativeCpu = gnuString . toLowerCase ( ) ; final CPUArch nativeArch ; // then the native arch if ( nativeCpu . startsWith ( "x86_64" ) || nativeCpu . startsWith ( "amd64" ) || nativeCpu . startsWith ( "ia64" ) ) nativeArch = CPUArch . X86_64 ; else if ( nativeCpu . startsWith ( "ppc64" ) || nativeCpu . startsWith ( "powerpc64" ) ) nativeArch = CPUArch . PPC64 ; else if ( nativeCpu . startsWith ( "ppc" ) || nativeCpu . startsWith ( "powerpc" ) ) nativeArch = CPUArch . PPC ; else if ( nativeCpu . contains ( "86" ) ) nativeArch = CPUArch . X86 ; else nativeArch = CPUArch . UNKNOWN ; return nativeArch ; }
Return a CPUArch from parsing a GNU autoconf triple .