source: rtems-source-builder/source-builder/config/gdb-7-1.cfg @ 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: 2.6 KB
Line 
1#
2# GDB 7.xx Version 1.
3#
4# This configuration file configure's, make's and install's gdb.
5#
6
7%include %{_configdir}/checks.cfg
8
9Name:      %{_target}-gdb-%{gdb_version}-%{release}
10Summary:   GDB v%{gdb_version} for target %{_target} on host %{_host}
11Version:   %{gdb_version}
12Release:   %{release}
13URL:       http://www.gnu.org/software/gdb/
14BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
15
16#
17# Source
18#
19%ifn %{defined Source0}
20 Source0: http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
21 VersionControl0 git clone git://sourceware.org/git/gdb.git
22%endif
23
24#
25# Disable Python on Cxc builds for now.
26#
27%if "%{_build}" != "%{_host}"
28  %define without_python
29%endif
30
31#
32#
33# Prepare the source code.
34#
35%prep
36  %setup -q -c -n %{name}-%{version}
37  cd gdb-%{gdb_version}
38  %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}}
39  %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}}
40  %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}}
41  %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}}
42  %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}}
43  %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}}
44  %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}}
45  %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}}
46  %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}}
47  %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}}
48  cd ..
49
50%build
51  if test "%{_build}" != "%{_host}" ; then
52    build_dir="build-cxc"
53  else
54    build_dir="build"
55  fi
56  mkdir -p ${build_dir}
57  cd ${build_dir}
58  if test "%{_build}" != "%{_host}" ; then
59    CFLAGS_FOR_BUILD="-g -O2 -Wall"
60  fi
61  LIBS_STATIC="-lexpat"
62  CFLAGS="$SB_OPT_FLAGS" \
63  LIBS="%{_forced_static}" \
64  ../gdb-%{gdb_version}/configure \
65    --build=%{_build} --host=%{_host} \
66    --target=%{_target} \
67    --verbose --disable-nls \
68    --without-included-gettext \
69    --disable-win32-registry \
70    --disable-werror \
71    --enable-sim \
72    --with-expat \
73    %{!?without_python:--with-python} \
74    --prefix=%{_prefix} --bindir=%{_bindir} \
75    --exec-prefix=%{_exec_prefix} \
76    --includedir=%{_includedir} --libdir=%{_libdir} \
77    --mandir=%{_mandir} --infodir=%{_infodir}
78
79  %{__make} %{?_smp_mflags} all
80  cd ..
81
82%install
83  %{__rmdir} $SB_BUILD_ROOT
84
85  cd ${build_dir}
86  %{__make} DESTDIR=$SB_BUILD_ROOT install
87
88  # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
89  %{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info*
90
91  %{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir
92  touch $SB_BUILD_ROOT%{_infodir}/dir
93
94  cd ..
Note: See TracBrowser for help on using the repository browser.