blob: 9d220502fabd255640e039680ec0cfd6fe708d6f (
plain) (
tree)
|
|
#
# 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 --with-tools is not provided use the prefix.
#
%if %{_host} == %{nil}
%error No RTEMS target specified: --host=host
%endif
%ifn %{defined with_rtems_bsp}
%define with_tools %{_prefix}
%endif
%ifn %{defined with_tools}
%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}
|