Skip to content

Commit

Permalink
avoid appending -m64 to CXXFLAGS for riscv
Browse files Browse the repository at this point in the history
gcc for riscv does not have this flag
  • Loading branch information
alexfanqi authored and brandonwillard committed Oct 19, 2021
1 parent fa40b9b commit e6c2fbc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aesara/link/c/cmodule.py
Expand Up @@ -2304,11 +2304,11 @@ def join_options(init_part):

# Figure out whether the current Python executable is 32
# or 64 bit and compile accordingly. This step is ignored for
# ARM (32-bit and 64-bit) architectures in order to make
# ARM (32-bit and 64-bit) and RISC-V architectures in order to make
# Aesara compatible with the Raspberry Pi, Raspberry Pi 2, or
# other systems with ARM processors.
if not any(["arm" in flag for flag in cxxflags]) and not any(
arch in platform.machine() for arch in ["arm", "aarch"]
# other systems with ARM or RISC-V processors.
if (not any("arm" in flag or "riscv" in flag for flag in cxxflags)) and (
not any(arch in platform.machine() for arch in ("arm", "aarch", "riscv"))
):
n_bits = LOCAL_BITWIDTH
cxxflags.append(f"-m{int(n_bits)}")
Expand Down

0 comments on commit e6c2fbc

Please sign in to comment.