Skip to content

Commit c16865f

Browse files
committed
Add GCCBootstrapMacOS
It turns out that to build `GCC` for macOS in the streamlined fashion that I wish to do in the `GCC` recipe here, we need a bootstrapped GCC targeting macOS first (you can't use `clang`). So.... we build one here, re-using as much from our `GCC` recipe as possible.
1 parent 51e3cca commit c16865f

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using BinaryBuilder2
2+
3+
include("../GCC/gcc_common.jl")
4+
5+
for version in (v"14.2.0",)
6+
build_tarballs(;
7+
src_name = "GCCBootstrapMacOS",
8+
src_version = version,
9+
sources = [
10+
gcc_version_sources[version]...,
11+
DirectorySource("./patches-v$(version)"; follow_symlinks=true, target="patches"),
12+
],
13+
script = string(
14+
"""
15+
# By setting `GCC_ENABLE_BOOTSTRAP=true`, we opt-in to
16+
# a bootstrapped GCC build and disable trying to use the target CToolchain
17+
GCC_ENABLE_BOOTSTRAP=true
18+
""",
19+
script,
20+
),
21+
platforms = [
22+
CrossPlatform(Platform(arch(HostPlatform()), "linux") => Platform("aarch64", "macos")),
23+
CrossPlatform(Platform(arch(HostPlatform()), "linux") => Platform("x86_64", "macos")),
24+
],
25+
products = [
26+
FileProduct("bin", :bindir),
27+
ExecutableProduct("\${target}-gcc", :gcc),
28+
ExecutableProduct("\${target}-g++", :gxx),
29+
],
30+
build_spec_generator = gcc_build_spec_generator,
31+
meta,
32+
duplicate_extraction_handling = :ignore_all,
33+
)
34+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../GCC/patches-v14.2.0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../GCC/patches-v9.4.0

0 commit comments

Comments
 (0)