[dragonegg] Initial import (#759712).

Eric Smith brouhaha at fedoraproject.org
Sun Jun 10 18:17:11 UTC 2012


commit 82cb4c6200c3832be8c07f2f248f298dcad89d8d
Author: Eric Smith <eric at brouhaha.com>
Date:   Sun Jun 10 11:17:56 2012 -0700

    Initial import (#759712).

 .gitignore     |    1 +
 dragonegg.spec |  109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources        |    1 +
 3 files changed, 111 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..cb97ae8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/dragonegg-3.1.src.tar.gz
diff --git a/dragonegg.spec b/dragonegg.spec
new file mode 100644
index 0000000..d2de118
--- /dev/null
+++ b/dragonegg.spec
@@ -0,0 +1,109 @@
+# The following GCC versioning stuff shamelessly copied
+# from the Fedora spec file for gcc-python-plugin
+
+# GCC will only load plugins that were built against exactly that build of GCC
+# We thus need to embed the exact GCC version as a requirement within the
+# metadata.
+#
+# Define "gcc_vr", a variable to hold the VERSION-RELEASE string for the gcc
+# we are being built against.
+#
+# Unfortunately, we can't simply run:
+#   rpm -q --qf="%{version}-%{release}"
+# to determine this, as there's no guarantee of a sane rpm database within
+# the chroots created by our build system
+#
+# So we instead query the version from gcc's output.
+#
+# gcc.spec has:
+#   Version: %{gcc_version}
+#   Release: %{gcc_release}%{?dist}
+#   ...snip...
+#   echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
+
+# So, given this output:
+#
+#   $ gcc --version
+#   gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9)
+#   Copyright (C) 2011 Free Software Foundation, Inc.
+#   This is free software; see the source for copying conditions.  There is NO
+#   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# we can scrape out the "4.6.1-9" from the version line.
+#
+# We then have to add the dist tag; which we must hope is the same as what we
+# have
+#
+# The following implements the above:
+%global gcc_vr %(gcc --version | python -c "import re; import sys; print(re.match(r'.*\\(Red Hat (.+)\\).*', sys.stdin.read()).group(1))")%{dist}
+
+# Define a boolean to make it easy to turn the above off, in case it fails:
+%global with_hard_gcc_version_requirement 1
+
+
+# Exclude the architectures for which LLVM is not built.  Keep in sync with
+# the ExcludeArch of the LLVM package spec.
+# package spec file.
+ExcludeArch: s390 s390x ppc ppc64
+
+
+%global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}}
+
+%global gcc_plugins_dir %(gcc --print-file-name=plugin)
+
+Name:           dragonegg
+Version:        3.1
+Release:        1%{?dist}
+Summary:        GCC plugin to use LLVM optimizers and code generators
+
+Group:          Development/Languages
+License:        GPLv2+
+URL:            http://dragonegg.llvm.org/
+Source0:        %{downloadurl}/dragonegg-%{version}%{?prerel}.src.tar.gz
+
+BuildRequires:  llvm-devel = %{version}
+BuildRequires:  gcc-plugin-devel
+
+%if %{with_hard_gcc_version_requirement}
+Requires: gcc = %{gcc_vr}
+%else
+Requires: gcc
+%endif
+
+%description
+DragonEgg is a GCC plugin that replaces GCC's optimizers and code generators
+with those from the LLVM project.
+
+%prep
+%setup -q -n %{name}-%{version}%{?prerel:%{prerel}}.src
+
+%build
+echo "gcc_vr = %{gcc_vr}"
+# FIXME needs %{optflags}
+GCC=%{_bindir}/gcc make %{_smp_mflags}
+
+%install
+mkdir -p %{buildroot}%{gcc_plugins_dir}
+install -m 755 dragonegg.so %{buildroot}%{gcc_plugins_dir}
+
+
+%files
+%defattr(-,root,root,-)
+%doc README COPYING
+%{gcc_plugins_dir}/%{name}.so
+
+
+%changelog
+* Wed May 23 2012 Eric Smith <eric at brouhaha.com> - 3.1-1
+- Updated to latest upstream.
+- Added ExcludeArch to avoid building on architectures for which LLVM is
+  not built.  It seems to me that it should be possible to build LLVM on
+  the excluded architectures for use as a cross-compiler host only, but this
+  isn't being done.  Note that we currently don't build for any EPEL
+  because no EPEL provides a new enough LLVM.  Maybe someday.
+
+* Sat Dec 03 2011 Eric Smith <eric at brouhaha.com> - 3.0-1
+- Update to upstream final release
+
+* Fri Dec 02 2011 Eric Smith <eric at brouhaha.com> - 3.0-0.1.rc3
+- Initial version
diff --git a/sources b/sources
index e69de29..253619f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+8553229b661412c4bf3ba0ede0d30f0b  dragonegg-3.1.src.tar.gz


More information about the scm-commits mailing list