Merge pull request #1654 from shenki/rocket-cva6-csr

cpu: rocket, cva6: Fix compilation with newer binutils
This commit is contained in:
enjoy-digital 2023-03-22 09:27:49 +01:00 committed by GitHub
commit 6b362969e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 17 deletions

View File

@ -31,7 +31,7 @@ GCC_FLAGS = {
# ||||/--- Single-Precision Floating-Point # ||||/--- Single-Precision Floating-Point
# |||||/-- Double-Precision Floating-Point # |||||/-- Double-Precision Floating-Point
# imacfd # imacfd
"standard": "-march=rv64imac -mabi=lp64 ", "standard": "-march=rv64i2p0_mac -mabi=lp64 ",
"full": "-march=rv64gc -mabi=lp64 ", "full": "-march=rv64gc -mabi=lp64 ",
} }

View File

@ -67,21 +67,21 @@ CPU_VARIANTS = {
# GCC Flags----------------------------------------------------------------------------------------- # GCC Flags-----------------------------------------------------------------------------------------
GCC_FLAGS = { GCC_FLAGS = {
"standard" : "-march=rv64imac -mabi=lp64 ", "standard" : "-march=rv64i2p0_mac -mabi=lp64 ",
"linux" : "-march=rv64imac -mabi=lp64 ", "linux" : "-march=rv64i2p0_mac -mabi=lp64 ",
"linux4" : "-march=rv64imac -mabi=lp64 ", "linux4" : "-march=rv64i2p0_mac -mabi=lp64 ",
"linuxd" : "-march=rv64imac -mabi=lp64 ", "linuxd" : "-march=rv64i2p0_mac -mabi=lp64 ",
"linux2d" : "-march=rv64imac -mabi=lp64 ", "linux2d" : "-march=rv64i2p0_mac -mabi=lp64 ",
"linuxq" : "-march=rv64imac -mabi=lp64 ", "linuxq" : "-march=rv64i2p0_mac -mabi=lp64 ",
"linux2q" : "-march=rv64imac -mabi=lp64 ", "linux2q" : "-march=rv64i2p0_mac -mabi=lp64 ",
"full" : "-march=rv64imafdc -mabi=lp64 ", "full" : "-march=rv64i2p0_mafdc -mabi=lp64 ",
"fulld" : "-march=rv64imafdc -mabi=lp64 ", "fulld" : "-march=rv64i2p0_mafdc -mabi=lp64 ",
"full4d" : "-march=rv64imafdc -mabi=lp64 ", "full4d" : "-march=rv64i2p0_mafdc -mabi=lp64 ",
"fullq" : "-march=rv64imafdc -mabi=lp64 ", "fullq" : "-march=rv64i2p0_mafdc -mabi=lp64 ",
"full4q" : "-march=rv64imafdc -mabi=lp64 ", "full4q" : "-march=rv64i2p0_mafdc -mabi=lp64 ",
"fullo" : "-march=rv64imafdc -mabi=lp64 ", "fullo" : "-march=rv64i2p0_mafdc -mabi=lp64 ",
"full4o" : "-march=rv64imafdc -mabi=lp64 ", "full4o" : "-march=rv64i2p0_mafdc -mabi=lp64 ",
"full8o" : "-march=rv64imafdc -mabi=lp64 ", "full8o" : "-march=rv64i2p0_mafdc -mabi=lp64 ",
} }
# CPU Params ---------------------------------------------------------------------------------- # CPU Params ----------------------------------------------------------------------------------
@ -146,7 +146,7 @@ class Rocket(CPU):
@property @property
def gcc_flags(self): def gcc_flags(self):
flags = "-mno-save-restore " flags = "-mno-save-restore "
flags += f"-march={self.get_arch(self.variant)} -mabi=lp64 " flags += GCC_FLAGS[self.variant]
flags += "-D__rocket__ " flags += "-D__rocket__ "
flags += "-mcmodel=medany" flags += "-mcmodel=medany"
return flags return flags