@@ -8,7 +8,6 @@ from rtconfig import RTT_ROOT
8
8
import sys
9
9
10
10
def generate_ldscript (input , output ):
11
-
12
11
if not os .path .exists (input ):
13
12
print ('Error: file' , input , 'not found' )
14
13
return
@@ -30,12 +29,20 @@ def generate_ldscript(input, output):
30
29
31
30
print (output , 'is generated from' , input )
32
31
33
-
34
32
sys .path = sys .path + [os .path .join (RTT_ROOT , 'tools' )]
35
33
from building import *
36
34
37
35
TARGET = 'rtthread.' + rtconfig .TARGET_EXT
38
36
37
+ # apply soft-FPU config
38
+ options = LocalOptions ("rtconfig.h" )
39
+ soft_fpu = GetLocalDepend (options , 'BSP_RISCV_FPU_SOFT' )
40
+ if soft_fpu :
41
+ rtconfig .DEVICE = rtconfig .DEVICE .replace ('-march=rv64imafdcv -mabi=lp64d' , '-march=rv64imafdc -mabi=lp64' )
42
+ rtconfig .CFLAGS = rtconfig .CFLAGS .replace ('-march=rv64imafdcv -mabi=lp64d' , '-march=rv64imafdc -mabi=lp64' )
43
+ rtconfig .LFLAGS = rtconfig .LFLAGS .replace ('-march=rv64imafdcv -mabi=lp64d' , '-march=rv64imafdc -mabi=lp64' )
44
+ rtconfig .AFLAGS = rtconfig .AFLAGS .replace ('-march=rv64imafdcv -mabi=lp64d' , '-march=rv64imafdc -mabi=lp64' )
45
+
39
46
DefaultEnvironment (tools = [])
40
47
env = Environment (tools = ['mingw' ],
41
48
AS = rtconfig .AS , ASFLAGS = rtconfig .AFLAGS ,
0 commit comments