source: rtems-source-builder/rtems/config/rtems-bsp.cfg @ 70fc466

4.104.9
Last change on this file since 70fc466 was 70fc466, checked in by Chris Johns <chrisj@…>, on Apr 15, 2016 at 1:51:55 AM

rtems: Refactor to move to a single version on master.

Move the 4.12 version and base defines to just RTEMS base defines
which includes the version. This removes the version from a number of
files and makes it simpler to move to a new version. It however means
we cannot support more than version on master.

This change further breaks 4.10 and 4.9 however it means we can
branch these versions and better support them on their branches.

  • Property mode set to 100644
File size: 3.3 KB
Line 
1#
2# RTEMS BSP Support
3#
4
5#
6# The RTEMS BSP support requires the host turple, the RTEMS BSP and the path to
7# the tools. The prefix is set to an installed RTEMS. The built package is
8# installed into the prefix.
9#
10# Keeping the package's installed path in the RTEMS install path and separate
11# to the tools lets the tools version vary independently. If --rtems-tools
12# (--with-tools) is not provided use the prefix.
13#
14
15#
16# If a dry-run and with download ignore errors and correct setting for tools
17# and BSPs. Only after the source to download.
18#
19%if %{_dry_run} && %{defined with_download}
20 %log BSP configuration errors ignored
21 %define rtems_bsp_error 0
22%else
23 %define rtems_bsp_error 1
24%endif
25
26%if %{_target} == %{nil} && %{rtems_bsp_error}
27 %error No RTEMS target specified: --rtems-bsp=arch/bsp (or --target=target)
28%endif
29
30%if %{_host} != %{_build}
31 %error Canadian cross building for BSP is not supported.
32%endif
33
34%ifn %{defined with_rtems_bsp}
35 %if %{rtems_bsp_error}
36  %error No RTEMS BSP specified: --rtems-bsp=arch/bsp (or --with-rtems-bsp=bsp)
37 %endif
38 %define with_rtems_bsp sparc/erc32
39%endif
40
41%ifn %{defined with_tools}
42 %define with_tools %{_prefix}
43%endif
44
45#
46# Set the host to the target.
47#
48%define _host %{_target}
49
50#
51# Set the path to the tools.
52#
53%{path prepend %{with_tools}/bin}
54
55#
56# Set up how we manage pkgconfig. Set the prefix path to the RTEMS prefix,
57# enable support when crosscompiling, and filter specific optimisation and
58# warning from the flags that RTEMS exports.
59#
60%{pkgconfig prefix %{_prefix}/lib/pkgconfig}
61%{pkgconfig crosscompile yes}
62%{pkgconfig filter-flags yes}
63
64#
65# The RTEMS BSP Flags
66#
67%define rtems_bsp           %{with_rtems_bsp}
68%define rtems_bsp_ccflags   %{pkgconfig ccflags %{_host}-%{rtems_bsp}}
69%define rtems_bsp_cflags    %{pkgconfig cflags  %{_host}-%{rtems_bsp}}
70%define rtems_bsp_ldflags   %{pkgconfig ldflags %{_host}-%{rtems_bsp}}
71%define rtems_bsp_libs      %{pkgconfig libs    %{_host}-%{rtems_bsp}}
72
73%if %{rtems_bsp_cflags} == %{nil} && %{rtems_bsp_error}
74 %error No RTEMS target CFLAGS found; Please check the --rtems-bsp option.
75%endif
76
77%if %{rtems_bsp_ccflags} == %{nil}
78 %define rtems_bsp_ccflags %{rtems_bsp_cflags}
79%endif
80
81#
82# Update the configure paths to be BSP specific.
83#
84%define rtems_bsp_prefix  %{_prefix}/%{_host}/%{rtems_bsp}
85%define _exec_prefix      %{rtems_bsp_prefix}
86%define _bindir           %{_exec_prefix}/bin
87%define _sbindir          %{_exec_prefix}/sbin
88%define _libexecdir       %{_exec_prefix}/libexec
89%define _datarootdir      %{_exec_prefix}/share
90%define _datadir          %{_datarootdir}
91%define _sysconfdir       %{_exec_prefix}/etc
92%define _sharedstatedir   %{_exec_prefix}/com
93%define _localstatedir    %{_exec_prefix}/var
94%define _includedir       %{_libdir}/include
95%define _lib              lib
96%define _libdir           %{_exec_prefix}/%{_lib}
97%define _libexecdir       %{_exec_prefix}/libexec
98%define _mandir           %{_datarootdir}/man
99%define _infodir          %{_datarootdir}/info
100%define _localedir        %{_datarootdir}/locale
101%define _localedir        %{_datadir}/locale
102%define _localstatedir    %{_exec_prefix}/var
103
104#
105# Map to names used for cross compiling.
106#
107%define host_includes -I%{_includedir}
108%define host_cflags   %{rtems_bsp_cflags}
109%define host_cxxflags %{rtems_bsp_ccflags}
110%define host_ldflags  %{rtems_bsp_ldflags}
111%define host_libs     %{rtems_bsp_libs}
Note: See TracBrowser for help on using the repository browser.