[BSP] Add color build for qemu gcc config. (#6924)
This commit is contained in:
parent
ee121d25dc
commit
e4edf7e182
|
@ -52,8 +52,8 @@ if PLATFORM == 'gcc':
|
||||||
AFPFLAGS = ' -mfloat-abi=softfp -mfpu=neon'
|
AFPFLAGS = ' -mfloat-abi=softfp -mfpu=neon'
|
||||||
DEVICE = ' -march=armv7-a -mtune=cortex-a7 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing'
|
DEVICE = ' -march=armv7-a -mtune=cortex-a7 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing'
|
||||||
|
|
||||||
CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall'
|
CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall -fdiagnostics-color=always'
|
||||||
CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99 -D_POSIX_SOURCE '
|
CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99 -D_POSIX_SOURCE -fdiagnostics-color=always'
|
||||||
AFLAGS = DEVICE + ' -c' + AFPFLAGS + ' -x assembler-with-cpp'
|
AFLAGS = DEVICE + ' -c' + AFPFLAGS + ' -x assembler-with-cpp'
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors -T '+ LINK_SCRIPT + ' -lsupc++ -lgcc -static'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors -T '+ LINK_SCRIPT + ' -lsupc++ -lgcc -static'
|
||||||
CPATH = ''
|
CPATH = ''
|
||||||
|
|
|
@ -25,8 +25,8 @@ if PLATFORM == 'gcc':
|
||||||
AFPFLAGS = ' '
|
AFPFLAGS = ' '
|
||||||
DEVICE = ' -march=armv8-a -mtune=cortex-a53 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing'
|
DEVICE = ' -march=armv8-a -mtune=cortex-a53 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing'
|
||||||
|
|
||||||
CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall'
|
CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall -fdiagnostics-color=always'
|
||||||
CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99'
|
CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99 -fdiagnostics-color=always'
|
||||||
AFLAGS = ' -c' + AFPFLAGS + ' -x assembler-with-cpp'
|
AFLAGS = ' -c' + AFPFLAGS + ' -x assembler-with-cpp'
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors -T link.lds' + ' -lsupc++ -lgcc -static'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,system_vectors -T link.lds' + ' -lsupc++ -lgcc -static'
|
||||||
CPATH = ''
|
CPATH = ''
|
||||||
|
|
|
@ -12,7 +12,6 @@ if os.getenv('RTT_CC'):
|
||||||
|
|
||||||
if CROSS_TOOL == 'gcc':
|
if CROSS_TOOL == 'gcc':
|
||||||
PLATFORM = 'gcc'
|
PLATFORM = 'gcc'
|
||||||
#EXEC_PATH = r'/home/lizhirui/workspace/riscv64-toolchains/bin'
|
|
||||||
EXEC_PATH = r'/opt/rtt_riscv64_musl/bin'
|
EXEC_PATH = r'/opt/rtt_riscv64_musl/bin'
|
||||||
else:
|
else:
|
||||||
print('Please make sure your toolchains is GNU GCC!')
|
print('Please make sure your toolchains is GNU GCC!')
|
||||||
|
@ -26,7 +25,6 @@ BUILD = 'debug'
|
||||||
if PLATFORM == 'gcc':
|
if PLATFORM == 'gcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv64-unknown-elf-'
|
PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv64-unknown-elf-'
|
||||||
# PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv64-unknown-linux-musl-'
|
|
||||||
CC = PREFIX + 'gcc'
|
CC = PREFIX + 'gcc'
|
||||||
CXX = PREFIX + 'g++'
|
CXX = PREFIX + 'g++'
|
||||||
AS = PREFIX + 'gcc'
|
AS = PREFIX + 'gcc'
|
||||||
|
@ -38,7 +36,7 @@ if PLATFORM == 'gcc':
|
||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcmodel=medany -march=rv64imafdc -mabi=lp64 '
|
DEVICE = ' -mcmodel=medany -march=rv64imafdc -mabi=lp64 '
|
||||||
CFLAGS = DEVICE + '-ffreestanding -flax-vector-conversions -Wno-cpp -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields'
|
CFLAGS = DEVICE + '-ffreestanding -flax-vector-conversions -Wno-cpp -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -fdiagnostics-color=always'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -D__ASSEMBLY__ '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -D__ASSEMBLY__ '
|
||||||
LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start -T link.lds' + ' -lsupc++ -lgcc -static'
|
LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start -T link.lds' + ' -lsupc++ -lgcc -static'
|
||||||
CPATH = ''
|
CPATH = ''
|
||||||
|
|
Loading…
Reference in New Issue