summaryrefslogtreecommitdiffstats
path: root/rtems/config/rtems-bsp.cfg
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-06-15 17:40:34 +1200
committerChris Johns <chrisj@rtems.org>2014-06-15 17:40:34 +1200
commit0ffee1931680e92757a4d91199e2517f05e7364d (patch)
tree0a0447a40008a02e238bfa55ab0c7a413de4b47a /rtems/config/rtems-bsp.cfg
parentsb: Tighten the canadian cross compile detection. (diff)
downloadrtems-source-builder-0ffee1931680e92757a4d91199e2517f05e7364d.tar.bz2
sb: Add support for building RTEMS 3rd party packages.
Remove the 'opt' from various macros and shell variables. Add pkgconfig to the checks to make it clear the check is a pkgconfig check. Add NTP support as the first package to be built using the RSB. Split the RTEMS URL's out from the base bset file into a separate file that be included by other files. Add an RTEMS BSP configuration file to help abstract the process of building 3rd party packages. Clean the cross and canadian cross support up so we can cleanly support cross and canadian cross building. Refactor the pkgconfig support and clean up the PC file handling of loading modules. Add support for %{?..} to return false if a macro is %{nil}. Add %{pkgconfig ..} support to allow better control of access RTEMS pkgconfig files.
Diffstat (limited to 'rtems/config/rtems-bsp.cfg')
-rw-r--r--rtems/config/rtems-bsp.cfg55
1 files changed, 55 insertions, 0 deletions
diff --git a/rtems/config/rtems-bsp.cfg b/rtems/config/rtems-bsp.cfg
new file mode 100644
index 0000000..dd34b0a
--- /dev/null
+++ b/rtems/config/rtems-bsp.cfg
@@ -0,0 +1,55 @@
+#
+# RTEMS BSP Support
+#
+
+#
+# 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 %{_host} == %{nil}
+ %error No RTEMS target specified: --host=host
+%endif
+
+%ifn %{defined with_rtems_bsp}
+ %error No RTEMS BSP specified: --with-rtems-bsp=bsp
+%endif
+
+%ifn %{defined with_tools}
+ %error No RTEMS tools specified: --with-tools=path
+%endif
+
+#
+# Set the path to the tools.
+#
+%{path prepend %{with_tools}/bin}
+
+#
+# Set up how we manage pkgconfig. Set the prefix path to the RTEMS prefix,
+# enable support when crosscompiling, and filter specific optimisation and
+# warning from the flags that RTEMS exports.
+#
+%{pkgconfig prefix %{_prefix}/lib/pkgconfig}
+%{pkgconfig crosscompile yes}
+%{pkgconfig filter-flags yes}
+
+#
+# The RTEMS BSP Flags
+#
+%define rtems_bsp %{with_rtems_bsp}
+%define rtems_bsp_ccflags %{pkgconfig ccflags %{_host}-%{rtems_bsp}}
+%define rtems_bsp_cflags %{pkgconfig cflags %{_host}-%{rtems_bsp}}
+%define rtems_bsp_ldflags %{pkgconfig ldflags %{_host}-%{rtems_bsp}}
+%define rtems_bsp_libs %{pkgconfig libs %{_host}-%{rtems_bsp}}
+
+#
+# Map to names used for cross compiling.
+#
+%define host_cflags %{rtems_bsp_cflags}
+%define host_ldflags %{rtems_bsp_ldflags}
+%define host_libs %{rtems_bsp_libs}