summaryrefslogtreecommitdiffstats
path: root/source-builder
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-03-01 14:33:22 +1100
committerChris Johns <chrisj@rtems.org>2016-03-01 14:33:22 +1100
commitb537e5536459e207fc8e56a1df3774c1700606d5 (patch)
tree74d039a6e0caec4ee9585befb534736a04ab3029 /source-builder
parentFix 4.10 and 4.9 building. (diff)
downloadrtems-source-builder-b537e5536459e207fc8e56a1df3774c1700606d5.tar.bz2
Clean up 4.9 build issues.
Add support so 4.9 builds on a recent FreeBSD using clang.
Diffstat (limited to 'source-builder')
-rw-r--r--source-builder/config/gcc-4.3-1.cfg7
-rw-r--r--source-builder/config/gdb-6-1.cfg83
2 files changed, 70 insertions, 20 deletions
diff --git a/source-builder/config/gcc-4.3-1.cfg b/source-builder/config/gcc-4.3-1.cfg
index d499a15..a7b825b 100644
--- a/source-builder/config/gcc-4.3-1.cfg
+++ b/source-builder/config/gcc-4.3-1.cfg
@@ -1,11 +1,16 @@
#
-# GCC 4.7 Version 1.
+# GCC 4.3.1 Version 1.
#
# This configuration file configure's, make's and install's gcc. It uses
# newlib, MPFR, MPC, and GMP in a one-tree build configuration.
#
#
+# Force the standard of C code for GCC.
+#
+%define build_cflags %{build_cflags} --std=gnu89
+
+#
# Source
#
#
diff --git a/source-builder/config/gdb-6-1.cfg b/source-builder/config/gdb-6-1.cfg
index deca448..09c112c 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}
@@ -19,30 +37,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 +94,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}