[rtems-source-builder commit] Clean up 4.9 build issues.

Chris Johns chrisj at rtems.org
Tue Mar 1 03:36:26 UTC 2016


Module:    rtems-source-builder
Branch:    master
Commit:    b537e5536459e207fc8e56a1df3774c1700606d5
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=b537e5536459e207fc8e56a1df3774c1700606d5

Author:    Chris Johns <chrisj at rtems.org>
Date:      Tue Mar  1 14:33:22 2016 +1100

Clean up 4.9 build issues.

Add support so 4.9 builds on a recent FreeBSD using clang.

---

 .../tools/rtems-gcc-4.3.2-newlib-1.16.0-1.cfg      | 12 ++++
 rtems/config/tools/rtems-gdb-6.8-1.cfg             |  8 +++
 rtems/config/tools/rtems-kernel-4.9.6-1.cfg        |  2 +
 source-builder/config/gcc-4.3-1.cfg                |  7 +-
 source-builder/config/gdb-6-1.cfg                  | 83 +++++++++++++++++-----
 5 files changed, 92 insertions(+), 20 deletions(-)

diff --git a/rtems/config/tools/rtems-gcc-4.3.2-newlib-1.16.0-1.cfg b/rtems/config/tools/rtems-gcc-4.3.2-newlib-1.16.0-1.cfg
index d1af911..2ef31bb 100644
--- a/rtems/config/tools/rtems-gcc-4.3.2-newlib-1.16.0-1.cfg
+++ b/rtems/config/tools/rtems-gcc-4.3.2-newlib-1.16.0-1.cfg
@@ -24,6 +24,18 @@
 %patch  add newlib %{rtems_newlib_patches}/newlib-1.16.0-rtems4.9-20090324.diff
 
 #
+# Checksums.
+#
+%hash sha512 gcc-core-4.3.2.tar.bz2 7fa7cfd57b3cb37990f41132037666d511a480df28d6d5a0620520501488abad89c7843067188bbe23f0c4d3eb5d113537a6a9375135596b58b3d7a848dc8a39
+%hash sha512 gcc-core-4.3.2-rtems4.9-20090825.diff d326372a756a7289404031eb16dcc51c15259342ea3f8697f23cfa754ee38305d5e6aaeef56c83f11cdd28c85711c430d894a87303ad932b024a17fa4aaa4f63
+%hash sha512 gcc-g++-%{gcc_version}.tar.bz2 b349344a9ea67418cca4b7465263e7c28b28008b9fbd76d7db2fb4ad38e63a943c601bc33e641319d48a48a8848562afff96c9ddaf90141d9ab835be6b955bb7
+%hash sha512 mpfr-2.4.2.tar.bz2 c004b3dbf86c04960e4a1f8db37a409a7cc4cb76135e76e98dcc5ad93aaa8deb62334ee13ff84447a7c12a5e8cb57f25c62ac908c24920f1fb1a38d79d4a4c5e
+%hash sha512 mpc-0.8.2.tar.gz dcaac3897adf1411e1199e295e88d7438afc600f412565c3b450b0102b83751eb160f85b7522891195ff0a0a29fccedd07dc011a950969a0979c4e3d4efc1e10
+%hash sha512 gmp-5.0.5.tar.bz2 64ba88a4a64fefb16eae9c644ea81194011ea0b42664a5af6b014e7da3d0f09605dee518b9a361b06510311cdfd496ab68d09da3d85d6680bdac3f765eb67f61
+%hash sha512 newlib-1.16.0.tar.gz 40eb96bbc6736a16b6399e0cdb73e853d0d90b685c967e77899183446664d64570277a633fdafdefc351b46ce210a99115769a1d9f47ac749d7e82837d4d1ac3
+%hash sha512 newlib-1.16.0-rtems4.9-20090324.diff 6222e85dc8a5f49089742b09348b4f9663861d8c41dba79227d0ff343d4a9f71a5a1d7aacd61567401b924c6453f0e44bc8045226f25ded2bd3fa8ede4c9742f
+
+#
 # The gcc/newlib build instructions. We use 4.7 Release 1.
 #
 %include %{_configdir}/gcc-4.3-1.cfg
diff --git a/rtems/config/tools/rtems-gdb-6.8-1.cfg b/rtems/config/tools/rtems-gdb-6.8-1.cfg
index 9159352..16f087c 100644
--- a/rtems/config/tools/rtems-gdb-6.8-1.cfg
+++ b/rtems/config/tools/rtems-gdb-6.8-1.cfg
@@ -8,11 +8,19 @@
 %define gdb_version 6.8
 
 #
+# Force the standard of C code for GCC.
+#
+%define build_cflags %{build_cflags} --std=gnu89 -Wno-return-type
+
+#
 # RTEMS Build Set patches.
 #
 %source set gdb http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.bz2
 %patch  add gdb %{rtems_gdb_patches}/gdb-6.8-rtems4.9-20091111.diff
 
+%hash sha512 gdb-6.8a.tar.bz2 5114fe14ab25dc085590acff3a6feb75eb93347e501c634548308c4f51b31416ea23b8e612dfc54da466d3e7471e210d8f7a12ff6c050e9e89920884e5a64008
+%hash sha512 gdb-6.8-rtems4.9-20091111.diff 2e6eb2bdeac4bba7c2fcaf701399148fc5de82dfa81e021111f5a20654afe5aad77d6fd0edbc31965107f2fe9a43738938d79a313836267ad69dc8509fcbf691
+
 #
 # The gdb build instructions. We use 6.xx Release 1.
 #
diff --git a/rtems/config/tools/rtems-kernel-4.9.6-1.cfg b/rtems/config/tools/rtems-kernel-4.9.6-1.cfg
index f78533b..d48bc44 100644
--- a/rtems/config/tools/rtems-kernel-4.9.6-1.cfg
+++ b/rtems/config/tools/rtems-kernel-4.9.6-1.cfg
@@ -9,6 +9,8 @@
 %define rtems_kernel_version     4.9.6
 %define rtems_kernel_compression bz2
 
+%hash sha512 rtems-4.9.6.tar.bz2 16ab7b2f9119208a24dc0bd21361a5fd910e73044c42d7b68174490ca9cc5c226543664831f9a036f28d1cf8b61d19a15404516d7a87d424e0bc2c09e60767e3
+
 #
 # The RTEMS build instructions. We use 4.xx Release 1.
 #
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}




More information about the vc mailing list