Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross compile new #116

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions openblas-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ readme = "../README.md"
exclude = ["test_build/"]

[dependencies]
anyhow = "1.0.68"
flate2 = "1.0.25"
tar = "0.4.38"
thiserror = "1.0.22"
ureq = { version = "2.5.0", default-features = false, features = [
anyhow = "1.0.79"
flate2 = "1.0.28"
tar = "0.4.40"
thiserror = "1.0.56"
ureq = { version = "2.9.1", default-features = false, features = [
"native-certs",
"native-tls",
"gzip",
] }
native-tls = { version = "0.2.11" }
walkdir = "2.3.1"
walkdir = "2.4.0"
31 changes: 28 additions & 3 deletions openblas-build/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@
EV4,
EV5,
EV6,

// CSKY
CSKY,
CK860FV,
}

impl FromStr for Target {
Expand Down Expand Up @@ -259,23 +263,44 @@
"zarch_generic" => Self::ZARCH_GENERIC,
"z13" => Self::Z13,
"z14" => Self::Z14,

// RISC-V 64:
"riscv_generic" => Self::RISCV64_GENERIC,
"c910v" => Self::C910V,

// LOONGARCH64:
"loongsongeneric" => Self::LOONGSONGENERIC,
"longson3r5" => Self::LOONGSON3R5,
"longson2k1000" => Self::LOONGSON2K1000,

// Elbrus E2000:
"e2k" => Self::E2K,

// Alpha
"ev4" => Self::EV4,
"ev5" => Self::EV5,
"ev6" => Self::EV6,

// CSKY
"csky" => Self::CSKY,
"ck860fv" => Self::CK860FV,

// RISC-V 64:
"riscv64_generic" => Self::RISCV64_GENERIC,
"c910v" => Self::C910V,

Check warning on line 290 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (system)

unreachable pattern

Check warning on line 290 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows)

unreachable pattern

Check warning on line 290 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos

unreachable pattern

Check warning on line 290 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (static)

unreachable pattern

Check warning on line 290 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable pattern

Check warning on line 290 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows-static)

unreachable pattern

// LOONGARCH64:
"loongsongeneric" => Self::LOONGSONGENERIC,

Check warning on line 293 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (system)

unreachable pattern

Check warning on line 293 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows)

unreachable pattern

Check warning on line 293 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos

unreachable pattern

Check warning on line 293 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (static)

unreachable pattern

Check warning on line 293 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable pattern

Check warning on line 293 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows-static)

unreachable pattern
"loongson3r5" => Self::LOONGSON3R5,
"loongson2k1000" => Self::LOONGSON2K1000,

// Elbrus E2000:
"e2k" => Self::E2K,

Check warning on line 298 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (system)

unreachable pattern

Check warning on line 298 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows)

unreachable pattern

Check warning on line 298 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos

unreachable pattern

Check warning on line 298 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (static)

unreachable pattern

Check warning on line 298 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable pattern

Check warning on line 298 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows-static)

unreachable pattern

// Alpha
"ev4" => Self::EV4,

Check warning on line 301 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (system)

unreachable pattern

Check warning on line 301 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows)

unreachable pattern

Check warning on line 301 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos

unreachable pattern

Check warning on line 301 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (static)

unreachable pattern

Check warning on line 301 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable pattern

Check warning on line 301 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows-static)

unreachable pattern
"ev5" => Self::EV5,

Check warning on line 302 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (system)

unreachable pattern

Check warning on line 302 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows)

unreachable pattern

Check warning on line 302 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos

unreachable pattern

Check warning on line 302 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (static)

unreachable pattern

Check warning on line 302 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable pattern

Check warning on line 302 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows-static)

unreachable pattern
"ev6" => Self::EV6,

Check warning on line 303 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (system)

unreachable pattern

Check warning on line 303 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows)

unreachable pattern

Check warning on line 303 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos

unreachable pattern

Check warning on line 303 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / macos (static)

unreachable pattern

Check warning on line 303 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

unreachable pattern

Check warning on line 303 in openblas-build/src/build.rs

View workflow job for this annotation

GitHub Actions / windows-msvc (x64-windows-static)

unreachable pattern

_ => {
return Err(Error::UnsupportedTarget {
Expand Down Expand Up @@ -449,9 +474,9 @@
}

// Do not build if libraries and Makefile.conf already exist and are valid
if let Ok(deliv) = self.inspect(out_dir) {
return Ok(deliv);
}
// if let Ok(deliv) = self.inspect(out_dir) {
// return Ok(deliv);
// }

// Copy OpenBLAS sources from this crate to `out_dir`
let root = openblas_root.as_ref();
Expand Down
12 changes: 7 additions & 5 deletions openblas-build/src/download.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
use anyhow::Result;
use std::path::{Path, PathBuf};

const OPENBLAS_VERSION: &str = "0.3.25";
const OPENBLAS_VERSION: &str = "csky-support";


pub fn openblas_source_url() -> String {
format!(
"https://github.com/xianyi/OpenBLAS/releases/download/v{}/OpenBLAS-{}.tar.gz",
OPENBLAS_VERSION, OPENBLAS_VERSION
)
// format!(
// "https://github.com/OpenMathLib/OpenBLAS/releases/download/v{}/OpenBLAS-{}.tar.gz",
// OPENBLAS_VERSION, OPENBLAS_VERSION
// )
"https://codeload.github.com/Dirreke/OpenBLAS/tar.gz/refs/heads/csky-support".to_string()
}

pub fn download(out_dir: &Path) -> Result<PathBuf> {
Expand Down
2 changes: 1 addition & 1 deletion openblas-src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ system = []
libc = "0.2"

[build-dependencies]
dirs = "3.0.1"
dirs = "5.0.1"
openblas-build = { version = "0.10.9", path = "../openblas-build" }

[target.'cfg(target_os="windows")'.build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion openblas-src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@
}

let output = if feature_enabled("cache") {
use std::{collections::hash_map::DefaultHasher, hash::*};

Check warning on line 143 in openblas-src/build.rs

View workflow job for this annotation

GitHub Actions / clippy

the item `DefaultHasher` is imported redundantly
// Build OpenBLAS on user's data directory.
// See https://docs.rs/dirs/3.0.1/dirs/fn.data_dir.html
// See https://docs.rs/dirs/5.0.1/dirs/fn.data_dir.html
//
// On Linux, `data_dir` returns `$XDG_DATA_HOME` or `$HOME/.local/share`.
// This build script creates a directory based on the hash value of `cfg`,
Expand Down
Loading