mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
leon: do not use -mfix-{device} with Clang
Clang do not support -mfix-gr712rc, -mfix-ut700 and -mfix-ut699. Therefore we adjust the CPU_CFLAGS to remove these when compiling with Clang. Instead use GR712RC: -mcpu=gr712rc GR740: -mcpu=gr740 UT699/UT700: Not currently supported by clang, use LEON3 BSP.
This commit is contained in:
1 parent
6dc0b5f4c5
commit
dc32b6aa08
2 files changed
+28
-2
No files matched your search
@@ -8,7 +8,12 @@ RTEMS_CPU=sparc
|
||||
|
||||
# This contains the compiler options necessary to select the CPU model
|
||||
# and (hopefully) optimize for it.
|
||||
CPU_CFLAGS = -mcpu=leon3 -mfix-gr712rc
|
||||
# GCC and clang use different switches to select target:
|
||||
ifneq (,$(findstring clang,$(CC)))
|
||||
CPU_CFLAGS = -mcpu=gr712rc
|
||||
else
|
||||
CPU_CFLAGS = -mcpu=leon3 -mfix-gr712rc
|
||||
endif
|
||||
|
||||
# optimize flag: typically -O2
|
||||
CFLAGS_OPTIMIZE_V = -O2 -g
|
||||
|
||||
@@ -1 +1,22 @@
|
||||
include $(RTEMS_ROOT)/make/custom/leon3.cfg
|
||||
#
|
||||
# Config file for the LEON3 SPARC processor.
|
||||
#
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/default.cfg
|
||||
|
||||
RTEMS_CPU=sparc
|
||||
|
||||
# This contains the compiler options necessary to select the CPU model
|
||||
# and (hopefully) optimize for it.
|
||||
# GCC and clang use different switches to select target:
|
||||
ifneq (,$(findstring clang,$(CC)))
|
||||
CPU_CFLAGS = -mcpu=gr740
|
||||
else
|
||||
CPU_CFLAGS = -mcpu=leon3
|
||||
endif
|
||||
|
||||
# optimize flag: typically -O2
|
||||
CFLAGS_OPTIMIZE_V = -O2 -g
|
||||
CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
|
||||
|
||||
LDFLAGS = -Wl,--gc-sections
|
||||
Reference in new issue
Block a user