diff --git a/contrib/crossrpms/gdb/build.add b/contrib/crossrpms/gdb/build.add index eef6a329d2..a52949eafb 100644 --- a/contrib/crossrpms/gdb/build.add +++ b/contrib/crossrpms/gdb/build.add @@ -15,7 +15,7 @@ --without-included-gettext \ --disable-win32-registry \ --disable-werror \ - --enable-sim \ + %{build_sim} \ %if "%{gdb_version}" >= "6.7" --with-system-readline \ %endif diff --git a/contrib/crossrpms/gdb/gdb.add b/contrib/crossrpms/gdb/gdb.add index 140603b16e..a0108273ec 100644 --- a/contrib/crossrpms/gdb/gdb.add +++ b/contrib/crossrpms/gdb/gdb.add @@ -12,6 +12,21 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{_host_rpmprefix}gcc +%define build_sim --enable-sim +# psim doesn't support Cdn-X +%if ("@tool_target@" == "powerpc-rtems@rtems_api@") && ("%{_build}" != "%{_host}") +%define build_sim --disable-sim +%endif +%ifos mingw mingw32 +# Mingw lacks functions required by the simulator +%if "@tool_target@" == "sparc-rtems@rtems_api@" +%define build_sim --disable-sim +%endif +%if "@tool_target@" == "h8300-rtems@rtems_api@" +%define build_sim --disable-sim +%endif +%endif + %if "%{gdb_version}" >= "6.6" # suse %if "%{?suse}"