blob: 3b24ec8824b39756e0f64a9f91e298a27882a871 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
#
# 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}
%error No RTEMS BSP specified: --with-rtems-bsp=bsp
%endif
%ifn %{defined with_tools}
%define with_tools %{_prefix}
%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}}
%if %{rtems_bsp_ccflags} == %{nil}
%define rtems_bsp_ccflags %{rtems_bsp_cflags}
%endif
#
# Map to names used for cross compiling.
#
%define host_cflags %{rtems_bsp_cflags}
%define host_cxxflags %{rtems_bsp_ccflags}
%define host_ldflags %{rtems_bsp_ldflags}
%define host_libs %{rtems_bsp_libs}
#
# Update the configure paths to be BSP specific.
#
%define rtems_bsp_prefix %{_prefix}/%{_host}/%{rtems_bsp}
%define _exec_prefix %{rtems_bsp_prefix}
%define _bindir %{_exec_prefix}/bin
%define _sbindir %{_exec_prefix}/sbin
%define _libexecdir %{_exec_prefix}/libexec
%define _datarootdir %{_exec_prefix}/share
%define _datadir %{_datarootdir}
%define _sysconfdir %{_exec_prefix}/etc
%define _sharedstatedir %{_exec_prefix}/com
%define _localstatedir %{_exec_prefix}/var
%define _includedir %{_libdir}/include
%define _lib lib
%define _libdir %{_exec_prefix}/%{_lib}
%define _libexecdir %{_exec_prefix}/libexec
%define _mandir %{_datarootdir}/man
%define _infodir %{_datarootdir}/info
%define _localedir %{_datarootdir}/locale
%define _localedir %{_datadir}/locale
%define _localstatedir %{_exec_prefix}/var
|