summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2023-02-11 17:14:55 +0800
committerGitHub <[email protected]>2023-02-11 17:14:55 +0800
commite4edf7e1824b45199cbca95303fc262d207dc8f6 (patch)
tree2c7a28a7d926742c0d66814b28f8bb756774b580
parentee121d25dcaaf138d97f78e5ea3361f9e0388b0a (diff)
[BSP] Add color build for qemu gcc config. (#6924)
-rw-r--r--bsp/qemu-vexpress-a9/rtconfig.py4
-rw-r--r--bsp/qemu-virt64-aarch64/rtconfig.py4
-rw-r--r--bsp/qemu-virt64-riscv/rtconfig.py4
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 = ''