source: rtems-source-builder/source-builder/config/gdb-6-1.cfg @ 96c414c

5
Last change on this file since 96c414c was 96c414c, checked in by Chris Johns <chrisj@…>, on 10/22/18 at 00:59:10

windows: Remove BuildRoot? from all configs, add a short tmp path.

Closes #3562.

  • Property mode set to 100644
File size: 2.4 KB
Line 
1#
2# GDB 6.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} == win32
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
27Name:      %{_target}-gdb-%{gdb_version}-%{_host}-%{release}
28Summary:   GDB v%{gdb_version} for target %{_target} on host %{_host}
29Version:   %{gdb_version}
30Release:   %{release}
31URL:       http://www.gnu.org/software/gdb/
32
33#
34# Source
35#
36%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
37
38#
39# Disable Python on Cxc builds for now.
40#
41%if "%{_build}" != "%{_host}"
42  %define without_python
43%endif
44
45#
46# Prepare the source code.
47#
48%prep
49  build_top=$(pwd)
50
51  gdb_source=%{?gdb_external:%{gdb_expand_name}}%{!?gdb_external:"gdb-%{gdb_version}"}
52
53  source_dir_gdb=${gdb_source}
54  %source setup gdb -q -n ${gdb_source}
55  %patch setup gdb -p1
56
57  cd ${build_top}
58
59%build
60  build_top=$(pwd)
61
62  %{build_directory}
63
64  mkdir -p ${build_dir}
65  cd ${build_dir}
66
67  %{host_build_flags}
68
69  if test "%{_build}" != "%{_host}" ; then
70    GDB_LIBS_STATIC="-lexpat"
71  else
72    GDB_LIBS_STATIC="-lexpat"
73    GDB_LIBS="%{_forced_static}"
74  fi
75
76  LIBS_STATIC=${GDB_LIBS_STATIC} \
77  LIBS=${GDB_LIBS} \
78  ../${source_dir_gdb}/configure \
79    --build=%{_build} --host=%{_host} \
80    --target=%{_target} \
81    --verbose --disable-nls \
82    --without-included-gettext \
83    --disable-win32-registry \
84    --disable-werror \
85    %{!?gdb-disable-sim:--enable-sim}%{?gdb-disable-sim:--disable-sim} \
86    %{?gdb-sim-options:%{gdb-sim-options}} \
87    --without-zlib \
88    --with-expat \
89    %{!?without_python:--with-python} \
90    --prefix=%{_prefix} --bindir=%{_bindir} \
91    --exec-prefix=%{_exec_prefix} \
92    --includedir=%{_includedir} --libdir=%{_libdir} \
93    --mandir=%{_mandir} --infodir=%{_infodir}
94
95  %{__make} %{?_smp_mflags} all
96
97  cd ${build_top}
98
99%install
100  build_top=$(pwd)
101
102  %{__rmdir} $SB_BUILD_ROOT
103
104  cd ${build_dir}
105  %{__make} DESTDIR=$SB_BUILD_ROOT install
106
107  # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
108  %{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info*
109
110  %{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir
111  touch $SB_BUILD_ROOT%{_infodir}/dir
112
113  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.