diff --git a/Project.toml b/Project.toml index 1b247ac21..3dcc58db7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "BinaryBuilder" uuid = "12aac903-9f7c-5d81-afc2-d9565ea332ae" authors = ["Elliot Saba "] -version = "0.6.0" +version = "0.6.1" [deps] ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" @@ -33,7 +33,7 @@ ghr_jll = "07c12ed4-43bc-5495-8a2a-d5838ef8d533" [compat] ArgParse = "1.1" -BinaryBuilderBase = "1.31" +BinaryBuilderBase = "1.33" Downloads = "1" GitHub = "5.1" HTTP = "0.8, 0.9, 1" @@ -41,7 +41,7 @@ JLD2 = "0.1.6, 0.2, 0.3, 0.4, 0.5" JLLWrappers = "1.2.0" JSON = "0.21" LoggingExtras = "0.4, 1" -ObjectFile = "0.4" +ObjectFile = "0.4.3" OutputCollectors = "0.1" PkgLicenses = "0.2" Registrator = "1.1" @@ -49,7 +49,7 @@ RegistryTools = "2.1" SHA = "0.7, 1" Scratch = "1.0" TOML = "1" -ghr_jll = "0.13, 0.14" +ghr_jll = "0.13, 0.14, 0.17" julia = "1.7" [extras] diff --git a/src/auditor/dynamic_linkage.jl b/src/auditor/dynamic_linkage.jl index b1fa3aa69..1c91072a7 100644 --- a/src/auditor/dynamic_linkage.jl +++ b/src/auditor/dynamic_linkage.jl @@ -15,6 +15,7 @@ function platform_for_object(oh::ObjectHandle) ELF.EM_X86_64 => "x86_64", ELF.EM_AARCH64 => "aarch64", ELF.EM_PPC64 => "powerpc64le", + ELF.EM_RISCV => "riscv64", # Could also be riscv32; should check ELF_CLASS ELF.EM_ARM => "arm", ) mach = oh.header.e_machine @@ -120,6 +121,9 @@ function is_for_platform(h::ObjectHandle, platform::AbstractPlatform) return m == ELF.EM_AARCH64 elseif arch(platform) == "powerpc64le" return m == ELF.EM_PPC64 + elseif arch(platform) == "riscv64" + # Could also be riscv32; should check ELF_CLASS + return m == ELF.EM_RISCV elseif arch(platform) ∈ ("armv7l", "armv6l") return m == ELF.EM_ARM else @@ -326,6 +330,7 @@ function patchelf_flags(p::AbstractPlatform) flags = [] # ppc64le and aarch64 have 64KB page sizes, don't muck up the ELF section load alignment + # TODO: What is the riscv64 page size? if arch(p) in ("powerpc64le", "aarch64") append!(flags, ["--page-size", "65536"]) end diff --git a/src/auditor/instruction_set.jl b/src/auditor/instruction_set.jl index 07beb52c4..550c04fa7 100644 --- a/src/auditor/instruction_set.jl +++ b/src/auditor/instruction_set.jl @@ -121,6 +121,8 @@ function minimum_march(counts::Dict, p::AbstractPlatform) # TODO: Detect NEON and vfpv4 instructions elseif arch(p) == "powerpc64le" # TODO Detect POWER9/10 instructions + elseif arch(p) == "riscv64" + # TODO end return generic_march(p) end diff --git a/src/wizard/interactive_build.jl b/src/wizard/interactive_build.jl index e55cfa0fa..b939dc275 100644 --- a/src/wizard/interactive_build.jl +++ b/src/wizard/interactive_build.jl @@ -467,7 +467,7 @@ Pick the first platform for use to run on. We prefer Linux x86_64 because that's generally the host platform, so it's usually easiest. After that we go by the following preferences: * OS (in order): Linux, Windows, OSX -* Architecture: x86_64, i686, aarch64, powerpc64le, armv7l +* Architecture: x86_64, i686, aarch64, powerpc64le, armv7l, riscv64 * The first remaining after this selection """ function pick_preferred_platform(platforms) @@ -480,7 +480,7 @@ function pick_preferred_platform(platforms) platforms = plats end end - for a in ("x86_64", "i686", "aarch64", "powerpc64le", "armv7l") + for a in ("x86_64", "i686", "aarch64", "powerpc64le", "armv7l", "riscv64") plats = filter(p->arch(p) == a, platforms) if !isempty(plats) platforms = plats