[dragonegg] Update to 3.3rc2.

Eric Smith brouhaha at fedoraproject.org
Mon Jun 3 18:23:25 UTC 2013


commit 4d774b38a094d8b454971e8022188f624b57c372
Author: Eric Smith <eric at localhost.localdomain>
Date:   Mon Jun 3 12:23:16 2013 -0600

    Update to 3.3rc2.

 .gitignore                 |    1 +
 dragonegg-3.3rc2-dyn.patch |   31 +++++++++++++++++++++++++++++++
 dragonegg.spec             |   25 ++++++++++++++++++++-----
 sources                    |    2 +-
 4 files changed, 53 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cb97ae8..28220da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /dragonegg-3.1.src.tar.gz
+/dragonegg-3.3rc2-source.tar.gz
diff --git a/dragonegg-3.3rc2-dyn.patch b/dragonegg-3.3rc2-dyn.patch
new file mode 100644
index 0000000..670e93e
--- /dev/null
+++ b/dragonegg-3.3rc2-dyn.patch
@@ -0,0 +1,31 @@
+diff -up dragonegg.src/Makefile.dyn dragonegg.src/Makefile
+--- dragonegg.src/Makefile.dyn	2013-05-21 10:16:37.000000000 -0600
++++ dragonegg.src/Makefile	2013-06-03 12:10:55.990785316 -0600
+@@ -95,7 +95,7 @@ ifneq ($(GCC_MINOR), 5)
+   endif
+ endif
+ 
+-LD_OPTIONS+=$(shell $(LLVM_CONFIG) --ldflags) $(LDFLAGS)
++LD_OPTIONS+=$(LDFLAGS)
+ 
+ LLVM_COMPONENTS=ipo scalaropts target
+ ifdef ENABLE_LLVM_PLUGINS
+@@ -134,8 +134,7 @@ $(TARGET_UTIL_OBJECTS): %.o : $(TOP_DIR)
+ 
+ $(TARGET_UTIL): $(TARGET_UTIL_OBJECTS)
+ 	@echo Linking $@
+-	$(QUIET)$(CXX) -o $@ $^ $(shell $(LLVM_CONFIG) --libs support) \
+-	$(LD_OPTIONS)
++	$(QUIET)$(CXX) -o $@ $^ $(LD_OPTIONS)
+ 
+ %.o : $(SRC_DIR)/%.cpp $(TARGET_UTIL)
+ 	@echo Compiling $*.cpp
+@@ -150,8 +149,6 @@ $(PLUGIN): $(PLUGIN_OBJECTS) $(TARGET_OB
+ 	@echo Linking $@
+ 	$(QUIET)$(CXX) -o $@ $(LOADABLE_MODULE_OPTIONS) $(CXXFLAGS) \
+ 	$(PLUGIN_OBJECTS) $(TARGET_OBJECT) \
+-	$(shell $(LLVM_CONFIG) --libs $(LLVM_COMPONENTS) \
+-	$(shell $(TARGET_UTIL) -p)) \
+ 	$(LD_OPTIONS)
+ 
+ $(LIT_SITE_CONFIG): $(TEST_SRC_DIR)/dragonegg-lit.site.cfg.in
diff --git a/dragonegg.spec b/dragonegg.spec
index 654269d..c71275b 100644
--- a/dragonegg.spec
+++ b/dragonegg.spec
@@ -49,22 +49,30 @@
 # package spec file.
 ExcludeArch: s390 s390x ppc ppc64
 
+%global prerel rc2
 
 %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:        20%{?dist}
+Version:        3.3
+Release:        0.1.rc2%{?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
+Source0:        %{downloadurl}/dragonegg-%{version}%{?prerel}-source.tar.gz
+
+# As supplied, the DragonEgg Makefile uses llvm-config to get linker options,
+# which try to link the static LLVM libraries.  We want the shared library
+# instead, so we patch the Makefile and pass in suitable LDFLAGS on the
+# link command line.
+Patch0:         dragonegg-3.3rc2-dyn.patch
 
 BuildRequires:  llvm-devel = %{version}
+BuildRequires:  llvm-libs = %{version}
 BuildRequires:  gcc-plugin-devel
 BuildRequires:  python
 
@@ -79,12 +87,16 @@ 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
+%setup -q -n %{name}.src
+# The 3.3rc2 prerelease doesn't versioning in the directory name.
+#%setup -q -n %{name}-%{version}%{?prerel:%{prerel}}.src
+
+%patch0 -p1 -b .dyn 
 
 %build
 echo "gcc_vr = %{gcc_vr}"
 # FIXME needs %{optflags}
-GCC=%{_bindir}/gcc make %{_smp_mflags}
+GCC=%{_bindir}/gcc make %{_smp_mflags} LDFLAGS="-L%{_libdir}/llvm -lLLVM-%{version}"
 
 %install
 mkdir -p %{buildroot}%{gcc_plugins_dir}
@@ -98,6 +110,9 @@ install -m 755 dragonegg.so %{buildroot}%{gcc_plugins_dir}
 
 
 %changelog
+* Mon Jun 03 2013 Eric Smith <eric at brouhaha.com> - 3.3-0.1.rc2
+- Updated to latest upstream.
+
 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.1-20
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
diff --git a/sources b/sources
index 253619f..73c8f90 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8553229b661412c4bf3ba0ede0d30f0b  dragonegg-3.1.src.tar.gz
+e3b4823ab49625ddd6b3e337534a979c  dragonegg-3.3rc2-source.tar.gz


More information about the scm-commits mailing list