source: rtems-source-builder/source-builder/defaults.mc @ 6201a0dd

4.104.114.95
Last change on this file since 6201a0dd was 6201a0dd, checked in by Chris Johns <chrisj@…>, on 08/14/13 at 03:55:33

config: Add the iconv encodings to the defaults.

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