1 | # |
---|
2 | # RTEMS Tools Project (http://www.rtems.org/) |
---|
3 | # Copyright 2010-2013 Chris Johns (chrisj@rtems.org) |
---|
4 | # All rights reserved. |
---|
5 | # |
---|
6 | # This file is part of the RTEMS Tools package in 'rtems-tools'. |
---|
7 | # |
---|
8 | # Permission to use, copy, modify, and/or distribute this software for any |
---|
9 | # purpose with or without fee is hereby granted, provided that the above |
---|
10 | # copyright notice and this permission notice appear in all copies. |
---|
11 | # |
---|
12 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
---|
13 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
---|
14 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
---|
15 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
16 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
---|
17 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
---|
18 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
19 | |
---|
20 | # |
---|
21 | # All paths in defaults must be Unix format. Do not store any Windows format |
---|
22 | # paths in the defaults. |
---|
23 | # |
---|
24 | # Every entry must describe the type of checking a host must pass. |
---|
25 | # |
---|
26 | # Records: |
---|
27 | # key: type, attribute, value |
---|
28 | # type : none, dir, exe, triplet |
---|
29 | # attribute: none, required, optional |
---|
30 | # value : 'single line', '''multi line''' |
---|
31 | # |
---|
32 | |
---|
33 | # |
---|
34 | # Global defaults |
---|
35 | # |
---|
36 | [global] |
---|
37 | |
---|
38 | # Nothing |
---|
39 | nil: none, none, '' |
---|
40 | |
---|
41 | # Set to invalid values. |
---|
42 | _bset: none, none, '' |
---|
43 | _bset_tmp: none, none, '' |
---|
44 | name: none, none, '' |
---|
45 | version: none, none, '' |
---|
46 | release: none, none, '' |
---|
47 | buildname: none, none, '%{name}' |
---|
48 | |
---|
49 | # The default is not released. |
---|
50 | rsb_released: none, none, '0' |
---|
51 | rsb_version: none, none, 'no-version' |
---|
52 | |
---|
53 | # GNU triples needed to build packages |
---|
54 | _host: triplet, required, '' |
---|
55 | _build: triplet, required, '' |
---|
56 | _target: none, optional, '' |
---|
57 | |
---|
58 | # RTEMS release URL |
---|
59 | rtems_release_url: none, none, 'https://ftp.rtems.org/pub/rtems/releases/%{rtems_version}' |
---|
60 | |
---|
61 | # The user |
---|
62 | _uid: none, convert, '%(%{__id_u})' |
---|
63 | |
---|
64 | # Default flags that can be overridded to supply specific host or build |
---|
65 | # flags and include paths to the tools. The host is the final platform |
---|
66 | # the tools will run on and build is the host building the tools. |
---|
67 | host_cflags: none, convert, '-O2 -g -pipe' |
---|
68 | host_cxxflags: none, convert, '-O2 -g -pipe' |
---|
69 | host_ldflags: none, convert, '' |
---|
70 | host_includes: none, convert, '' |
---|
71 | host_libs: none, convert, '' |
---|
72 | build_cflags: none, convert, '-O2 -g -pipe' |
---|
73 | build_cxxflags: none, convert, '-O2 -g -pipe' |
---|
74 | build_ldflags: none, convert, '' |
---|
75 | build_includes: none, convert, '' |
---|
76 | build_libs: none, convert, '' |
---|
77 | |
---|
78 | # |
---|
79 | # Build and staging paths. |
---|
80 | # |
---|
81 | buildroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}' |
---|
82 | buildcxcroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}-cxc' |
---|
83 | buildxcroot: dir, none, '%{_tmppath}/%{buildname}-%{_uid}-xx' |
---|
84 | stagingroot: dir, none, '%{_tmppath}/sb-%{_uid}-staging' |
---|
85 | |
---|
86 | # |
---|
87 | # Install mode can be installing or staging. Defaults to installing. |
---|
88 | # |
---|
89 | install_mode: none, none, 'installing' |
---|
90 | |
---|
91 | # Extra path a platform can override. |
---|
92 | _extra_path: none, none, '%{_sbdir}' |
---|
93 | _ld_library_path: none, none, 'LD_LIBRARY_PATH' |
---|
94 | |
---|
95 | # Paths |
---|
96 | _host_platform: none, none, '%{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}' |
---|
97 | _host_cc: none, none, 'gcc' |
---|
98 | _host_cxx: none, none, 'g++' |
---|
99 | _arch: none, none, '%{_host_arch}' |
---|
100 | _topdir: dir, required, '%{_cwd}' |
---|
101 | _configdir: dir, optional, '%{_topdir}/config:%{_sbdir}/config:%{_sbtop}/bare/config' |
---|
102 | _tardir: dir, optional, '%{_topdir}/tar' |
---|
103 | _sourcedir: dir, optional, '%{_topdir}/sources' |
---|
104 | _patchdir: dir, optional, '%{_topdir}/patches:%{_sbdir}/patches' |
---|
105 | _builddir: dir, optional, '%{_topdir}/build/%{buildname}' |
---|
106 | _buildcxcdir: dir, optional, '%{_topdir}/build/%{buildname}-cxc' |
---|
107 | _buildxcdir: dir, optional, '%{_topdir}/build/%{buildname}-xc' |
---|
108 | _docdir: dir, none, '%{_defaultdocdir}' |
---|
109 | _tmppath: dir, none, '%{_topdir}/build/tmp' |
---|
110 | _tmproot: dir, none, '%{_tmppath}/sb-%{_uid}/%{_bset_tmp}' |
---|
111 | _tmpcxcroot: dir, none, '%{_tmppath}/sb-%{_uid}-cxc/%{_bset_tmp}' |
---|
112 | _datadir: dir, none, '%{_prefix}/share' |
---|
113 | _defaultdocdir: dir, none, '%{_prefix}/share/doc' |
---|
114 | _dry_run: none, none, '0' |
---|
115 | _exeext: none, none, '' |
---|
116 | _exec_prefix: dir, none, '%{_prefix}' |
---|
117 | _bindir: dir, none, '%{_exec_prefix}/bin' |
---|
118 | _sbindir: dir, none, '%{_exec_prefix}/sbin' |
---|
119 | _libexecdir: dir, none, '%{_exec_prefix}/libexec' |
---|
120 | _datarootdir: dir, none, '%{_prefix}/share' |
---|
121 | _datadir: dir, none, '%{_datarootdir}' |
---|
122 | _sysconfdir: dir, none, '%{_prefix}/etc' |
---|
123 | _sharedstatedir: dir, none, '%{_prefix}/com' |
---|
124 | _localstatedir: dir, none, '%{prefix}/var' |
---|
125 | _includedir: dir, none, '%{_prefix}/include' |
---|
126 | _lib: dir, none, 'lib' |
---|
127 | _libdir: dir, none, '%{_exec_prefix}/%{_lib}' |
---|
128 | _libexecdir: dir, none, '%{_exec_prefix}/libexec' |
---|
129 | _mandir: dir, none, '%{_datarootdir}/man' |
---|
130 | _infodir: dir, none, '%{_datarootdir}/info' |
---|
131 | _localedir: dir, none, '%{_datarootdir}/locale' |
---|
132 | _localedir: dir, none, '%{_datadir}/locale' |
---|
133 | _localstatedir: dir, none, '%{_prefix}/var' |
---|
134 | _pathprepend: none, none, '' |
---|
135 | _pathpostpend: none, none, '' |
---|
136 | _prefix: dir, none, '%{_usr}' |
---|
137 | _usr: dir, none, '/usr/local' |
---|
138 | _usrsrc: dir, none, '%{_usr}/src' |
---|
139 | _var: dir, none, '/usr/local/var' |
---|
140 | _varrun: dir, none, '%{_var}/run' |
---|
141 | |
---|
142 | # Get source state |
---|
143 | _rsb_getting_source: none, none, '0' |
---|
144 | |
---|
145 | # Defaults, override in platform specific modules. |
---|
146 | ___setup_shell: exe, required, '/bin/sh' |
---|
147 | __aclocal: exe, optional, 'aclocal' |
---|
148 | __ar: exe, required, 'ar' |
---|
149 | __arch_install_post: exe, none, '%{nil}' |
---|
150 | __as: exe, required, 'as' |
---|
151 | __autoconf: exe, optional, 'autoconf' |
---|
152 | __autoheader: exe, optional, 'autoheader' |
---|
153 | __automake: exe, optional, 'automake' |
---|
154 | __autoreconf: exe, optional, 'autoreconf' |
---|
155 | __awk: exe, required, 'awk' |
---|
156 | __bash: exe, optional, '/bin/bash' |
---|
157 | __bison: exe, required, '/usr/bin/bison' |
---|
158 | __bzip2: exe, required, '/usr/bin/bzip2' |
---|
159 | __cat: exe, required, '/bin/cat' |
---|
160 | __cc: exe, required, 'gcc' |
---|
161 | __chgrp: exe, required, '/usr/bin/chgrp' |
---|
162 | __chmod: exe, required, '/bin/chmod' |
---|
163 | __chown: exe, required, '/usr/sbin/chown' |
---|
164 | __cmake: exe, optional, '/usr/bin/cmake' |
---|
165 | __cp: exe, required, '/bin/cp' |
---|
166 | __cpp: exe, none, '%{__cc} -E' |
---|
167 | __cvs: exe, optional, '/usr/bin/cvs' |
---|
168 | __cvs_z: none, none, '%{__cvs} -z 9' |
---|
169 | __cxx: exe, required, 'g++' |
---|
170 | __flex: exe, required, '/usr/bin/flex' |
---|
171 | __git: exe, required, '/usr/bin/git' |
---|
172 | __grep: exe, required, '/usr/bin/grep' |
---|
173 | __gzip: exe, required, '/usr/bin/gzip' |
---|
174 | __id: exe, required, '/usr/bin/id' |
---|
175 | __id_u: exe, none, '%{__id} -u' |
---|
176 | __install: exe, required, '/usr/bin/install' |
---|
177 | __install_info: exe, optional, '/usr/bin/install-info' |
---|
178 | __ld: exe, required, '/usr/bin/ld' |
---|
179 | __ldconfig: exe, required, '/sbin/ldconfig' |
---|
180 | __ln_s: exe, none, 'ln -s' |
---|
181 | __make: exe, required, 'make' |
---|
182 | __makeinfo: exe, required, '/usr/bin/makeinfo' |
---|
183 | __mkdir: exe, required, '/bin/mkdir' |
---|
184 | __mkdir_p: exe, none, '/bin/mkdir -p' |
---|
185 | __mv: exe, required, '/bin/mv' |
---|
186 | __nm: exe, required, '/usr/bin/nm' |
---|
187 | __objcopy: exe, optional, '/usr/bin/objcopy' |
---|
188 | __objdump: exe, optional, '/usr/bin/objdump' |
---|
189 | __patch_bin: exe, required, '/usr/bin/patch' |
---|
190 | __patch_opts: none, none, '%{nil}' |
---|
191 | __patch: exe, none, '%{__patch_bin} %{__patch_opts}' |
---|
192 | __perl: exe, optional, 'perl' |
---|
193 | __svn: exe, optional, '/usr/bin/svn' |
---|
194 | __ranlib: exe, required, 'ranlib' |
---|
195 | __rm: exe, required, '/bin/rm' |
---|
196 | __rmfile: exe, none, '%{__rm} -f' |
---|
197 | __rmdir: exe, none, '%{__rm} -rf' |
---|
198 | __sed: exe, required, '/usr/bin/sed' |
---|
199 | __setup_post: exe, none, '%{__chmod} -R a+rX,g-w,o-w .' |
---|
200 | __sh: exe, required, '/bin/sh' |
---|
201 | __tar: exe, required, '/usr/bin/tar' |
---|
202 | __tar_extract: exe, none, '%{__tar} -xvv' |
---|
203 | __touch: exe, required, '/usr/bin/touch' |
---|
204 | __unzip: exe, required, '/usr/bin/unzip' |
---|
205 | __xz: exe, required, '/usr/bin/xz' |
---|
206 | |
---|
207 | # Shell Build Settings. |
---|
208 | ___build_args: none, none, '-e' |
---|
209 | ___build_cmd: none, none, '%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}' |
---|
210 | ___build_post: none, none, 'exit 0' |
---|
211 | |
---|
212 | # Prebuild set up script. |
---|
213 | ___build_pre: none, none, '''# ___build_pre as set up in defaults.py |
---|
214 | # Save the original path away. |
---|
215 | export SB_ORIG_PATH=${PATH} |
---|
216 | # Directories |
---|
217 | %{?_prefix:SB_PREFIX="%{_prefix}"} |
---|
218 | %{?_prefix:SB_PREFIX_CLEAN=$(echo "%{_prefix}" | %{__sed} -e 's/^\///')} |
---|
219 | SB_SOURCE_DIR="%{_sourcedir}" |
---|
220 | SB_BUILD_DIR="%{_builddir}" |
---|
221 | # host == build, use build; host != build, host uses host and build uses build |
---|
222 | SB_HOST_CPPFLAGS="%{host_includes}" |
---|
223 | # Optionally do not add includes to c/cxx flags as newer configure's complain |
---|
224 | SB_HOST_CFLAGS="%{host_cflags} %{!?host_cflags_no_includes %{host_includes}}" |
---|
225 | SB_HOST_CXXFLAGS="%{host_cxxflags} %{!?host_cflags_no_includes %{host_includes}}" |
---|
226 | SB_HOST_LDFLAGS="%{host_ldflags} %{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}" |
---|
227 | SB_HOST_LIBS="%{host_libs}" |
---|
228 | SB_BUILD_CFLAGS="%{build_cflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}" |
---|
229 | SB_BUILD_CXXFLAGS="%{build_cxxflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}" |
---|
230 | SB_BUILD_LDFLAGS="%{build_ldflags} %{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}" |
---|
231 | SB_BUILD_LBS="%{build_libs}" |
---|
232 | SB_CFLAGS="${SB_BUILD_CFLAGS} %{build_includes}" |
---|
233 | SB_CXXFLAGS="${SB_BUILD_CXXFLAGS} %{build_includes}" |
---|
234 | SB_ARCH="%{_arch}" |
---|
235 | SB_OS="%{_os}" |
---|
236 | export SB_SOURCE_DIR SB_BUILD_DIR SB_ARCH SB_OS |
---|
237 | export SB_HOST_CPPFLAGS SB_HOST_CFLAGS SB_HOST_CXXFLAGS SB_HOST_LDFLAGS SB_HOST_LIBS |
---|
238 | export SB_BUILD_CFLAGS SB_BUILD_CXXFLAGS SB_BUILD_LDFLAGS SB_BUILD_LIBS |
---|
239 | export SB_CFLAGS SB_CXXFLAGS |
---|
240 | # Documentation |
---|
241 | SB_DOC_DIR="%{_docdir}" |
---|
242 | export SB_DOC_DIR |
---|
243 | # Packages |
---|
244 | SB_PACKAGE_NAME="%{name}" |
---|
245 | SB_PACKAGE_BUILDNAME="%{buildname}" |
---|
246 | SB_PACKAGE_VERSION="%{version}" |
---|
247 | SB_PACKAGE_RELEASE="%{release}" |
---|
248 | export SB_PACKAGE_NAME SB_PACKAGE_VERSION SB_PACKAGE_RELEASE |
---|
249 | # Build directories |
---|
250 | export SB_PREFIX |
---|
251 | %{?_builddir:SB_BUILD_DIR="%{_builddir}"} |
---|
252 | %{?buildroot:SB_BUILD_ROOT="%{buildroot}"} |
---|
253 | %{?buildroot:%{?_prefix:SB_BUILD_ROOT_BINDIR="%{buildroot}/${SB_PREFIX_CLEAN}/bin"}} |
---|
254 | export SB_BUILD_ROOT SB_BUILD_DIR SB_BUILD_ROOT_BINDIR |
---|
255 | %{?_buildcxcdir:SB_BUILD_CXC_DIR="%{_buildcxcdir}"} |
---|
256 | %{?buildcxcroot:SB_BUILD_CXC_ROOT="%{buildcxcroot}"} |
---|
257 | %{?buildcxcroot:%{?_prefix:SB_BUILD_CXC_ROOT_BINDIR="%{buildcxcroot}/${SB_PREFIX_CLEAN}/bin"}} |
---|
258 | export SB_BUILD_CXC_ROOT SB_BUILD_CXC_DIR SB_BUILD_CXC_ROOT_BINDIR |
---|
259 | %{?_tmproot:SB_TMPROOT="%{_tmproot}"} |
---|
260 | %{?_tmproot:%{?_prefix:SB_TMPPREFIX="%{_tmproot}/${SB_PREFIX_CLEAN}"}} |
---|
261 | %{?_tmproot:%{?_prefix:SB_TMPBINDIR="%{_tmproot}/${SB_PREFIX_CLEAN}/bin"}} |
---|
262 | export SB_TMPROOT SB_TMPPREFIX SB_TMPBINDIR |
---|
263 | %{?_tmpcxcroot:SB_TMPCXCROOT="%{_tmproot}"} |
---|
264 | %{?_tmpcxcroot:%{?_prefix:SB_TMPCXCPREFIX="%{_tmpcxcroot}/${SB_PREFIX_CLEAN}"}} |
---|
265 | %{?_tmpcxcroot:%{?_prefix:SB_TMPCXCBINDIR="%{_tmpcxcroot}/${SB_PREFIX_CLEAN}/bin"}} |
---|
266 | export SB_TMPCXCROOT SB_TMPCXCPREFIX SB_TMPCXCBINDIR |
---|
267 | # Extra path support |
---|
268 | %{?_extra_path:SB_EXTRAPATH="%{_extra_path}"} |
---|
269 | # The compiler flags |
---|
270 | %{?_targetcflags:CFLAGS_FOR_TARGET="%{_targetcflags}"} |
---|
271 | %{?_targetcxxflags:CXXFLAGS_FOR_TARGET="%{_targetcxxflags}"} |
---|
272 | export CFLAGS_FOR_TARGET |
---|
273 | export CXXFLAGS_FOR_TARGET |
---|
274 | # Set up the path. Put the CXC path first. |
---|
275 | if test -n "${SB_TMPBINDIR}" ; then |
---|
276 | PATH="${SB_TMPBINDIR}:$PATH" |
---|
277 | fi |
---|
278 | if test -n "${SB_TMPCXCBINDIR}" ; then |
---|
279 | PATH="${SB_TMPCXCBINDIR}:$PATH" |
---|
280 | fi |
---|
281 | if test -n "${SB_EXTRAPATH}" ; then |
---|
282 | PATH="${SB_EXTRAPATH}:$PATH" |
---|
283 | fi |
---|
284 | %{?_pathprepend:PATH="%{_pathprepend}:$PATH"} |
---|
285 | %{?_pathpostpend:PATH="$PATH:%{_pathpostpend}"} |
---|
286 | export PATH |
---|
287 | # Default environment set up. |
---|
288 | LANG=C |
---|
289 | export LANG |
---|
290 | unset DISPLAY || : |
---|
291 | umask 022 |
---|
292 | cd "%{_builddir}"''' |
---|
293 | |
---|
294 | ___build_shell: none, none, '%{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}' |
---|
295 | |
---|
296 | ___build_template: none, none, '''#!%{___build_shell} |
---|
297 | %{___build_pre} |
---|
298 | %{nil}''' |
---|
299 | |
---|
300 | # Configure command |
---|
301 | configure: none, none, ''' |
---|
302 | CFLAGS="${CFLAGS:-${SB_CFLAGS}" ; export CFLAGS ; |
---|
303 | CXXFLAGS="${CXXFLAGS:-${SB_CFLAGS}}" ; export CXXFLAGS ; |
---|
304 | FFLAGS="${FFLAGS:-${SB_CFLAGS}}" ; export FFLAGS ; |
---|
305 | ./configure --build=%{_build} --host=%{_host} \ |
---|
306 | --target=%{_target_platform} \ |
---|
307 | --program-prefix=%{?_program_prefix} \ |
---|
308 | --prefix=%{_prefix} \ |
---|
309 | --exec-prefix=%{_exec_prefix} \ |
---|
310 | --bindir=%{_bindir} \ |
---|
311 | --sbindir=%{_sbindir} \ |
---|
312 | --sysconfdir=%{_sysconfdir} \ |
---|
313 | --datadir=%{_datadir} \ |
---|
314 | --includedir=%{_includedir} \ |
---|
315 | --libdir=%{_libdir} \ |
---|
316 | --libexecdir=%{_libexecdir} \ |
---|
317 | --localstatedir=%{_localstatedir} \ |
---|
318 | --sharedstatedir=%{_sharedstatedir} \ |
---|
319 | --mandir=%{_mandir} \ |
---|
320 | --infodir=%{_infodir}''' |
---|
321 | |
---|
322 | # Build script support. |
---|
323 | build_directory: none, none, ''' |
---|
324 | if test "%{_build}" != "%{_host}" ; then |
---|
325 | # Cross-build (Xc) if no target or the host and target match. |
---|
326 | # Canadian-cross (Cxc) if build, host and target are all different. |
---|
327 | if test -z "%{_target}" -o "%{_host}" == "%{_target}" ; then |
---|
328 | build_dir="build-xc" |
---|
329 | else |
---|
330 | build_dir="build-cxc" |
---|
331 | fi |
---|
332 | else |
---|
333 | build_dir="build" |
---|
334 | fi''' |
---|
335 | |
---|
336 | # Host/build flags. |
---|
337 | host_build_flags: none, none, ''' |
---|
338 | # Host and build flags, Cross build if host and build are different and |
---|
339 | # Cxc build if target is deifned and also different. |
---|
340 | # Note, gcc is not ready to be compiled with -std=gnu99 (this needs to be checked). |
---|
341 | if test "%{_build}" != "%{_host}" ; then |
---|
342 | # Cross build |
---|
343 | CC=$(echo "%{_host}-%{_host_cc}" | sed -e 's,-std=gnu99 ,,') |
---|
344 | CXX=$(echo "%{_host}-%{_host_cxx}" | sed -e 's,-std=gnu99 ,,') |
---|
345 | CPPFLAGS="${SB_HOST_CPPFLAGS}" |
---|
346 | CFLAGS="${SB_HOST_CFLAGS}" |
---|
347 | CXXFLAGS="${SB_HOST_CXXFLAGS}" |
---|
348 | LDFLAGS="${SB_HOST_LDFLAGS}" |
---|
349 | LDLIBS="${SB_HOST_LIBS}" |
---|
350 | LIBS="${SB_HOST_LIBS}" |
---|
351 | # Host |
---|
352 | CPPFLAGS_FOR_HOST="${SB_HOST_CPPFLAGS}" |
---|
353 | CFLAGS_FOR_HOST="${SB_HOST_CFLAGS}" |
---|
354 | CXXFLAGS_FOR_HOST="${SB_HOST_CXXFLAGS}" |
---|
355 | LDFLAGS_FOR_HOST="${SB_HOST_LDFLAGS}" |
---|
356 | LDLIBS_FOR_HOST="${SB_HOST_LIBS}" |
---|
357 | LIBS_FOR_HOST="${SB_HOST_LIBS}" |
---|
358 | CXXFLAGS_FOR_HOST="${SB_HOST_CFLAGS}" |
---|
359 | CC_FOR_HOST=$(echo "%{_host_cc} ${SB_HOST_CFLAGS}" | sed -e 's,-std=gnu99 ,,') |
---|
360 | CXX_FOR_HOST=$(echo "%{_host_cxx} ${SB_HOST_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,') |
---|
361 | # Build |
---|
362 | CFLAGS_FOR_BUILD="${SB_BUILD_CFLAGS}" |
---|
363 | CXXFLAGS_FOR_BUILD="${SB_BUILD_CXXFLAGS}" |
---|
364 | LDFLAGS_FOR_BUILD="${SB_BUILD_LDFLAGS}" |
---|
365 | LDLIBS_FOR_BUILD="${SB_BUILD_LIBS}" |
---|
366 | LIBS_FOR_BUILD="${SB_BUILD_LIBS}" |
---|
367 | CXXFLAGS_FOR_BUILD="${SB_BUILD_CFLAGS}" |
---|
368 | CC_FOR_BUILD=$(echo "%{__cc} ${SB_BUILD_CFLAGS}" | sed -e 's,-std=gnu99 ,,') |
---|
369 | CXX_FOR_BUILD=$(echo "%{__cxx} ${SB_BUILD_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,') |
---|
370 | else |
---|
371 | LDFLAGS="${SB_BUILD_LDFLAGS}" |
---|
372 | LDLIBS="${SB_BUILD_LIBS}" |
---|
373 | LIBS="${SB_BUILD_LIBS}" |
---|
374 | CC=$(echo "%{__cc} ${SB_BUILD_CFLAGS}" | sed -e 's,-std=gnu99 ,,') |
---|
375 | CXX=$(echo "%{__cxx} ${SB_BUILD_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,') |
---|
376 | CC_FOR_BUILD=${CC} |
---|
377 | CXX_FOR_BUILD=${CXX} |
---|
378 | fi |
---|
379 | export CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS LIBS LDLIBS |
---|
380 | export CC_FOR_HOST CXX_FOR_HOST CPPFLAGS_FOR_HOST CFLAGS_FOR_HOST CXXFLAGS_FOR_HOST LDFLAGS_FOR_HOST LDLIBS_FOR_HOST LIBS_FOR_HOST |
---|
381 | export CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD LDLIBS_FOR_BUILS LIBS_FOR_BUILS''' |
---|
382 | |
---|
383 | # Build/build flags. |
---|
384 | build_build_flags: none, none, ''' |
---|
385 | # Build and build flags means force build == host |
---|
386 | # gcc is not ready to be compiled with -std=gnu99 |
---|
387 | LDFLAGS="${SB_HOST_LDFLAGS}" |
---|
388 | LIBS="${SB_HOST_LIBS}" |
---|
389 | CC=$(echo "%{__cc} ${SB_CFLAGS}" | sed -e 's,-std=gnu99 ,,') |
---|
390 | CXX=$(echo "%{__cxx} ${SB_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,') |
---|
391 | CC_FOR_BUILD=${CC} |
---|
392 | CXX_FOR_BUILD=${CXX} |
---|
393 | export CC CXX CC_FOR_BUILD CXX_FOR_BUILD CFLAGS LDFLAGS LIBS''' |
---|
394 | |
---|
395 | # Default package settings |
---|
396 | _forced_static: none, none, '-Xlinker -Bstatic ${LIBS_STATIC} -Xlinker -Bdynamic' |
---|
397 | __xz: exe, required, '/usr/bin/xz' |
---|
398 | |
---|
399 | # Mail Support |
---|
400 | _mail_smtp_host: none, none, 'localhost' |
---|
401 | _mail_tools_to: none, none, 'build@rtems.org' |
---|
402 | |
---|
403 | # Newlib ICONV encodings |
---|
404 | _newlib_iconv_encodings: none, none, '''big5,cp775,cp850,cp852,cp855,\ |
---|
405 | cp866,euc_jp,euc_kr,euc_tw,iso_8859_1,iso_8859_10,iso_8859_11,\ |
---|
406 | iso_8859_13,iso_8859_14,iso_8859_15,iso_8859_2,iso_8859_3,\ |
---|
407 | iso_8859_4,iso_8859_5,iso_8859_6,iso_8859_7,iso_8859_8,iso_8859_9,\ |
---|
408 | iso_ir_111,koi8_r,koi8_ru,koi8_u,koi8_uni,ucs_2,ucs_2_internal,\ |
---|
409 | ucs_2be,ucs_2le,ucs_4,ucs_4_internal,ucs_4be,ucs_4le,us_ascii,\ |
---|
410 | utf_16,utf_16be,utf_16le,utf_8,win_1250,win_1251,win_1252,\ |
---|
411 | win_1253,win_1254,win_1255,win_1256,win_1257,win_1258''' |
---|
412 | |
---|
413 | # Waf build root suffix, only use for win32 mingw ming32 OSs |
---|
414 | # |
---|
415 | # If on Windows we need to add the driver prefix to the built root as waf |
---|
416 | # strips the driver prefix from the prefix path when joining it to the |
---|
417 | # destdir path. Waf is correct in doing this and the RSB is design to match |
---|
418 | # the configure behaviour which treats the whole path including the drive |
---|
419 | # prefix as part of the path as just a path. |
---|
420 | # |
---|
421 | waf_build_root_suffix: none, none, ' %(echo %{_prefix} | cut -c 1-2)' |
---|
422 | |
---|
423 | # Makefile.inc support for staging |
---|
424 | rtems_makefile_inc: none, none, ''' |
---|
425 | export RTEMS_ROOT=%{rtems_bsp_rtems_root} |
---|
426 | export PROJECT_RELEASE=%{rtems_bsp_prefix} |
---|
427 | export RTEMS_MAKEFILE_PATH=%{rtems_bsp_prefix} |
---|
428 | ''' |
---|