source: rtems-source-builder/rtems/config/rtems-bsp.cfg @ b31d5e2

4.104.114.95
Last change on this file since b31d5e2 was b31d5e2, checked in by Chris Johns <chrisj@…>, on Jan 23, 2015 at 3:31:25 AM

Fix C++ build support for cross-compiling RTEMS 3rd party packages.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1#
2# RTEMS BSP Support
3#
4
5#
6# The RTEMS BSP support requires the host turple, the RTEMS BSP
7# and the path to the tools. The prefix is set to an installed
8# RTEMS. The built package is installed into the prefix.
9#
10# Keeping the package's installed path in the RTEMS install path
11# and separate to the tools lets the tools version vary
12# independently. If --with-tools is not provided use the prefix.
13#
14
15%if %{_host} == %{nil}
16 %error No RTEMS target specified: --host=host
17%endif
18
19%ifn %{defined with_rtems_bsp}
20 %error No RTEMS BSP specified: --with-rtems-bsp=bsp
21%endif
22
23%ifn %{defined with_tools}
24 %define with_tools %{_prefix}
25%endif
26
27#
28# Set the path to the tools.
29#
30%{path prepend %{with_tools}/bin}
31
32#
33# Set up how we manage pkgconfig. Set the prefix path to the RTEMS prefix,
34# enable support when crosscompiling, and filter specific optimisation and
35# warning from the flags that RTEMS exports.
36#
37%{pkgconfig prefix %{_prefix}/lib/pkgconfig}
38%{pkgconfig crosscompile yes}
39%{pkgconfig filter-flags yes}
40
41#
42# The RTEMS BSP Flags
43#
44%define rtems_bsp           %{with_rtems_bsp}
45%define rtems_bsp_ccflags   %{pkgconfig ccflags %{_host}-%{rtems_bsp}}
46%define rtems_bsp_cflags    %{pkgconfig cflags  %{_host}-%{rtems_bsp}}
47%define rtems_bsp_ldflags   %{pkgconfig ldflags %{_host}-%{rtems_bsp}}
48%define rtems_bsp_libs      %{pkgconfig libs    %{_host}-%{rtems_bsp}}
49
50%if %{rtems_bsp_ccflags} == %{nil}
51  %define rtems_bsp_ccflags %{rtems_bsp_cflags}
52%endif
53
54#
55# Map to names used for cross compiling.
56#
57%define host_cflags   %{rtems_bsp_cflags}
58%define host_cxxflags %{rtems_bsp_ccflags}
59%define host_ldflags  %{rtems_bsp_ldflags}
60%define host_libs     %{rtems_bsp_libs}
61
62#
63# Update the configure paths to be BSP specific.
64#
65%define rtems_bsp_prefix  %{_prefix}/%{_host}/%{rtems_bsp}
66%define _exec_prefix      %{rtems_bsp_prefix}
67%define _bindir           %{_exec_prefix}/bin
68%define _sbindir          %{_exec_prefix}/sbin
69%define _libexecdir       %{_exec_prefix}/libexec
70%define _datarootdir      %{_exec_prefix}/share
71%define _datadir          %{_datarootdir}
72%define _sysconfdir       %{_exec_prefix}/etc
73%define _sharedstatedir   %{_exec_prefix}/com
74%define _localstatedir    %{_exec_prefix}/var
75%define _includedir       %{_libdir}/include
76%define _lib              lib
77%define _libdir           %{_exec_prefix}/%{_lib}
78%define _libexecdir       %{_exec_prefix}/libexec
79%define _mandir           %{_datarootdir}/man
80%define _infodir          %{_datarootdir}/info
81%define _localedir        %{_datarootdir}/locale
82%define _localedir        %{_datadir}/locale
83%define _localstatedir    %{_exec_prefix}/var
Note: See TracBrowser for help on using the repository browser.