Skip to content

Commit

Permalink
gcc: select macOS aarch64 fork based on host arch rather than target
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien-Chouteau committed Jun 21, 2024
1 parent d481940 commit e143589
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions specs/common.anod
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ class Common(Anod):
if Env().main_options.enable_cleanup:
rm(self["BUILD_DIR"], recursive=True)
rm(self["SRC_DIR"], recursive=True)

@property
def host_is_macos_arm(self):
return self.env.host.os.name == "darwin" and self.env.host.cpu.name == "aarch64"
2 changes: 1 addition & 1 deletion specs/gcc.anod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GCC(spec("gh-artifact")):
url=(
"https://ftp.gnu.org/gnu/gcc/gcc-%s/%s"
% (self.version, self.tarball)
if self.env.target.cpu.name == "x86_64"
if not self.host_is_macos_arm
else
"https://github.com/iains/gcc-14-branch/archive/refs/"
+ "tags/gcc-14.1-darwin-r1.tar.gz"
Expand Down

0 comments on commit e143589

Please sign in to comment.