source: rtems-source-builder/source-builder/defaults.mc @ dfc4a4f

4.104.95
Last change on this file since dfc4a4f was dfc4a4f, checked in by Chris Johns <chrisj@…>, on 12/10/15 at 06:30:27

Make CVS optional. We should avoid using it.

  • Property mode set to 100644
File size: 16.1 KB
Line 
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
39nil:                 none,    none,     ''
40
41# Set to invalid values.
42_bset:               none,    none,     ''
43name:                none,    none,     ''
44version:             none,    none,     ''
45release:             none,    none,     ''
46buildname:           none,    none,     '%{name}'
47
48# The default is not released.
49rsb_released:        none,    none,     '0'
50rsb_version:         none,    none,     'no-version'
51
52# GNU triples needed to build packages
53_host:               triplet, required, ''
54_build:              triplet, required, ''
55_target:             none,    optional, ''
56
57# The user
58_uid:                none,    convert,  '%(%{__id_u} -n)'
59
60# Default flags that can be overridded to supply specific host or build
61# flags and include paths to the tools. The host is the final platform
62# the tools will run on and build is the host building the tools.
63host_cflags:         none,    convert,  '-O2 -pipe'
64host_cxxflags:       none,    convert,  '-O2 -pipe'
65host_includes:       none,    convert,  ''
66build_cflags:        none,    convert,  '-O2 -pipe'
67build_cxxflags:      none,    convert,  '-O2 -pipe'
68build_includes:      none,    convert,  ''
69
70# Extra path a platform can override.
71_extra_path:         none,    none,     '%{_sbdir}'
72_ld_library_path:    none,    none,     'LD_LIBRARY_PATH'
73
74# Paths
75_host_platform:      none,    none,     '%{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}'
76_host_cc:            none,    none,     'gcc'
77_host_cxx:           none,    none,     'g++'
78_arch:               none,    none,     '%{_host_arch}'
79_topdir:             dir,     required, '%{_cwd}'
80_configdir:          dir,     optional, '%{_topdir}/config:%{_sbdir}/config:%{_sbtop}/bare/config'
81_tardir:             dir,     optional, '%{_topdir}/tar'
82_sourcedir:          dir,     optional, '%{_topdir}/sources'
83_patchdir:           dir,     optional, '%{_topdir}/patches:%{_sbdir}/patches'
84_builddir:           dir,     optional, '%{_topdir}/build/%{buildname}'
85_buildcxcdir:        dir,     optional, '%{_topdir}/build/%{buildname}-cxc'
86_buildxcdir:         dir,     optional, '%{_topdir}/build/%{buildname}-xc'
87_docdir:             dir,     none,     '%{_defaultdocdir}'
88_tmppath:            dir,     none,     '%{_topdir}/build/tmp'
89_tmproot:            dir,     none,     '%{_tmppath}/sb-%{_uid}/%{_bset}'
90_tmpcxcroot:         dir,     none,     '%{_tmppath}/sb-%{_uid}-cxc/%{_bset}'
91buildroot:           dir,     none,     '%{_tmppath}/%{buildname}-%{_uid}'
92buildcxcroot:        dir,     none,     '%{_tmppath}/%{buildname}-%{_uid}-cxc'
93buildxcroot:         dir,     none,     '%{_tmppath}/%{buildname}-%{_uid}-xx'
94_datadir:            dir,     none,     '%{_prefix}/share'
95_defaultdocdir:      dir,     none,     '%{_prefix}/share/doc'
96_exeext:             none,    none,     ''
97_exec_prefix:        dir,     none,     '%{_prefix}'
98_bindir:             dir,     none,     '%{_exec_prefix}/bin'
99_sbindir:            dir,     none,     '%{_exec_prefix}/sbin'
100_libexecdir:         dir,     none,     '%{_exec_prefix}/libexec'
101_datarootdir:        dir,     none,     '%{_prefix}/share'
102_datadir:            dir,     none,     '%{_datarootdir}'
103_sysconfdir:         dir,     none,     '%{_prefix}/etc'
104_sharedstatedir:     dir,     none,     '%{_prefix}/com'
105_localstatedir:      dir,     none,     '%{prefix}/var'
106_includedir:         dir,     none,     '%{_prefix}/include'
107_lib:                dir,     none,     'lib'
108_libdir:             dir,     none,     '%{_exec_prefix}/%{_lib}'
109_libexecdir:         dir,     none,     '%{_exec_prefix}/libexec'
110_mandir:             dir,     none,     '%{_datarootdir}/man'
111_infodir:            dir,     none,     '%{_datarootdir}/info'
112_localedir:          dir,     none,     '%{_datarootdir}/locale'
113_localedir:          dir,     none,     '%{_datadir}/locale'
114_localstatedir:      dir,     none,     '%{_prefix}/var'
115_pathprepend:        none,    none,     ''
116_pathpostpend:       none,    none,     ''
117_prefix:             dir,     none,     '%{_usr}'
118_usr:                dir,     none,     '/usr/local'
119_usrsrc:             dir,     none,     '%{_usr}/src'
120_var:                dir,     none,     '/usr/local/var'
121_varrun:             dir,     none,     '%{_var}/run'
122
123# Defaults, override in platform specific modules.
124___setup_shell:      exe,     required, '/bin/sh'
125__aclocal:           exe,     optional, 'aclocal'
126__ar:                exe,     required, 'ar'
127__arch_install_post: exe,     none,     '%{nil}'
128__as:                exe,     required, 'as'
129__autoconf:          exe,     optional, 'autoconf'
130__autoheader:        exe,     optional, 'autoheader'
131__automake:          exe,     optional, 'automake'
132__autoreconf:        exe,     optional, 'autoreconf'
133__awk:               exe,     required, 'awk'
134__bash:              exe,     optional, '/bin/bash'
135__bison:             exe,     required, '/usr/bin/bison'
136__bzip2:             exe,     required, '/usr/bin/bzip2'
137__cat:               exe,     required, '/bin/cat'
138__cc:                exe,     required, '/usr/bin/gcc'
139__chgrp:             exe,     required, '/usr/bin/chgrp'
140__chmod:             exe,     required, '/bin/chmod'
141__chown:             exe,     required, '/usr/sbin/chown'
142__cp:                exe,     required, '/bin/cp'
143__cpp:               exe,     none,     '%{__cc} -E'
144__cvs:               exe,     optional, '/usr/bin/cvs'
145__cvs_z:             none,    none,     '%{__cvs} -z 9'
146__cxx:               exe,     required, '/usr/bin/g++'
147__flex:              exe,     required, '/usr/bin/flex'
148__git:               exe,     required, '/usr/bin/git'
149__grep:              exe,     required, '/usr/bin/grep'
150__gzip:              exe,     required, '/usr/bin/gzip'
151__id:                exe,     required, '/usr/bin/id'
152__id_u:              exe,     none,     '%{__id} -u'
153__install:           exe,     required, '/usr/bin/install'
154__install_info:      exe,     optional, '/usr/bin/install-info'
155__ld:                exe,     required, '/usr/bin/ld'
156__ldconfig:          exe,     required, '/sbin/ldconfig'
157__ln_s:              exe,     none,     'ln -s'
158__make:              exe,     required, 'make'
159__makeinfo:          exe,     required, '/usr/bin/makeinfo'
160__mkdir:             exe,     required, '/bin/mkdir'
161__mkdir_p:           exe,     none,     '/bin/mkdir -p'
162__mv:                exe,     required, '/bin/mv'
163__nm:                exe,     required, '/usr/bin/nm'
164__objcopy:           exe,     optional, '/usr/bin/objcopy'
165__objdump:           exe,     optional, '/usr/bin/objdump'
166__patch_bin:         exe,     required, '/usr/bin/patch'
167__patch_opts:        none,    none,     '%{nil}'
168__patch:             exe,     none,     '%{__patch_bin} %{__patch_opts}'
169__perl:              exe,     optional, 'perl'
170__svn:               exe,     optional, '/usr/bin/svn'
171__ranlib:            exe,     required, 'ranlib'
172__rm:                exe,     required, '/bin/rm'
173__rmfile:            exe,     none,     '%{__rm} -f'
174__rmdir:             exe,     none,     '%{__rm} -rf'
175__sed:               exe,     required, '/usr/bin/sed'
176__setup_post:        exe,     none,     '%{__chmod} -R a+rX,g-w,o-w .'
177__sh:                exe,     required, '/bin/sh'
178__tar:               exe,     required, '/usr/bin/tar'
179__tar_extract:       exe,     none,     '%{__tar} -xvvf'
180__touch:             exe,     required, '/usr/bin/touch'
181__unzip:             exe,     required, '/usr/bin/unzip'
182__xz:                exe,     required, '/usr/bin/xz'
183
184# Shell Build Settings.
185___build_args:       none,    none,     '-e'
186___build_cmd:        none,    none,     '%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}'
187___build_post:       none,    none,     'exit 0'
188
189# Prebuild set up script.
190___build_pre:        none,    none,     '''# ___build_pre in as set up in defaults.py
191# Save the original path away.
192export SB_ORIG_PATH=${PATH}
193# Directories
194%{?_prefix:SB_PREFIX="%{_prefix}"}
195%{?_prefix:SB_PREFIX_CLEAN=$(echo "%{_prefix}" | %{__sed} -e 's/^\///')}
196SB_SOURCE_DIR="%{_sourcedir}"
197SB_BUILD_DIR="%{_builddir}"
198# host == build, use build; host != build , host uses host and build uses build
199SB_HOST_CFLAGS="%{host_cflags} %{host_includes}"
200SB_HOST_CXXFLAGS="%{host_cxxflags} %{host_includes}"
201SB_HOST_LDFLAGS="%{?host_ldflags:%{host_ldflags}}%{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}"
202SB_BUILD_CFLAGS="%{build_cflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}"
203SB_BUILD_CXXFLAGS="%{build_cxxflags} %{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include}"
204SB_BUILD_LDFLAGS="%{?build_ldflags:%{build_ldflags}}%{?_tmproot:-L%{_tmproot}/${SB_PREFIX_CLEAN}/lib}"
205SB_CFLAGS="${SB_BUILD_CFLAGS} %{build_includes}"
206SB_CXXFLAGS="${SB_BUILD_CXXFLAGS} %{build_includes}"
207SB_ARCH="%{_arch}"
208SB_OS="%{_os}"
209export SB_SOURCE_DIR SB_BUILD_DIR SB_ARCH SB_OS
210export SB_HOST_CFLAGS SB_HOST_CXXFLAGS SB_HOST_LDFLAGS
211export SB_BUILD_CFLAGS SB_BUILD_CXXFLAGS SB_BUILD_LDFLAGS
212export SB_CFLAGS SB_CXXFLAGS
213# Documentation
214SB_DOC_DIR="%{_docdir}"
215export SB_DOC_DIR
216# Packages
217SB_PACKAGE_NAME="%{name}"
218SB_PACKAGE_BUILDNAME="%{buildname}"
219SB_PACKAGE_VERSION="%{version}"
220SB_PACKAGE_RELEASE="%{release}"
221export SB_PACKAGE_NAME SB_PACKAGE_VERSION SB_PACKAGE_RELEASE
222# Build directories
223export SB_PREFIX
224%{?_builddir:SB_BUILD_DIR="%{_builddir}"}
225%{?buildroot:SB_BUILD_ROOT="%{buildroot}"}
226%{?buildroot:%{?_prefix:SB_BUILD_ROOT_BINDIR="%{buildroot}/${SB_PREFIX_CLEAN}/bin"}}
227export SB_BUILD_ROOT SB_BUILD_DIR SB_BUILD_ROOT_BINDIR
228%{?_buildcxcdir:SB_BUILD_CXC_DIR="%{_buildcxcdir}"}
229%{?buildcxcroot:SB_BUILD_CXC_ROOT="%{buildcxcroot}"}
230%{?buildcxcroot:%{?_prefix:SB_BUILD_CXC_ROOT_BINDIR="%{buildcxcroot}/${SB_PREFIX_CLEAN}/bin"}}
231export SB_BUILD_CXC_ROOT SB_BUILD_CXC_DIR SB_BUILD_CXC_ROOT_BINDIR
232%{?_tmproot:SB_TMPROOT="%{_tmproot}"}
233%{?_tmproot:%{?_prefix:SB_TMPPREFIX="%{_tmproot}/${SB_PREFIX_CLEAN}"}}
234%{?_tmproot:%{?_prefix:SB_TMPBINDIR="%{_tmproot}/${SB_PREFIX_CLEAN}/bin"}}
235export SB_TMPROOT SB_TMPPREFIX SB_TMPBINDIR
236%{?_tmpcxcroot:SB_TMPCXCROOT="%{_tmproot}"}
237%{?_tmpcxcroot:%{?_prefix:SB_TMPCXCPREFIX="%{_tmpcxcroot}/${SB_PREFIX_CLEAN}"}}
238%{?_tmpcxcroot:%{?_prefix:SB_TMPCXCBINDIR="%{_tmpcxcroot}/${SB_PREFIX_CLEAN}/bin"}}
239export SB_TMPCXCROOT SB_TMPCXCPREFIX SB_TMPCXCBINDIR
240# Extra path support
241%{?_extra_path:SB_EXTRAPATH="%{_extra_path}"}
242# The compiler flags
243%{?_targetcflags:CFLAGS_FOR_TARGET="%{_targetcflags}"}
244%{?_targetcxxflags:CXXFLAGS_FOR_TARGET="%{_targetcxxflags}"}
245export CFLAGS_FOR_TARGET
246export CXXFLAGS_FOR_TARGET
247# Set up the path. Put the CXC path first.
248if test -n "${SB_TMPBINDIR}" ; then
249 PATH="${SB_TMPBINDIR}:$PATH"
250fi
251if test -n "${SB_TMPCXCBINDIR}" ; then
252 PATH="${SB_TMPCXCBINDIR}:$PATH"
253fi
254if test -n "${SB_EXTRAPATH}" ; then
255 PATH="${SB_EXTRAPATH}:$PATH"
256fi
257%{?_pathprepend:PATH="%{_pathprepend}:$PATH"}
258%{?_pathpostpend:PATH="$PATH:%{_pathpostpend}"}
259export PATH
260# Default environment set up.
261LANG=C
262export LANG
263unset DISPLAY || :
264umask 022
265cd "%{_builddir}"'''
266
267___build_shell:      none,    none,     '%{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}'
268
269___build_template:   none,    none,     '''#!%{___build_shell}
270%{___build_pre}
271%{nil}'''
272
273# Configure command
274configure:           none,    none,     '''
275CFLAGS="${CFLAGS:-${SB_CFLAGS}" ; export CFLAGS ;
276CXXFLAGS="${CXXFLAGS:-${SB_CFLAGS}}" ; export CXXFLAGS ;
277FFLAGS="${FFLAGS:-${SB_CFLAGS}}" ; export FFLAGS ;
278./configure --build=%{_build} --host=%{_host} \
279      --target=%{_target_platform} \
280      --program-prefix=%{?_program_prefix} \
281      --prefix=%{_prefix} \
282      --exec-prefix=%{_exec_prefix} \
283      --bindir=%{_bindir} \
284      --sbindir=%{_sbindir} \
285      --sysconfdir=%{_sysconfdir} \
286      --datadir=%{_datadir} \
287      --includedir=%{_includedir} \
288      --libdir=%{_libdir} \
289      --libexecdir=%{_libexecdir} \
290      --localstatedir=%{_localstatedir} \
291      --sharedstatedir=%{_sharedstatedir} \
292      --mandir=%{_mandir} \
293      --infodir=%{_infodir}'''
294
295# Build script support.
296build_directory:     none,    none,     '''
297if test "%{_build}" != "%{_host}" ; then
298  if test -z "%{_target}" ; then
299    build_dir="build-xc"
300  else
301    build_dir="build-cxc"
302  fi
303else
304  build_dir="build"
305fi'''
306
307# Host/build flags.
308host_build_flags:    none,    none,     '''
309# Host and build flags, Cross build if host and build are different and
310# Cxc build if target is deifned and also different.
311# Note, gcc is not ready to be compiled with -std=gnu99 (this needs to be checked).
312if test "%{_build}" != "%{_host}" ; then
313  # Cross build
314  CC=$(echo "%{_host}-%{_host_cc}" | sed -e 's,-std=gnu99 ,,')
315  CXX=$(echo "%{_host}-%{_host_cxx}" | sed -e 's,-std=gnu99 ,,')
316  CFLAGS="${SB_HOST_CFLAGS}"
317  CXXFLAGS="${SB_HOST_CXXFLAGS}"
318  LDFLAGS="${SB_HOST_LDFLAGS}"
319  # Host
320  CFLAGS_FOR_HOST="${SB_HOST_CFLAGS}"
321  CXXFLAGS_FOR_HOST="${SB_HOST_CXXFLAGS}"
322  LDFLAGS_FOR_HOST="${SB_HOST_LDFLAGS}"
323  CXXFLAGS_FOR_HOST="${SB_HOST_CFLAGS}"
324  CC_FOR_HOST=$(echo "%{_host_cc} ${SB_HOST_CFLAGS}" | sed -e 's,-std=gnu99 ,,')
325  CXX_FOR_HOST=$(echo "%{_host_cxx} ${SB_HOST_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,')
326  # Build
327  CFLAGS_FOR_BUILD="${SB_BUILD_CFLAGS}"
328  CXXFLAGS_FOR_BUILD="${SB_BUILD_CXXFLAGS}"
329  LDFLAGS_FOR_BUILD="${SB_BUILD_LDFLAGS}"
330  CXXFLAGS_FOR_BUILD="${SB_BUILD_CFLAGS}"
331  CC_FOR_BUILD=$(echo "%{__cc} ${SB_BUILD_CFLAGS}" | sed -e 's,-std=gnu99 ,,')
332  CXX_FOR_BUILD=$(echo "%{__cxx} ${SB_BUILD_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,')
333else
334  LDFLAGS="${SB_BUILD_LDFLAGS}"
335  CC=$(echo "%{__cc} ${SB_BUILD_CFLAGS}" | sed -e 's,-std=gnu99 ,,')
336  CXX=$(echo "%{__cxx} ${SB_BUILD_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,')
337  CC_FOR_BUILD=${CC}
338  CXX_FOR_BUILD=${CXX}
339fi
340export CC CXX CFLAGS CXXFLAGS LDFLAGS
341export CC_FOR_HOST CXX_FOR_HOST CFLAGS_FOR_HOST CXXFLAGS_FOR_HOST LDFLAGS_FOR_HOST
342export CC_FOR_BUILD CXX_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD'''
343
344# Build/build flags.
345build_build_flags:    none,    none,     '''
346# Build and build flags means force build == host
347# gcc is not ready to be compiled with -std=gnu99
348LDFLAGS="${SB_HOST_LDFLAGS}"
349CC=$(echo "%{__cc} ${SB_CFLAGS}" | sed -e 's,-std=gnu99 ,,')
350CXX=$(echo "%{__cxx} ${SB_CXXFLAGS}" | sed -e 's,-std=gnu99 ,,')
351CC_FOR_BUILD=${CC}
352CXX_FOR_BUILD=${CXX}
353export CC CXX CC_FOR_BUILD CXX_FOR_BUILD CFLAGS LDFLAGS'''
354
355# Default package settings
356_forced_static:     none,         none, '-Xlinker -Bstatic ${LIBS_STATIC} -Xlinker -Bdynamic'
357__xz:                exe,     required, '/usr/bin/xz'
358
359# Mail Support
360_mail_smtp_host:   none,         none, 'localhost'
361_mail_tools_to:    none,         none, 'rtems-tooltestresults@rtems.org'
362
363# Newlib ICONV encodings
364_newlib_iconv_encodings: none,      none, '''big5,cp775,cp850,cp852,cp855,\
365cp866,euc_jp,euc_kr,euc_tw,iso_8859_1,iso_8859_10,iso_8859_11,\
366iso_8859_13,iso_8859_14,iso_8859_15,iso_8859_2,iso_8859_3,\
367iso_8859_4,iso_8859_5,iso_8859_6,iso_8859_7,iso_8859_8,iso_8859_9,\
368iso_ir_111,koi8_r,koi8_ru,koi8_u,koi8_uni,ucs_2,ucs_2_internal,\
369ucs_2be,ucs_2le,ucs_4,ucs_4_internal,ucs_4be,ucs_4le,us_ascii,\
370utf_16,utf_16be,utf_16le,utf_8,win_1250,win_1251,win_1252,\
371win_1253,win_1254,win_1255,win_1256,win_1257,win_1258'''
Note: See TracBrowser for help on using the repository browser.