source: rtems-source-builder/source-builder/config/gdb-7-1.cfg @ 7309d94

4.11
Last change on this file since 7309d94 was 7309d94, checked in by Chris Johns <chrisj@…>, on Mar 8, 2016 at 11:23:01 AM

sb: Add support to GDB to select a specific Python.

Detect a suitable Python version on Windows.

Update #2619.

  • Property mode set to 100644
File size: 2.9 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} == 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
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# The --with-python option is either the default which is auto or the path to
64# the specific python to be used.
65#
66%if %{defined with_python_path}
67  %define with_python_option --with-python=%{with_python_path}
68%else
69  %define with_python_option --with-python
70%endif
71
72#
73#
74# Prepare the source code.
75#
76%prep
77  build_top=$(pwd)
78
79  gdb_source=%{?gdb_external:%{gdb_expand_name}}%{!?gdb_external:"gdb-%{gdb_version}"}
80
81  source_dir_gdb=${gdb_source}
82  %source setup gdb -q -n ${gdb_source}
83  %patch setup gdb -p1
84
85  cd ${build_top}
86
87%build
88  build_top=$(pwd)
89
90  %{build_directory}
91
92  mkdir -p ${build_dir}
93  cd ${build_dir}
94
95  %{host_build_flags}
96
97  if test "%{_build}" != "%{_host}" ; then
98    GDB_LIBS_STATIC="-lexpat"
99  else
100    GDB_LIBS_STATIC="-lexpat"
101    GDB_LIBS="%{_forced_static}"
102  fi
103
104  LIBS_STATIC=${GDB_LIBS_STATIC} \
105  LIBS=${GDB_LIBS} \
106  ../${source_dir_gdb}/configure \
107    --build=%{_build} --host=%{_host} \
108    --target=%{_target} \
109    --verbose --disable-nls \
110    --without-included-gettext \
111    --disable-win32-registry \
112    --disable-werror \
113    %{!?gdb-disable-sim:--enable-sim}%{?gdb-disable-sim:--disable-sim} \
114    %{?gdb-sim-options:%{gdb-sim-options}} \
115    --without-zlib \
116    --with-expat \
117    %{!?without_python:%{with_python_option}} \
118    --prefix=%{_prefix} --bindir=%{_bindir} \
119    --exec-prefix=%{_exec_prefix} \
120    --includedir=%{_includedir} --libdir=%{_libdir} \
121    --mandir=%{_mandir} --infodir=%{_infodir}
122
123  %{__make} %{?_smp_mflags} all
124
125  cd ${build_top}
126
127%install
128  build_top=$(pwd)
129
130  %{__rmdir} $SB_BUILD_ROOT
131
132  cd ${build_dir}
133  %{__make} DESTDIR=$SB_BUILD_ROOT install
134
135  # Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
136  %{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info*
137
138  %{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir
139  touch $SB_BUILD_ROOT%{_infodir}/dir
140
141  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.