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

syslibroot for macOS needs to be manually fixed also for GCC v5 #630

Closed
wants to merge 2 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
4 changes: 2 additions & 2 deletions src/Runner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function generate_compiler_wrappers!(platform::Platform; bin_path::AbstractStrin

# On macOS, if we're on an old GCC, the default -syslibroot that gets
# passed to the linker isn't calculated correctly, so we have to manually set it.
if select_gcc_version(p).major == 4
if select_gcc_version(p).major in (4, 5)
FLAGS *= " -Wl,-syslibroot,/opt/$(aatriplet(p))/$(aatriplet(p))/sys-root"
end
return FLAGS
Expand All @@ -212,7 +212,7 @@ function generate_compiler_wrappers!(platform::Platform; bin_path::AbstractStrin

# On macOS, if we're on an old GCC, the default -syslibroot that gets
# passed to the linker isn't calculated correctly, so we have to manually set it.
if select_gcc_version(p).major == 4
if select_gcc_version(p).major in (4, 5)
FLAGS *= " -Wl,-syslibroot,/opt/$(aatriplet(p))/$(aatriplet(p))/sys-root"
end
return FLAGS
Expand Down
3 changes: 2 additions & 1 deletion test/building.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ end
shards_to_test = expand_cxxstring_abis(expand_gfortran_versions(shards_to_test))

# Perform a sanity test on each and every shard.
@testset "Shard testsuites" begin
@testset "Shard testsuites, preferred GCC: v$(gcc_version)" for gcc_version in (v"4", v"5")
mktempdir() do build_path
products = Product[
ExecutableProduct("hello_world_c", :hello_world_c),
Expand Down Expand Up @@ -164,6 +164,7 @@ shards_to_test = expand_cxxstring_abis(expand_gfortran_versions(shards_to_test))
[];
# We need to be able to build go and rust and whatnot
compilers=[:c, :go, :rust],
preferred_gcc_version = gcc_version,
)

# Test that we built everything (I'm not entirely sure how I expect
Expand Down