Skip to content

Commit

Permalink
Enable aarch64 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
FiloSottile committed Dec 10, 2023
1 parent 9be3f4b commit 0600b7c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-bottles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: push

jobs:
build-macos-bottles:
runs-on: macos-latest
runs-on: macos-13
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ based on [richfelker/musl-cross-make](https://github.com/richfelker/musl-cross-m
brew install filosottile/musl-cross/musl-cross
```

By default it will install a full cross compiler toolchain targeting musl Linux amd64.
By default it will install full cross compiler toolchains targeting musl Linux amd64 and arm64.

You can then use `x86_64-linux-musl-` versions of the tools to build for the target.
For example `x86_64-linux-musl-cc` will compile C code to run on musl Linux amd64.
You can then use `x86_64-linux-musl-` or `aarch64-linux-musl-` versions of the
tools to build for the target. For example `x86_64-linux-musl-cc` will compile C
code to run on musl Linux amd64.

The "musl" part of the target is important: the binaries will ONLY run on a
musl-based system, like Alpine. However, if you build them as static binaries by
Expand All @@ -34,14 +35,11 @@ linker = "x86_64-linux-musl-gcc"
Other architectures are supported. For example you can build a Raspberry Pi cross-compiler:

```
brew install filosottile/musl-cross/musl-cross --without-x86_64 --with-arm-hf
brew install filosottile/musl-cross/musl-cross --without-x86_64 --without-aarch64 --with-arm-hf
```

You can also use `--with-i486` (x86 32-bit), `--with-aarch64` (ARM 64-bit),
`--with-arm` (ARM soft-float), and many more.

(Note: a custom build takes around ten minutes per architecture on an M2.
The installed size is between 200MB and 300MB per architecture.)
The installed size is between 150MB and 300MB per architecture.)

If you encounter issues with a missing `musl-gcc` binary, the build system might
be [assuming the presence of the musl host compiler
Expand Down
4 changes: 2 additions & 2 deletions musl-cross.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ class MuslCross < Formula
homepage "https://github.com/richfelker/musl-cross-make"
url "https://github.com/richfelker/musl-cross-make/archive/refs/tags/v0.9.9.tar.gz"
sha256 "ff3e2188626e4e55eddcefef4ee0aa5a8ffb490e3124850589bcaf4dd60f5f04"
revision 1
revision 2
head "https://github.com/richfelker/musl-cross-make.git"

bottle do
root_url "https://f001.backblazeb2.com/file/filippo-public"
sha256 cellar: :any_skip_relocation, catalina: "d668fe23ce3a8812204656ddad44ffda599f1515b937879d2ed33f46ec877185"
end

option "with-aarch64", "Build cross-compilers targeting aarch64-linux-musl"
option "with-arm-hf", "Build cross-compilers targeting arm-linux-musleabihf"
option "with-arm", "Build cross-compilers targeting arm-linux-musleabi"
option "with-i486", "Build cross-compilers targeting i486-linux-musl"
Expand All @@ -26,6 +25,7 @@ class MuslCross < Formula
option "with-powerpc-sf", "Build cross-compilers targeting powerpc-linux-muslsf"
option "with-powerpc64", "Build cross-compilers targeting powerpc64-linux-musl"
option "with-powerpc64le", "Build cross-compilers targeting powerpc64le-linux-musl"
option "without-aarch64", "Do not build cross-compilers targeting aarch64-linux-musl"
option "without-x86_64", "Do not build cross-compilers targeting x86_64-linux-musl"

depends_on "gnu-sed" => :build
Expand Down

0 comments on commit 0600b7c

Please sign in to comment.