summaryrefslogtreecommitdiffstats
path: root/rtems/config/rtems-bsp.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'rtems/config/rtems-bsp.cfg')
-rw-r--r--rtems/config/rtems-bsp.cfg31
1 files changed, 22 insertions, 9 deletions
diff --git a/rtems/config/rtems-bsp.cfg b/rtems/config/rtems-bsp.cfg
index 3b24ec8..d5868ca 100644
--- a/rtems/config/rtems-bsp.cfg
+++ b/rtems/config/rtems-bsp.cfg
@@ -3,21 +3,25 @@
#
#
-# The RTEMS BSP support requires the host turple, the RTEMS BSP
-# and the path to the tools. The prefix is set to an installed
-# RTEMS. The built package is installed into the prefix.
+# The RTEMS BSP support requires the host turple, the RTEMS BSP and the path to
+# the tools. The prefix is set to an installed RTEMS. The built package is
+# installed into the prefix.
#
-# Keeping the package's installed path in the RTEMS install path
-# and separate to the tools lets the tools version vary
-# independently. If --with-tools is not provided use the prefix.
+# Keeping the package's installed path in the RTEMS install path and separate
+# to the tools lets the tools version vary independently. If --rtems-tools
+# (--with-tools) is not provided use the prefix.
#
-%if %{_host} == %{nil}
- %error No RTEMS target specified: --host=host
+%if %{_target} == %{nil}
+ %error No RTEMS target specified: --rtems-bsp=arch/bsp (or --target=target)
+%endif
+
+%if %{_host} != %{_build}
+ %error Canadian cross building for BSP is not supported.
%endif
%ifn %{defined with_rtems_bsp}
- %error No RTEMS BSP specified: --with-rtems-bsp=bsp
+ %error No RTEMS BSP specified: --rtems-bsp=arch/bsp (or --with-rtems-bsp=bsp)
%endif
%ifn %{defined with_tools}
@@ -25,6 +29,11 @@
%endif
#
+# Set the host to the target.
+#
+%define _host %{_target}
+
+#
# Set the path to the tools.
#
%{path prepend %{with_tools}/bin}
@@ -47,6 +56,10 @@
%define rtems_bsp_ldflags %{pkgconfig ldflags %{_host}-%{rtems_bsp}}
%define rtems_bsp_libs %{pkgconfig libs %{_host}-%{rtems_bsp}}
+%if %{rtems_bsp_cflags} == %{nil}
+ %error No RTEMS target CFLAGS found; Please check the --rtems-bsp option.
+%endif
+
%if %{rtems_bsp_ccflags} == %{nil}
%define rtems_bsp_ccflags %{rtems_bsp_cflags}
%endif