From 257d1e4378c80968de57ba888e235888adb0e992 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Thu, 21 Aug 2014 22:40:47 +1000 Subject: [PATCH] rtems-4.11: Fix building the SPARC simulator. Add support for simulator options to enable special features of some gdb simulators. --- rtems/config/4.11/rtems-mips.bset | 5 +++++ rtems/config/4.11/rtems-powerpc.bset | 5 +++++ rtems/config/4.11/rtems-sparc.bset | 4 +--- source-builder/config/gdb-7-1.cfg | 3 +++ source-builder/sb/config.py | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/rtems/config/4.11/rtems-mips.bset b/rtems/config/4.11/rtems-mips.bset index ff4cc54..1062d6c 100644 --- a/rtems/config/4.11/rtems-mips.bset +++ b/rtems/config/4.11/rtems-mips.bset @@ -11,6 +11,11 @@ # %include rtems-4.11-base.bset +# +# Simulator options. +# +%define gdb-sim-options --enable-sim-hardware + # # If Windows (MinGW) do not build the simulator. # diff --git a/rtems/config/4.11/rtems-powerpc.bset b/rtems/config/4.11/rtems-powerpc.bset index f592d84..f0c0e6b 100644 --- a/rtems/config/4.11/rtems-powerpc.bset +++ b/rtems/config/4.11/rtems-powerpc.bset @@ -11,6 +11,11 @@ # %include rtems-4.11-base.bset +# +# Simulator options. +# +%define gdb-sim-options --enable-sim-hardware --enable-timebase --enable-sim-trace + # # If Windows (MinGW) do not build the simulator. # diff --git a/rtems/config/4.11/rtems-sparc.bset b/rtems/config/4.11/rtems-sparc.bset index fb64734..83d79da 100644 --- a/rtems/config/4.11/rtems-sparc.bset +++ b/rtems/config/4.11/rtems-sparc.bset @@ -20,9 +20,7 @@ # # If Windows (MinGW) do not build the simulator. # -%if %{_build_os} == win32 - %define gdb-disable-sim -%endif +%define win32-gdb-disable-sim # # Tools configuration. diff --git a/source-builder/config/gdb-7-1.cfg b/source-builder/config/gdb-7-1.cfg index e013b08..4418c8f 100644 --- a/source-builder/config/gdb-7-1.cfg +++ b/source-builder/config/gdb-7-1.cfg @@ -18,6 +18,8 @@ # %ifn %{defined gdb-disable-sim} %define gdb-disable-sim 0 +%else + %undefine gdb-sim-options %endif %include %{_configdir}/checks.cfg @@ -90,6 +92,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) --disable-win32-registry \ --disable-werror \ %{!?gdb-disable-sim:--enable-sim}%{?gdb-disable-sim:--disable-sim} \ + %{?gdb-sim-options:%{gdb-sim-options}} \ --without-zlib \ --with-expat \ %{!?without_python:--with-python} \ diff --git a/source-builder/sb/config.py b/source-builder/sb/config.py index baba751..d5e68d0 100644 --- a/source-builder/sb/config.py +++ b/source-builder/sb/config.py @@ -531,7 +531,7 @@ class file: log.warning('malformed expand macro, no colon found') else: e = self._expand(m[colon + 1:-1].strip()) - s = s.replace(m, e) + s = s.replace(m, self._label(e)) expanded = True mn = None elif m.startswith('%{with '):