diff --git a/config/config_cc.rb b/config/config_cc.rb index b7a1afd5..ff9de719 100644 --- a/config/config_cc.rb +++ b/config/config_cc.rb @@ -70,7 +70,20 @@ LDFLAGS += -G EOS when 'Windows' - if w64build? + case os_arch + when 'aarch64' + Path.check_cmd(WARM64_PREFIX + 'gcc', 'make', W64_PREFIX + 'ld') + Path.check_cmd('cygpath') + JblasConfig::CONFIG << < ['OS_NAME', 'OS_ARCH'] do if $opts.defined? :libpath CONFIG[:libpath] = $opts[:libpath].split(':') + elsif CONFIG['OS_NAME'] == 'Windows' + case CONFIG['OS_ARCH'] + when 'aarch64' + CONFIG[:libpath] = ['/clangarm64/lib'] + when 'amd64' + CONFIG[:libpath] = ['/mingw64/lib'] + else + CONFIG[:libpath] = ['/mingw32/lib'] + end + elsif CONFIG['OS_NAME'] == 'Mac\ OS\ X' + CONFIG[:libpath] = ['/opt/local/lib'] else - if CONFIG['OS_NAME'] == 'Mac\ OS\ X' - CONFIG[:libpath] = ['/opt/local/lib'] + #CONFIG[:libpath] = %w(/usr/lib /lib /usr/lib/sse2) + if CONFIG['OS_ARCH'] == 'aarch64' + CONFIG[:libpath] = %w(/usr/lib/aarch64-linux-gnu) else - #CONFIG[:libpath] = %w(/usr/lib /lib /usr/lib/sse2) - if CONFIG['OS_ARCH'] == 'aarch64' - CONFIG[:libpath] = %w(/usr/lib/aarch64-linux-gnu) - else - CONFIG[:libpath] = %w(/usr/lib/x86_64-linux-gnu) - end + CONFIG[:libpath] = %w(/usr/lib/x86_64-linux-gnu) end end ok(CONFIG[:libpath].inspect) @@ -182,6 +189,10 @@ libgfortran_path = %x(gfortran -print-file-name=libgfortran.a).strip puts "(#{libgfortran_path})" CONFIG['LOADLIBES'] += [libgfortran_path] + print "Looking for where libquadmath.a is... " + libgfortran_path = %x(gfortran -print-file-name=libquadmath.a).strip + puts "(#{libgfortran_path})" + CONFIG['LOADLIBES'] += [libgfortran_path] else CONFIG['LOADLIBES'] += ['-l:libgfortran.a'] end diff --git a/config/windows.rb b/config/windows.rb index b9dc0f75..36e0c0f8 100755 --- a/config/windows.rb +++ b/config/windows.rb @@ -35,8 +35,9 @@ require 'config/config' W64_PREFIX = 'x86_64-w64-mingw32-' -W32_PREFIX = 'i686-pc-mingw32-' +W32_PREFIX = 'i686-w64-mingw32-' +WARM64_PREFIX = 'aarch64-w64-mingw32-' -def w64build? - JblasConfig::CONFIG['OS_NAME'] == 'Windows' and JblasConfig::CONFIG['OS_ARCH'] == 'amd64' +def os_arch + JblasConfig::CONFIG['OS_ARCH'] end diff --git a/src/main/resources/lib/static/Mac OS X/aarch64/libjblas.jnilib b/src/main/resources/lib/static/Mac OS X/aarch64/libjblas.jnilib new file mode 100755 index 00000000..551c1b9d Binary files /dev/null and b/src/main/resources/lib/static/Mac OS X/aarch64/libjblas.jnilib differ diff --git a/src/main/resources/lib/static/Mac OS X/aarch64/libjblas_arch_flavor.jnilib b/src/main/resources/lib/static/Mac OS X/aarch64/libjblas_arch_flavor.jnilib new file mode 100755 index 00000000..59d26d3c Binary files /dev/null and b/src/main/resources/lib/static/Mac OS X/aarch64/libjblas_arch_flavor.jnilib differ diff --git a/src/main/resources/lib/static/Windows/aarch64/jblas.dll b/src/main/resources/lib/static/Windows/aarch64/jblas.dll new file mode 100644 index 00000000..615cfd5e Binary files /dev/null and b/src/main/resources/lib/static/Windows/aarch64/jblas.dll differ diff --git a/src/main/resources/lib/static/Windows/aarch64/jblas_arch_flavor.dll b/src/main/resources/lib/static/Windows/aarch64/jblas_arch_flavor.dll new file mode 100644 index 00000000..0e1e1889 Binary files /dev/null and b/src/main/resources/lib/static/Windows/aarch64/jblas_arch_flavor.dll differ