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

Add support for FreeBSD AArch64 #387

Merged
merged 5 commits into from
Sep 7, 2024
Merged

Add support for FreeBSD AArch64 #387

merged 5 commits into from
Sep 7, 2024

Conversation

ararslan
Copy link
Member

Accompanying Yggdrasil PR: JuliaPackaging/Yggdrasil#9220

I'll flip this out of draft mode once all compilers have been built.

@giordano
Copy link
Member

With reference to JuliaPackaging/Yggdrasil#9220 (comment), for gcc I was thinking of

function find_shard(name, version, archive_type; target = nothing)
# aarch64-apple-darwin is a special platform because it has a single GCCBootstrap
# with a version number different from any other platforms: match this shard with a
# regular GCCBootstrap v11 for the host.
if name == "GCCBootstrap" && version == v"12.0.1-iains" && target !== nothing && Sys.islinux(target)
version = v"12.1.0"
end
but that was specific to aarch64-darwin where we have a different toolchain version number under the hood (the user doesn't need to know it), but this may just work for aarch64-freebsd
for cs in all_compiler_shards()
if cs.name == name && cs.version == version &&
(target === nothing || platforms_match(cs.target, target)) &&
cs.archive_type == archive_type
return cs
end
end
return nothing

However, if we only have GCC >= 7, you probably need to adapt

# If this is an platform that has limited GCC support (such as aarch64-apple-darwin),
# the libgfortran versions we can expand to are similarly limited.
local libgfortran_versions
if Sys.isapple(platform) && arch(platform) == "aarch64"
libgfortran_versions = [v"5"]
else
libgfortran_versions = [v"3", v"4", v"5"]
end
gcc 7 has libgfortran v4, so you have to exclude v3

At the moment, we only have GCC 7+ on FreeBSD AArch64, which means we
only want `expand_gfortran_versions` to include libgfortran versions 4
and 5 on that platform.
@giordano
Copy link
Member

Reminder: you'll need to add aarch64-freebsd to the list of platforms incompatible with Julia v1.5 at https://github.com/JuliaPackaging/BinaryBuilder.jl/blob/8aadff4c54e12a31fe605defd81d99da78c60af2/src/AutoBuild.jl#L199

@ararslan
Copy link
Member Author

Ah thank you! PR: JuliaPackaging/BinaryBuilder.jl#1342

@ararslan
Copy link
Member Author

I also bumped the version so that we can tag a new release.

@ararslan ararslan requested a review from giordano August 31, 2024 22:07
@ararslan ararslan merged commit b77c32e into master Sep 7, 2024
7 checks passed
@ararslan ararslan deleted the aa/freebsd-aarch64 branch September 7, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants