Skip to content

Commit

Permalink
Attempt fixing Mac+GCC12 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgerhardt committed Sep 15, 2024
1 parent be5e36a commit e4540af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builder/frameworks/_bare.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys

from SCons.Script import DefaultEnvironment

Expand All @@ -10,6 +11,11 @@
data_limit = 0 if mcu.startswith("ch32v0") else 8

machine_arch = str(board.get("build.march"))
# Mac is a special boy who needs special treatment...
IS_MAC = sys.platform.startswith("darwin")
is_gcc_12 = platform.get_package_version("toolchain-riscv").split(".")[1].startswith("12")
if IS_MAC and is_gcc_12:
machine_arch += "+zicsr"

env.Append(
ASFLAGS=[
Expand Down

0 comments on commit e4540af

Please sign in to comment.