提交 e6c2fbc9 authored 作者: Alex Fan's avatar Alex Fan 提交者: Brandon T. Willard

avoid appending -m64 to CXXFLAGS for riscv

gcc for riscv does not have this flag
上级 fa40b9bc
......@@ -2304,11 +2304,11 @@ class GCC_compiler(Compiler):
# 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)}")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论