[PATCH] [RSB] Add support for building Epiphany tools
Hesham ALMatary
heshamelmatary at gmail.com
Thu Apr 30 21:31:42 UTC 2015
This patch adds support for building Epiphany tools. Currently the
tools are fetched from Adapteva repositories. In the future, the
tools should be fetched from GNU upstreams when Adapteva folks push
their latest changes there.
---
rtems/config/4.11/rtems-epiphany.bset | 43 ++++++++++++++++++++++++++++++++++
source-builder/config/binutils-2-1.cfg | 6 +++--
source-builder/config/gcc-common-1.cfg | 7 ++++--
source-builder/config/gdb-7-1.cfg | 6 +++--
4 files changed, 56 insertions(+), 6 deletions(-)
create mode 100644 rtems/config/4.11/rtems-epiphany.bset
diff --git a/rtems/config/4.11/rtems-epiphany.bset b/rtems/config/4.11/rtems-epiphany.bset
new file mode 100644
index 0000000..2b5fdca
--- /dev/null
+++ b/rtems/config/4.11/rtems-epiphany.bset
@@ -0,0 +1,43 @@
+#
+# Tools Set for RTEMS Epiphany 4.11 Stable
+#
+
+%define release 1
+
+%define rtems_arch epiphany
+
+#
+# Get GNU tools from external repositories.
+#
+%define binutils_external 1
+%define gcc_external 1
+%define gdb_external 1
+
+#
+# Expanded names of the GNU tools
+#
+%define binutils_expand_name epiphany-binutils-gdb-epiphany-binutils-2.23-software-cache
+%define gcc_expand_name epiphany-gcc-epiphany-gcc-4.9
+%define gdb_expand_name epiphany-binutils-gdb-epiphany-gdb-7.8
+
+#
+# Fetch GNU tools from external repos (temporarly).
+#
+%source set binutils https://github.com/adapteva/epiphany-binutils-gdb/archive/epiphany-binutils-2.23-software-cache.zip
+%source set gcc https://github.com/adapteva/epiphany-gcc/archive/epiphany-gcc-4.9.zip
+%source set gdb https://github.com/adapteva/epiphany-binutils-gdb/archive/epiphany-gdb-7.8.zip
+
+#
+# The RTEMS 4.11 base defines.
+#
+%include rtems-4.11-base.bset
+
+#
+# Tools configuration.
+#
+4.11/rtems-autotools
+devel/expat-2.1.0-1
+tools/rtems-binutils-2.23.1-1
+tools/rtems-gcc-4.9.1-newlib-git-1
+tools/rtems-gdb-7.8.1-1
+tools/rtems-tools-4.11-1
diff --git a/source-builder/config/binutils-2-1.cfg b/source-builder/config/binutils-2-1.cfg
index c74a2c7..397dea5 100644
--- a/source-builder/config/binutils-2-1.cfg
+++ b/source-builder/config/binutils-2-1.cfg
@@ -37,8 +37,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%prep
build_top=$(pwd)
- source_dir_binutils="binutils-%{binutils_version}"
- %source setup binutils -q -n binutils-%{binutils_version}
+ binutils_source=%{?binutils_external:%{binutils_expand_name}}%{!?binutils_external:"binutils-%{binutils_version}"}
+
+ source_dir_binutils=${binutils_source}
+ %source setup binutils -q -n ${binutils_source}
%patch setup binutils -p1
cd ${build_top}
diff --git a/source-builder/config/gcc-common-1.cfg b/source-builder/config/gcc-common-1.cfg
index dd0cf4c..975318c 100644
--- a/source-builder/config/gcc-common-1.cfg
+++ b/source-builder/config/gcc-common-1.cfg
@@ -40,9 +40,12 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
# target location and 'cd ..' fails.
build_top=$(pwd)
+ gcc_source=%{?gcc_external:%{gcc_expand_name}}%{!?gcc_external:"gcc-%{gcc_version}"}
+
# gcc and optional the g++ core if separate packages
- source_dir_gcc="gcc-%{gcc_version}"
- %source setup gcc -q -n gcc-%{gcc_version}
+ source_dir_gcc=${gcc_source}
+ %source setup gcc -q -n ${gcc_source}
+
%patch setup gcc -p1
cd ${build_top}
diff --git a/source-builder/config/gdb-7-1.cfg b/source-builder/config/gdb-7-1.cfg
index 6e84375..90a1f5a 100644
--- a/source-builder/config/gdb-7-1.cfg
+++ b/source-builder/config/gdb-7-1.cfg
@@ -66,8 +66,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
%prep
build_top=$(pwd)
- source_dir_gdb="gdb-%{gdb_version}"
- %source setup gdb -q -n gdb-%{gdb_version}
+ 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}
--
2.1.0
More information about the devel
mailing list