Skip to content

Commit 5b46cce

Browse files
committed
[smart][vdso] Add prefix:RTT_ in ENV variables for vdso building.
1 parent 4f0726e commit 5b46cce

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

components/lwp/vdso/SConscript

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ else:
2828

2929
process_env = os.environ.copy()
3030
if hasattr(rtconfig, 'EXEC_PATH') and rtconfig.EXEC_PATH is not None:
31-
process_env['EXEC_PATH'] = rtconfig.EXEC_PATH
31+
process_env['RTT_EXEC_PATH'] = rtconfig.EXEC_PATH
3232
if hasattr(rtconfig, 'PREFIX') and rtconfig.PREFIX is not None:
33-
process_env['CC_PREFIX'] = rtconfig.PREFIX
33+
process_env['RTT_CC_PREFIX'] = rtconfig.PREFIX
34+
if hasattr(rtconfig, 'DEVICE') and rtconfig.DEVICE is not None:
35+
process_env['RTT_DEVICE'] = rtconfig.DEVICE
3436

3537
command = ["scons", "-C", vdso_arch]
3638
clean_command = ["scons", "-C", vdso_arch, "--clean"]

components/lwp/vdso/user/arch/aarch64/SConstruct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ vdso_path = os.path.join(vdso_usr, '..', '..', '..')
77

88
EXEC_PATH = os.getenv('RTT_EXEC_PATH') or '/usr/bin'
99
PREFIX = os.getenv('RTT_CC_PREFIX') or 'aarch64-none-elf-'
10+
DEVICE = os.getenv('RTT_DEVICE') or ' -march=armv8-a -mtune=cortex-a53'
1011

1112
CC = PREFIX + 'gcc'
1213
CPP = PREFIX + 'cpp'
1314
AS = PREFIX + 'gcc'
1415
AR = PREFIX + 'ar'
1516
LINK = PREFIX + 'gcc'
1617

17-
DEVICE = ' -march=armv8-a -mtune=cortex-a53 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing'
1818
AFLAGS = ' -x assembler-with-cpp'
19-
CFLAGS = DEVICE + ' -Wall -Wno-cpp -std=gnu99 -fdiagnostics-color=always -fPIC -O2'
19+
CFLAGS = DEVICE + ' -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing -Wall -Wno-cpp -std=gnu99 -fdiagnostics-color=always -fPIC -O2'
2020
LFLAGS = DEVICE + ' -Bsymbolic -Wl,--gc-sections,-u,system_vectors -T {path}/vdso.lds'.format(path=vdso_usr)
2121
CFLAGS += " -I . -I {vdso_path} ".format(vdso_path=vdso_path)
2222

components/lwp/vdso/user/arch/risc-v/SConstruct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ vdso_path = os.path.join(vdso_usr, '..', '..', '..')
77

88
EXEC_PATH = os.getenv('RTT_EXEC_PATH') or '/usr/bin'
99
PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv64-none-elf-'
10+
DEVICE = os.getenv('RTT_DEVICE') or ' -march=rv64imafdc -mabi=lp64'
1011

1112
CC = PREFIX + 'gcc'
1213
CPP = PREFIX + 'cpp'
1314
AS = PREFIX + 'gcc'
1415
AR = PREFIX + 'ar'
1516
LINK = PREFIX + 'gcc'
1617

17-
DEVICE = ' -march=rv64imafdc -mabi=lp64'
1818
AFLAGS = ' -x assembler-with-cpp'
1919
CFLAGS = DEVICE + ' -Wall -Wno-cpp -std=gnu99 -fdiagnostics-color=always -fPIC -O2'
2020
LFLAGS = DEVICE + ' -Bsymbolic -Wl,--gc-sections -T {path}/vdso.lds'.format(path=vdso_usr)

0 commit comments

Comments
 (0)