[rtems commit] bsp/ngmp: Use -mcpu=leon3 GCC option

Sebastian Huber sebh at rtems.org
Mon Sep 1 06:37:31 UTC 2014


Module:    rtems
Branch:    master
Commit:    aacb7e6aff9e59c675979e25902caa3e38892765
Changeset: http://git.rtems.org/rtems/commit/?id=aacb7e6aff9e59c675979e25902caa3e38892765

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Sep  1 08:00:35 2014 +0200

bsp/ngmp: Use -mcpu=leon3 GCC option

There is support for the LEON3 processor available in Binutils 2.24 and
the GCC 4.8 branch and GCC mainline.

GCC 4.8 branch:

http://gcc.gnu.org/viewcvs/gcc/branches/?view=log&pathrev=205331

GCC mainline:

http://gcc.gnu.org/viewcvs/gcc/trunk/?view=log&pathrev=202664

It is mandatory to use this option for SMP on LEON3 since it enables
usage of C11 atomic operations.  It makes it also possible to use an
inline function for _CPU_SMP_Get_current_processor() which avoids the
function call overhead in critical sections.

---

 c/src/lib/libbsp/sparc/leon3/make/custom/ngmp.cfg |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/leon3/make/custom/ngmp.cfg b/c/src/lib/libbsp/sparc/leon3/make/custom/ngmp.cfg
index 86da029..5e3d196 100644
--- a/c/src/lib/libbsp/sparc/leon3/make/custom/ngmp.cfg
+++ b/c/src/lib/libbsp/sparc/leon3/make/custom/ngmp.cfg
@@ -1 +1,3 @@
 include $(RTEMS_ROOT)/make/custom/leon3.cfg
+
+CPU_CFLAGS = -mcpu=leon3 -msoft-float



More information about the vc mailing list