rombobeorn pushed to gprbuild (master). "Added bootstrapping
conditionals and a tarball with binaries in order to bootstrap on ARM."
by notificationsï¼ fedoraproject.org
From 5701e26f56582eb4e5669cc1a21980610ff886e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Persson?= <Bjorn(a)xn--rombobjrn-67a.se>
Date: Mon, 1 Feb 2016 01:10:50 +0100
Subject: Added bootstrapping conditionals and a tarball with binaries in order
to bootstrap on ARM.
---
.gitignore | 1 +
gprbuild.spec | 34 +++++++++++++++++++++++++++++++---
sources | 1 +
3 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index 9f551be..63f1c41 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/gprbuild-gpl-2014-src.tar.gz
/gpprbuild-gcc_ada.tgz
/gprbuild-gpl-2015-src.tar.gz
+/gprbuild-2015.armv7hl.tar.gz
diff --git a/gprbuild.spec b/gprbuild.spec
index d991f14..a08c976 100644
--- a/gprbuild.spec
+++ b/gprbuild.spec
@@ -2,7 +2,7 @@
Name: gprbuild
Version: 2015
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Ada project builder
Group: Development/Languages
License: GPLv2+
@@ -12,6 +12,7 @@ URL: http://libre.adacore.com
Source0: %{name}-gpl-%{version}-src.tar.gz
## Sources of gcc 5.1/gcc/ada directory
Source1: gpprbuild-gcc_ada.tgz
+Source100: gprbuild-2015.armv7hl.tar.gz
Patch1: %{name}-%{version}-gcc5_sources.patch
Patch2: %{name}-%{version}-gcc5.patch
Patch3: %{name}-%{version}-usrmove.patch
@@ -19,20 +20,35 @@ Patch6: %{name}-%{version}-arm_compiler.patch
Patch7: %{name}-%{version}-relocate_tree_option.patch
Patch999: gprbuild-2015-temp_disable_xmlada_check.patch
+%global bootstrap_arch armv7hl
+# When bootstrapping GPRbuild for a new architecture, set bootstrap_arch to the
+# name of that architecture and add a tarball with binaries as Source100.
+# When not bootstrapping bootstrap_arch must have a nonempty value that isn't
+# an architecture name, as this spec would be syntactically invalid otherwise.
+
+%ifarch %{bootstrap_arch}
+%global debug_package %{nil}
+%endif
+# Stripping out debugging information isn't important when bootstrapping, and
+# skipping this allows one to avoid unnecessary efforts to produce unstripped
+# binaries to bootstrap with.
+
# Building GPRbuild requires a working GPRbuild. Therefore GPRbuild and its
# associated programs are linked statically to libgnat and XMLada so that they
# won't stop working in Koji when one of those libraries gets upgraded and the
# previous version becomes unavailable. Thus building this package requires
# libgnat-static and xmlada-static.
+%ifnarch %{bootstrap_arch}
BuildRequires: xmlada-static gprbuild
+%endif
BuildRequires: gcc-gnat > 5.1
BuildRequires: libgnat-static libgnat-devel
BuildRequires: fedora-gnat-project-common >= 2
Requires: fedora-gnat-project-common >= 2
Requires: gnat-srpm-macros
# xmlada and gcc-gnat only available on these:
-ExclusiveArch: %{ix86} x86_64
+ExclusiveArch: %{ix86} x86_64 %{bootstrap_arch}
%description
GPRbuild is an advanced software tool designed to help automate
@@ -59,11 +75,13 @@ mkdir gnat_src && tar -xf %{SOURCE1} -C gnat_src
cp /usr/lib/rpm/config.* .
%build
+%ifnarch %{bootstrap_arch}
%configure --disable-rpath --datadir="%{buildroot}/%{_datadir}" --libdir="%{buildroot}/%{_libdir}" --bindir="%{buildroot}/%{_bindir}" --libexecdir="%{buildroot}/%{_libexecdir}"
make copy_gnat_src
# Build it, and link statically by setting XMLADA_BUILD to "static".
XMLADA_BUILD=static make ADA_PROJECT_PATH=%_GNAT_project_dir BUILDER="gprbuild %{GPRbuild_optflags}"
+%endif
%install
%{?filter_setup:
@@ -72,6 +90,10 @@ XMLADA_BUILD=static make ADA_PROJECT_PATH=%_GNAT_project_dir BUILDER="gprbuild %
%filter_setup
}
rm -rf %{buildroot}
+%ifarch %{bootstrap_arch}
+mkdir -p %{buildroot}
+tar -C %{buildroot} -xf %{SOURCE100}
+%else
make install DESTDIR=%{buildroot}
find %{buildroot}%{_datadir}/gprconfig -type f -name "*.xml" -exec chmod -x {} \;
mkdir __doc
@@ -79,11 +101,14 @@ mv %{buildroot}/%{_datadir}/doc/%{name}/* __doc
mv %{buildroot}/%{_datadir}/examples __doc
rm -rf %{buildroot}/%{_datadir}/doc/%{name}
##%%find __doc/examples -type f -exec chmod -x {} \;
+%endif
%files
%defattr(-,root,root,-)
%doc README COPYING* CHANGE*
+%ifnarch %{bootstrap_arch}
%doc __doc/*
+%endif
%{_bindir}/gpr*
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/gpr*
@@ -92,7 +117,10 @@ rm -rf %{buildroot}/%{_datadir}/doc/%{name}
%_GNAT_project_dir/*
%changelog
-* Tue Jan 19 2016 Björn Persson <bjorn(a)xn--rombobjrn-67a.se> - 2015-6
+* Sun Jan 31 2016 Björn Persson <Bjorn(a)xn--rombobjrn-67a.se> - 2015-7
+- Bootstrapping on ARM.
+
+* Tue Jan 19 2016 Björn Persson <Bjorn(a)xn--rombobjrn-67a.se> - 2015-6
- GPRbuild no longer requires XMLada as it's statically linked in.
* Tue Jan 19 2016 Björn Persson <Bjorn(a)xn--rombobjrn-67a.se> - 2015-5
diff --git a/sources b/sources
index 5672a39..532cd45 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,3 @@
5770c988ffb54e186a5498033a90c6e5 gpprbuild-gcc_ada.tgz
091e30229736a8cf07c2a60c678b8ad5 gprbuild-gpl-2015-src.tar.gz
+a70710bbdc9417daed25841c3242e03b gprbuild-2015.armv7hl.tar.gz
--
cgit v0.11.2
http://pkgs.fedoraproject.org/cgit/gprbuild.git/commit/?h=master&id=5701e...
3Â years, 10Â months