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

4.104.114.9
Last change on this file since ff91af2 was ff91af2, checked in by Chris Johns <chrisj@…>, on Apr 15, 2013 at 1:45:00 AM

Add _forced_static to the default.

This is used in the configuration scripts to specify which
libraries you want to be linked as static. For gdb this is
libexpat which is built as part of most build sets.

  • Property mode set to 100644
File size: 10.9 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,     ''
46
47# GNU triples needed to build packages
48_host:               triplet, required, ''
49_build:              triplet, required, '%{_host}'
50_target:             none,    optional, ''
51
52# Paths
53_host_platform:      none,    none,     '%{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}'
54_arch:               none,    none,     '%{_host_arch}'
55_topdir:             dir,     required, '%{_cwd}'
56_configdir:          dir,     optional, '%{_topdir}/config:%{_sbdir}/config'
57_tardir:             dir,     optional, '%{_topdir}/tar'
58_sourcedir:          dir,     optional, '%{_topdir}/sources'
59_patchdir:           dir,     optional, '%{_topdir}/patches:%{_sbdir}/patches'
60_builddir:           dir,     optional, '%{_topdir}/build/%{name}-%{version}-%{release}'
61_buildcxcdir:        dir,     optional, '%{_topdir}/build/%{name}-%{version}-%{release}-cxc'
62_docdir:             dir,     none,     '%{_defaultdocdir}'
63_tmppath:            dir,     none,     '%{_topdir}/build/tmp'
64_tmproot:            dir,     none,     '%{_tmppath}/source-build-%(%{__id_u} -n)/%{_bset}'
65_tmpcxcroot:         dir,     none,     '%{_tmppath}/source-build-%(%{__id_u} -n)-cxc/%{_bset}'
66buildroot:           dir,     none,     '%{_tmppath}/%{name}-root-%(%{__id_u} -n)'
67buildcxcroot:        dir,     none,     '%{_tmppath}/%{name}-root-%(%{__id_u} -n)-cxc'
68_datadir:            dir,     none,     '%{_prefix}/share'
69_defaultdocdir:      dir,     none,     '%{_prefix}/share/doc'
70_exeext:             none,    none,     ''
71_exec_prefix:        dir,     none,     '%{_prefix}'
72_bindir:             dir,     none,     '%{_exec_prefix}/bin'
73_sbindir:            dir,     none,     '%{_exec_prefix}/sbin'
74_libexecdir:         dir,     none,     '%{_exec_prefix}/libexec'
75_datarootdir:        dir,     none,     '%{_prefix}/share'
76_datadir:            dir,     none,     '%{_datarootdir}'
77_sysconfdir:         dir,     none,     '%{_prefix}/etc'
78_sharedstatedir:     dir,     none,     '%{_prefix}/com'
79_localstatedir:      dir,     none,     '%{prefix}/var'
80_includedir:         dir,     none,     '%{_prefix}/include'
81_lib:                dir,     none,     'lib'
82_libdir:             dir,     none,     '%{_exec_prefix}/%{_lib}'
83_libexecdir:         dir,     none,     '%{_exec_prefix}/libexec'
84_mandir:             dir,     none,     '%{_datarootdir}/man'
85_infodir:            dir,     none,     '%{_datarootdir}/info'
86_localedir:          dir,     none,     '%{_datarootdir}/locale'
87_localedir:          dir,     none,     '%{_datadir}/locale'
88_localstatedir:      dir,     none,     '%{_prefix}/var'
89_prefix:             dir,     none,     '%{_usr}'
90_usr:                dir,     none,     '/usr/local'
91_usrsrc:             dir,     none,     '%{_usr}/src'
92_var:                dir,     none,     '/usr/local/var'
93_varrun:             dir,     none,     '%{_var}/run'
94
95# Defaults, override in platform specific modules.
96___setup_shell:      exe,     required, '/bin/sh'
97__aclocal:           exe,     optional, 'aclocal'
98__ar:                exe,     required, 'ar'
99__arch_install_post: exe,     none,     '%{nil}'
100__as:                exe,     required, 'as'
101__autoconf:          exe,     required, 'autoconf'
102__autoheader:        exe,     required, 'autoheader'
103__automake:          exe,     required, 'automake'
104__awk:               exe,     required, 'awk'
105__bash:              exe,     optional, '/bin/bash'
106__bison:             exe,     required, '/usr/bin/bison'
107__bzip2:             exe,     required, '/usr/bin/bzip2'
108__cat:               exe,     required, '/bin/cat'
109__cc:                exe,     required, '/usr/bin/gcc'
110__chgrp:             exe,     required, '/usr/bin/chgrp'
111__chmod:             exe,     required, '/bin/chmod'
112__chown:             exe,     required, '/usr/sbin/chown'
113__cp:                exe,     required, '/bin/cp'
114__cpp:               exe,     none,     '%{__cc} -E'
115__cxx:               exe,     required, '/usr/bin/g++'
116__flex:              exe,     required, '/usr/bin/flex'
117__git:               exe,     required, '/usr/bin/git'
118__grep:              exe,     required, '/usr/bin/grep'
119__gzip:              exe,     required, '/usr/bin/gzip'
120__id:                exe,     required, '/usr/bin/id'
121__id_u:              exe,     none,     '%{__id} -u'
122__install:           exe,     required, '/usr/bin/install'
123__install_info:      exe,     optional, '/usr/bin/install-info'
124__ld:                exe,     required, '/usr/bin/ld'
125__ldconfig:          exe,     required, '/sbin/ldconfig'
126__ln_s:              exe,     none,     'ln -s'
127__make:              exe,     required, 'make'
128__makeinfo:          exe,     required, '/usr/bin/makeinfo'
129__mkdir:             exe,     required, '/bin/mkdir'
130__mkdir_p:           exe,     none,     '/bin/mkdir -p'
131__mv:                exe,     required, '/bin/mv'
132__nm:                exe,     required, '/usr/bin/nm'
133__objcopy:           exe,     optional, '/usr/bin/objcopy'
134__objdump:           exe,     optional, '/usr/bin/objdump'
135__patch_bin:         exe,     required, '/usr/bin/patch'
136__patch_opts:        none,    none,     '%{nil}'
137__patch:             exe,     none,     '%{__patch_bin} %{__patch_opts}'
138__perl:              exe,     optional, 'perl'
139__ranlib:            exe,     required, 'ranlib'
140__rm:                exe,     required, '/bin/rm'
141__rmfile:            exe,     none,     '%{__rm} -f'
142__rmdir:             exe,     none,     '%{__rm} -rf'
143__sed:               exe,     required, '/usr/bin/sed'
144__setup_post:        exe,     none,     '%{__chmod} -R a+rX,g-w,o-w .'
145__sh:                exe,     required, '/bin/sh'
146__tar:               exe,     required, '/usr/bin/tar'
147__tar_extract:       exe,     none,     '%{__tar} -xvvf'
148__touch:             exe,     required, '/usr/bin/touch'
149__unzip:             exe,     required, '/usr/bin/unzip'
150__xz:                exe,     required, '/usr/bin/xz'
151
152# Shell Build Settings.
153___build_args:       none,    none,     '-e'
154___build_cmd:        none,    none,     '%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}'
155___build_post:       none,    none,     'exit 0'
156
157# Prebuild set up script.
158___build_pre:        none,    none,     '''# ___build_pre in as set up in defaults.py
159# Save the original path away.
160export SB_ORIG_PATH=${PATH}
161# Directories
162%{?_prefix:SB_PREFIX="%{_prefix}"}
163%{?_prefix:SB_PREFIX_CLEAN=$(echo "%{_prefix}" | %{__sed} -e 's/^\///')}
164SB_SOURCE_DIR="%{_sourcedir}"
165SB_BUILD_DIR="%{_builddir}"
166SB_OPT_FLAGS="%{?_tmproot:-I%{_tmproot}/${SB_PREFIX_CLEAN}/include -L%{_tmproot}/${SB_PREFIX_CLEAN}/lib} %{optflags}"
167SB_ARCH="%{_arch}"
168SB_OS="%{_os}"
169export SB_SOURCE_DIR SB_BUILD_DIR SB_OPT_FLAGS SB_ARCH SB_OS
170# Documentation
171SB_DOC_DIR="%{_docdir}"
172export SB_DOC_DIR
173# Packages
174SB_PACKAGE_NAME="%{name}"
175SB_PACKAGE_VERSION="%{version}"
176SB_PACKAGE_RELEASE="%{release}"
177export SB_PACKAGE_NAME SB_PACKAGE_VERSION SB_PACKAGE_RELEASE
178# Build directories
179export SB_PREFIX
180%{?_builddir:SB_BUILD_DIR="%{_builddir}"}
181%{?buildroot:SB_BUILD_ROOT="%{buildroot}"}
182%{?buildroot:%{?_prefix:SB_BUILD_ROOT_BINDIR="%{buildroot}/${SB_PREFIX_CLEAN}/bin"}}
183export SB_BUILD_ROOT SB_BUILD_DIR SB_BUILD_ROOT_BINDIR
184%{?_buildcxcdir:SB_BUILD_CXC_DIR="%{_buildcxcdir}"}
185%{?buildcxcroot:SB_BUILD_CXC_ROOT="%{buildcxcroot}"}
186%{?buildcxcroot:%{?_prefix:SB_BUILD_CXC_ROOT_BINDIR="%{buildcxcroot}/${SB_PREFIX_CLEAN}/bin"}}
187export SB_BUILD_CXC_ROOT SB_BUILD_CXC_DIR SB_BUILD_CXC_ROOT_BINDIR
188%{?_tmproot:SB_TMPROOT="%{_tmproot}"}
189%{?_tmproot:%{?_prefix:SB_TMPPREFIX="%{_tmproot}/${SB_PREFIX_CLEAN}"}}
190%{?_tmproot:%{?_prefix:SB_TMPBINDIR="%{_tmproot}/${SB_PREFIX_CLEAN}/bin"}}
191export SB_TMPROOT SB_TMPPREFIX SB_TMPBINDIR
192%{?_tmpcxcroot:SB_TMPCXCROOT="%{_tmproot}"}
193%{?_tmpcxcroot:%{?_prefix:SB_TMPCXCPREFIX="%{_tmpcxcroot}/${SB_PREFIX_CLEAN}"}}
194%{?_tmpcxcroot:%{?_prefix:SB_TMPCXCBINDIR="%{_tmpcxcroot}/${SB_PREFIX_CLEAN}/bin"}}
195export SB_TMPCXCROOT SB_TMPCXCPREFIX SB_TMPCXCBINDIR
196# The compiler flags
197%{?_targetcflags:CFLAGS_FOR_TARGET="%{_targetcflags}"}
198%{?_targetcxxflags:CXXFLAGS_FOR_TARGET="%{_targetcxxflags}"}
199export CFLAGS_FOR_TARGET
200export CXXFLAGS_FOR_TARGET
201# Set up the path. Put the CXC path first.
202if test -n "${SB_TMPBINDIR}" ; then
203 PATH="${SB_TMPBINDIR}:$PATH"
204fi
205if test -n "${SB_TMPCXCBINDIR}" ; then
206 PATH="${SB_TMPCXCBINDIR}:$PATH"
207fi
208export PATH
209# Default environment set up.
210LANG=C
211export LANG
212unset DISPLAY || :
213umask 022
214cd "%{_builddir}"'''
215
216___build_shell:      none,    none,     '%{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}'
217
218___build_template:   none,    none,     '''#!%{___build_shell}
219%{___build_pre}
220%{nil}'''
221
222# Configure command
223configure:           none,    none,     '''
224CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
225CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ;
226FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ;
227./configure --build=%{_build} --host=%{_host} \
228      --target=%{_target_platform} \
229      --program-prefix=%{?_program_prefix} \
230      --prefix=%{_prefix} \
231      --exec-prefix=%{_exec_prefix} \
232      --bindir=%{_bindir} \
233      --sbindir=%{_sbindir} \
234      --sysconfdir=%{_sysconfdir} \
235      --datadir=%{_datadir} \
236      --includedir=%{_includedir} \
237      --libdir=%{_libdir} \
238      --libexecdir=%{_libexecdir} \
239      --localstatedir=%{_localstatedir} \
240      --sharedstatedir=%{_sharedstatedir} \
241      --mandir=%{_mandir} \
242      --infodir=%{_infodir}'''
243
244# Default package settings
245_forced_static:     none,         none, '-Xlinker -Bstatic ${LIBS_STATIC} -Xlinker -Bdynamic'
246__xz:                exe,     required, '/usr/bin/xz'
Note: See TracBrowser for help on using the repository browser.