source: rtems-source-builder/source-builder/config/gdb-7-1.cfg @ 81ccf41

4.104.114.95
Last change on this file since 81ccf41 was 81ccf41, checked in by Chris Johns <chrisj@…>, on 02/06/15 at 23:43:31

Update all 4.11 archs to newlib-2.2.0-1 and gdb-7.8.2 where possible.

Remove the extra gdb-7.8.1.cfg and added support to allow GDB tar
compression to be version defined. GDB has changed it default to .xz.

  • 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#
8# See if the simulator has been disabled for Windows.
9#
10%if %{_host_os} == mingw32
11 %if %{defined win32-gdb-disable-sim}
12  %define gdb-disable-sim 1
13  %endif
14%endif
15
16#
17# Default to building simulators.
18#
19%ifn %{defined gdb-disable-sim}
20 %define gdb-disable-sim 0
21%else
22 %undefine gdb-sim-options
23%endif
24
25%include %{_configdir}/checks.cfg
26
27#
28# Select Snapshot Macro Maps
29#
30%select gdb-snapshot
31%select expat-snapshot
32
33#
34# The description.
35#
36Name:      %{_target}-gdb-%{gdb_version}-%{_host}-%{release}
37Summary:   GDB v%{gdb_version} for target %{_target} on host %{_host}
38Version:   %{gdb_version}
39Release:   %{release}
40URL:       http://www.gnu.org/software/gdb/
41BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
42
43#
44# GDB has changed it default extension.
45#
46%ifn %{defined gdb_src_ext}
47  %define gdb_src_ext gz
48%endif
49
50#
51# Source
52#
53%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.%{gdb_src_ext}
54
55#
56# Disable Python on Cxc builds for now.
57#
58%if "%{_build}" != "%{_host}"
59  %define without_python
60%endif
61
62#
63#
64# Prepare the source code.
65#
66%prep
67  build_top=$(pwd)
68
69  source_dir_gdb="gdb-%{gdb_version}"
70  %source setup gdb -q -n gdb-%{gdb_version}
71  %patch setup gdb -p1
72
73  cd ${build_top}
74
75%build
76  build_top=$(pwd)
77
78  %{build_directory}
79
80  mkdir -p ${build_dir}
81  cd ${build_dir}
82
83  %{host_build_flags}
84
85  if test "%{_build}" != "%{_host}" ; then
86    GDB_LIBS_STATIC="-lexpat"
87  else
88    GDB_LIBS_STATIC="-lexpat"
89    GDB_LIBS="%{_forced_static}"
90  fi
91
92  LIBS_STATIC=${GDB_LIBS_STATIC} \
93  LIBS=${GDB_LIBS} \
94  ../${source_dir_gdb}/configure \
95    --build=%{_build} --host=%{_host} \
96    --target=%{_target} \
97    --verbose --disable-nls \
98    --without-included-gettext \
99    --disable-win32-registry \
100    --disable-werror \
101    %{!?gdb-disable-sim:--enable-sim}%{?gdb-disable-sim:--disable-sim} \
102    %{?gdb-sim-options:%{gdb-sim-options}} \
103    --without-zlib \
104    --with-expat \
105    %{!?without_python:--with-python} \
106    --prefix=%{_prefix} --bindir=%{_bindir} \
107    --exec-prefix=%{_exec_prefix} \
108    --includedir=%{_includedir} --libdir=%{_libdir} \
109    --mandir=%{_mandir} --infodir=%{_infodir}
110
111  %{__make} %{?_smp_mflags} all
112
113  cd ${build_top}
114
115%install
116  build_top=$(pwd)
117
118  %{__rmdir} $SB_BUILD_ROOT
119
120  cd ${build_dir}
121  %{__make} DESTDIR=$SB_BUILD_ROOT install
122
123  # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
124  %{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info*
125
126  %{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir
127  touch $SB_BUILD_ROOT%{_infodir}/dir
128
129  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.