From e4edf7e1824b45199cbca95303fc262d207dc8f6 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Sat, 11 Feb 2023 17:14:55 +0800 Subject: [PATCH] [BSP] Add color build for qemu gcc config. (#6924) --- bsp/qemu-vexpress-a9/rtconfig.py | 4 ++-- bsp/qemu-virt64-aarch64/rtconfig.py | 4 ++-- bsp/qemu-virt64-riscv/rtconfig.py | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/bsp/qemu-vexpress-a9/rtconfig.py b/bsp/qemu-vexpress-a9/rtconfig.py index 05a0eac377..3544a93663 100644 --- a/bsp/qemu-vexpress-a9/rtconfig.py +++ b/bsp/qemu-vexpress-a9/rtconfig.py @@ -52,8 +52,8 @@ if PLATFORM == 'gcc': AFPFLAGS = ' -mfloat-abi=softfp -mfpu=neon' DEVICE = ' -march=armv7-a -mtune=cortex-a7 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing' - CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall' - CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99 -D_POSIX_SOURCE ' + CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall -fdiagnostics-color=always' + CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99 -D_POSIX_SOURCE -fdiagnostics-color=always' 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' CPATH = '' diff --git a/bsp/qemu-virt64-aarch64/rtconfig.py b/bsp/qemu-virt64-aarch64/rtconfig.py index 3149a5d8af..dd6cbdc4a7 100644 --- a/bsp/qemu-virt64-aarch64/rtconfig.py +++ b/bsp/qemu-virt64-aarch64/rtconfig.py @@ -25,8 +25,8 @@ if PLATFORM == 'gcc': AFPFLAGS = ' ' DEVICE = ' -march=armv8-a -mtune=cortex-a53 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing' - CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall' - CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99' + CXXFLAGS= DEVICE + CFPFLAGS + ' -Wall -fdiagnostics-color=always' + CFLAGS = DEVICE + CFPFLAGS + ' -Wall -Wno-cpp -std=gnu99 -fdiagnostics-color=always' 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' CPATH = '' diff --git a/bsp/qemu-virt64-riscv/rtconfig.py b/bsp/qemu-virt64-riscv/rtconfig.py index af0e95e726..f3de3dc9d8 100644 --- a/bsp/qemu-virt64-riscv/rtconfig.py +++ b/bsp/qemu-virt64-riscv/rtconfig.py @@ -12,7 +12,6 @@ if os.getenv('RTT_CC'): if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' - #EXEC_PATH = r'/home/lizhirui/workspace/riscv64-toolchains/bin' EXEC_PATH = r'/opt/rtt_riscv64_musl/bin' else: print('Please make sure your toolchains is GNU GCC!') @@ -26,7 +25,6 @@ BUILD = 'debug' if PLATFORM == 'gcc': # toolchains PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv64-unknown-elf-' - # PREFIX = os.getenv('RTT_CC_PREFIX') or 'riscv64-unknown-linux-musl-' CC = PREFIX + 'gcc' CXX = PREFIX + 'g++' AS = PREFIX + 'gcc' @@ -38,7 +36,7 @@ if PLATFORM == 'gcc': OBJCPY = PREFIX + 'objcopy' 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__ ' LFLAGS = DEVICE + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,_start -T link.lds' + ' -lsupc++ -lgcc -static' CPATH = '' -- GitLab