summaryrefslogtreecommitdiffstats
path: root/source-builder/config/gdb-6-1.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'source-builder/config/gdb-6-1.cfg')
-rw-r--r--source-builder/config/gdb-6-1.cfg84
1 files changed, 64 insertions, 20 deletions
diff --git a/source-builder/config/gdb-6-1.cfg b/source-builder/config/gdb-6-1.cfg
index deca448..70729b2 100644
--- a/source-builder/config/gdb-6-1.cfg
+++ b/source-builder/config/gdb-6-1.cfg
@@ -4,6 +4,24 @@
# 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}
@@ -11,7 +29,6 @@ Summary: GDB v%{gdb_version} for target %{_target} on host %{_host}
Version: %{gdb_version}
Release: %{release}
URL: http://www.gnu.org/software/gdb/
-BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
@@ -19,30 +36,55 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%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
- %source setup gdb -q -c -n %{name}-%{version}
- cd gdb-%{gdb_version}
+ 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 ..
+
+ cd ${build_top}
%build
- export PATH="%{_bindir}:${PATH}"
- mkdir -p build
- cd build
-%if "%{_build}" != "%{_host}"
- CFLAGS_FOR_BUILD="-g -O2 -Wall" \
-%endif
- CFLAGS="$SB_CFLAGS" \
- ../gdb-%{gdb_version}/configure \
+ 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 \
- --enable-sim \
+ %{!?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} \
@@ -51,19 +93,21 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
--mandir=%{_mandir} --infodir=%{_infodir}
%{__make} %{?_smp_mflags} all
- cd ..
+
+ cd ${build_top}
%install
- export PATH="%{_bindir}:${PATH}"
- rm -rf $SB_BUILD_ROOT
+ build_top=$(pwd)
+
+ %{__rmdir} $SB_BUILD_ROOT
- cd build
+ cd ${build_dir}
%{__make} DESTDIR=$SB_BUILD_ROOT install
# Dropped in FSF-binutils-2.9.5, but Cygwin still ships it.
- rm -rf $SB_BUILD_ROOT%{_infodir}/configure.info*
+ %{__rmdir} $SB_BUILD_ROOT%{_infodir}/configure.info*
- rm -f $SB_BUILD_ROOT%{_infodir}/dir
+ %{__rmfile} $SB_BUILD_ROOT%{_infodir}/dir
touch $SB_BUILD_ROOT%{_infodir}/dir
- cd ..
+ cd ${build_top}