On 29/06/2020 13:28, Daniel Hellstrom wrote:

diff --git a/bsps/sparc/leon3/config/gr712rc.cfg 
b/bsps/sparc/leon3/config/gr712rc.cfg
index 3852932..e8f0731 100644
--- a/bsps/sparc/leon3/config/gr712rc.cfg
+++ b/bsps/sparc/leon3/config/gr712rc.cfg
@@ -10,10 +10,11 @@ RTEMS_CPU=sparc
  #  and (hopefully) optimize for it.
  #  GCC and clang use different switches to select target:
  ifneq (,$(findstring clang,$(CC)))
-  CPU_CFLAGS = -mcpu=gr712rc
+  CPU_CFLAGS = -mcpu=gr712rc -D__FIX_LEON3FT_TN0018
  else
-  CPU_CFLAGS = -mcpu=leon3 -mfix-gr712rc
+  CPU_CFLAGS = -mcpu=leon3 -mfix-gr712rc -D__FIX_LEON3FT_TN0018
  endif
+# -D__FIX_LEON3FT_TN0018 enables kernel work around for GRLIB-TN-0018 errata
# optimize flag: typically -O2
  CFLAGS_OPTIMIZE_V = -O2 -g
diff --git a/bsps/sparc/leon3/config/ut699.cfg 
b/bsps/sparc/leon3/config/ut699.cfg
index a8fff49..ed70cf5 100644
--- a/bsps/sparc/leon3/config/ut699.cfg
+++ b/bsps/sparc/leon3/config/ut699.cfg
@@ -8,7 +8,8 @@ RTEMS_CPU=sparc
# This contains the compiler options necessary to select the CPU model
  #  and (hopefully) optimize for it.
-CPU_CFLAGS = -mcpu=leon -mfix-ut699
+# -D__FIX_LEON3FT_TN0018 enables kernel work around for GRLIB-TN-0018 errata
+CPU_CFLAGS = -mcpu=leon -mfix-ut699 -D__FIX_LEON3FT_TN0018
# optimize flag: typically -O2
  CFLAGS_OPTIMIZE_V = -O2 -g
diff --git a/bsps/sparc/leon3/config/ut700.cfg 
b/bsps/sparc/leon3/config/ut700.cfg
index bcca901..5c6fff8 100644
--- a/bsps/sparc/leon3/config/ut700.cfg
+++ b/bsps/sparc/leon3/config/ut700.cfg
@@ -8,7 +8,8 @@ RTEMS_CPU=sparc
# This contains the compiler options necessary to select the CPU model
  #  and (hopefully) optimize for it.
-CPU_CFLAGS = -mcpu=leon3 -mfix-ut700
+# -D__FIX_LEON3FT_TN0018 enables kernel work around for GRLIB-TN-0018 errata
+CPU_CFLAGS = -mcpu=leon3 -mfix-ut700 -D__FIX_LEON3FT_TN0018
# optimize flag: typically -O2
  CFLAGS_OPTIMIZE_V = -O2 -g
Command line defines are discouraged and in cpukit only multilib defined defines should be used. Can't you the existing __FIX_LEON3FT_B2BST define to enable the errata workarounds?
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to