blob: 70729b2700562c3ae58948b07e7af408c4d8e87a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
#
# GDB 6.xx Version 1.
#
# This configuration file configure's, make's and install's gdb.
#
#
# See if the simulator has been disabled for Windows.
#
%if %{_host_os} == win32
%if %{defined win32-gdb-disable-sim}
%define gdb-disable-sim 1
%endif
%endif
#
# Default to building simulators.
#
%ifn %{defined gdb-disable-sim}
%define gdb-disable-sim 0
%else
%undefine gdb-sim-options
%endif
%include %{_configdir}/checks.cfg
Name: %{_target}-gdb-%{gdb_version}-%{_host}-%{release}
Summary: GDB v%{gdb_version} for target %{_target} on host %{_host}
Version: %{gdb_version}
Release: %{release}
URL: http://www.gnu.org/software/gdb/
#
# Source
#
%source set gdb http://ftp.gnu.org/gnu/gdb/gdb-%{gdb_version}.tar.bz2
#
# Disable Python on Cxc builds for now.
#
%if "%{_build}" != "%{_host}"
%define without_python
%endif
#
# Prepare the source code.
#
%prep
build_top=$(pwd)
gdb_source=%{?gdb_external:%{gdb_expand_name}}%{!?gdb_external:"gdb-%{gdb_version}"}
source_dir_gdb=${gdb_source}
%source setup gdb -q -n ${gdb_source}
%patch setup gdb -p1
cd ${build_top}
%build
build_top=$(pwd)
%{build_directory}
mkdir -p ${build_dir}
cd ${build_dir}
%{host_build_flags}
if test "%{_build}" != "%{_host}" ; then
GDB_LIBS_STATIC="-lexpat"
else
GDB_LIBS_STATIC="-lexpat"
GDB_LIBS="%{_forced_static}"
fi
LIBS_STATIC=${GDB_LIBS_STATIC} \
LIBS=${GDB_LIBS} \
../${source_dir_gdb}/configure \
--build=%{_build} --host=%{_host} \
--target=%{_target} \
--verbose --disable-nls \
--without-included-gettext \
--disable-win32-registry \
--disable-werror \
%{!?gdb-disable-sim:--enable-sim}%{?gdb-disable-sim:--disable-sim} \
%{?gdb-sim-options:%{gdb-sim-options}} \
--without-zlib \
--with-expat \
%{!?without_python:--with-python} \
--prefix=%{_prefix} --bindir=%{_bindir} \
--exec-prefix=%{_exec_prefix} \
--includedir=%{_includedir} --libdir=%{_libdir} \
--mandir=%{_mandir} --infodir=%{_infodir}
%{__make} %{?_smp_mflags} all
cd ${build_top}
%install
build_top=$(pwd)
%{__rmdir} $SB_BUILD_ROOT
cd ${build_dir}
%{__make} DESTDIR=$SB_BUILD_ROOT install
# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
%{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info*
%{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir
touch $SB_BUILD_ROOT%{_infodir}/dir
cd ${build_top}
|