Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c5a851c917 | ||
|
31ead96dae | ||
|
cbc2fc2b79 | ||
|
27ff2699db | ||
|
742aab48e4 | ||
|
2a2d03da14 | ||
|
5a5c2aab02 | ||
|
fabb80e6f6 | ||
|
a7af3711df | ||
|
3cd63a0c18 | ||
|
dfd7e5d51b | ||
|
9b79636361 |
@ -1 +0,0 @@
|
||||
llvm-2.3.tar.gz
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
llvm-2.5.tar.gz
|
21
Makefile
21
Makefile
@ -1,21 +0,0 @@
|
||||
# Makefile for source rpm: llvm
|
||||
# $Id$
|
||||
NAME := llvm
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
332
llvm-2.5-destdir.patch
Normal file
332
llvm-2.5-destdir.patch
Normal file
@ -0,0 +1,332 @@
|
||||
diff -ru llvm-2.5.destdir/docs/CommandGuide/Makefile llvm-2.5/docs/CommandGuide/Makefile
|
||||
--- llvm-2.5.destdir/docs/CommandGuide/Makefile 2008-06-09 03:14:31.000000000 -0400
|
||||
+++ llvm-2.5/docs/CommandGuide/Makefile 2009-09-08 21:29:53.054393975 -0400
|
||||
@@ -71,9 +71,9 @@
|
||||
clean-local::
|
||||
$(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
|
||||
|
||||
-HTML_DIR := $(PROJ_docsdir)/html/CommandGuide
|
||||
-MAN_DIR := $(PROJ_mandir)/man1
|
||||
-PS_DIR := $(PROJ_docsdir)/ps
|
||||
+HTML_DIR := $(DESTDIR)$(PROJ_docsdir)/html/CommandGuide
|
||||
+MAN_DIR := $(DESTDIR)$(PROJ_mandir)/man1
|
||||
+PS_DIR := $(DESTDIR)$(PROJ_docsdir)/ps
|
||||
|
||||
install-local:: $(HTML) $(MAN) $(PS)
|
||||
$(Echo) Installing HTML CommandGuide Documentation
|
||||
diff -ru llvm-2.5.destdir/docs/Makefile llvm-2.5/docs/Makefile
|
||||
--- llvm-2.5.destdir/docs/Makefile 2008-03-31 13:27:57.000000000 -0400
|
||||
+++ llvm-2.5/docs/Makefile 2009-09-08 21:29:53.055395770 -0400
|
||||
@@ -48,11 +48,11 @@
|
||||
|
||||
install-html: $(PROJ_OBJ_DIR)/html.tar.gz
|
||||
$(Echo) Installing HTML documentation
|
||||
- $(Verb) $(MKDIR) $(PROJ_docsdir)/html
|
||||
- $(Verb) $(MKDIR) $(PROJ_docsdir)/html/img
|
||||
- $(Verb) $(DataInstall) $(HTML) $(PROJ_docsdir)/html
|
||||
- $(Verb) $(DataInstall) $(IMAGES) $(PROJ_docsdir)/html/img
|
||||
- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(PROJ_docsdir)
|
||||
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html
|
||||
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/img
|
||||
+ $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html
|
||||
+ $(Verb) $(DataInstall) $(IMAGES) $(DESTDIR)$(PROJ_docsdir)/html/img
|
||||
+ $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir)
|
||||
|
||||
$(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
|
||||
$(Echo) Packaging HTML documentation
|
||||
@@ -63,11 +63,11 @@
|
||||
|
||||
install-doxygen: doxygen
|
||||
$(Echo) Installing doxygen documentation
|
||||
- $(Verb) $(MKDIR) $(PROJ_docsdir)/html/doxygen
|
||||
- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_docsdir)
|
||||
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen
|
||||
+ $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir)
|
||||
$(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \
|
||||
$(FIND) . -type f -exec \
|
||||
- $(DataInstall) {} $(PROJ_docsdir)/html/doxygen \;
|
||||
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \;
|
||||
|
||||
doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz
|
||||
|
||||
@@ -94,11 +94,11 @@
|
||||
|
||||
install-ocamldoc: ocamldoc
|
||||
$(Echo) Installing ocamldoc documentation
|
||||
- $(Verb) $(MKDIR) $(PROJ_docsdir)/ocamldoc/html
|
||||
- $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_docsdir)
|
||||
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html
|
||||
+ $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir)
|
||||
$(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \
|
||||
$(FIND) . -type f -exec \
|
||||
- $(DataInstall) {} $(PROJ_docsdir)/ocamldoc/html \;
|
||||
+ $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \;
|
||||
|
||||
ocamldoc: regen-ocamldoc $(PROJ_OBJ_DIR)/ocamldoc.tar.gz
|
||||
|
||||
@@ -122,4 +122,4 @@
|
||||
|
||||
uninstall-local::
|
||||
$(Echo) Uninstalling Documentation
|
||||
- $(Verb) $(RM) -rf $(PROJ_docsdir)
|
||||
+ $(Verb) $(RM) -rf $(DESTDIR)$(PROJ_docsdir)
|
||||
diff -ru llvm-2.5.destdir/docs/tutorial/Makefile llvm-2.5/docs/tutorial/Makefile
|
||||
--- llvm-2.5.destdir/docs/tutorial/Makefile 2008-03-30 16:32:18.000000000 -0400
|
||||
+++ llvm-2.5/docs/tutorial/Makefile 2009-09-08 21:29:53.056390721 -0400
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
HTML := $(wildcard $(PROJ_SRC_DIR)/*.html)
|
||||
EXTRA_DIST := $(HTML) index.html
|
||||
-HTML_DIR := $(PROJ_docsdir)/html/tutorial
|
||||
+HTML_DIR := $(DESTDIR)$(PROJ_docsdir)/html/tutorial
|
||||
|
||||
install-local:: $(HTML)
|
||||
$(Echo) Installing HTML Tutorial Documentation
|
||||
diff -ru llvm-2.5.destdir/lib/VMCore/Makefile llvm-2.5/lib/VMCore/Makefile
|
||||
--- llvm-2.5.destdir/lib/VMCore/Makefile 2009-01-09 11:44:42.000000000 -0500
|
||||
+++ llvm-2.5/lib/VMCore/Makefile 2009-09-08 21:29:53.057389443 -0400
|
||||
@@ -29,5 +29,5 @@
|
||||
changed significantly. )
|
||||
|
||||
install-local:: $(GENFILE)
|
||||
- $(Echo) Installing $(PROJ_includedir)/llvm/Intrinsics.gen
|
||||
- $(Verb) $(DataInstall) $(GENFILE) $(PROJ_includedir)/llvm/Intrinsics.gen
|
||||
+ $(Echo) Installing $(DESTDIR)$(PROJ_includedir)/llvm/Intrinsics.gen
|
||||
+ $(Verb) $(DataInstall) $(GENFILE) $(DESTDIR)$(PROJ_includedir)/llvm/Intrinsics.gen
|
||||
diff -ru llvm-2.5.destdir/Makefile.config.in llvm-2.5/Makefile.config.in
|
||||
--- llvm-2.5.destdir/Makefile.config.in 2009-01-09 11:44:42.000000000 -0500
|
||||
+++ llvm-2.5/Makefile.config.in 2009-09-08 21:29:53.048148959 -0400
|
||||
@@ -76,14 +76,14 @@
|
||||
|
||||
LLVMMAKE := $(LLVM_SRC_ROOT)/make
|
||||
|
||||
-PROJ_bindir := $(DESTDIR)$(PROJ_prefix)/bin
|
||||
-PROJ_libdir := $(DESTDIR)$(PROJ_prefix)/lib
|
||||
-PROJ_datadir := $(DESTDIR)$(PROJ_prefix)/share
|
||||
-PROJ_docsdir := $(DESTDIR)$(PROJ_prefix)/docs/llvm
|
||||
-PROJ_etcdir := $(DESTDIR)$(PROJ_prefix)/etc/llvm
|
||||
-PROJ_includedir := $(DESTDIR)$(PROJ_prefix)/include
|
||||
-PROJ_infodir := $(DESTDIR)$(PROJ_prefix)/info
|
||||
-PROJ_mandir := $(DESTDIR)$(PROJ_prefix)/share/man
|
||||
+PROJ_bindir := $(PROJ_prefix)/bin
|
||||
+PROJ_libdir := $(PROJ_prefix)/lib
|
||||
+PROJ_datadir := $(PROJ_prefix)/share
|
||||
+PROJ_docsdir := $(PROJ_prefix)/docs/llvm
|
||||
+PROJ_etcdir := $(PROJ_prefix)/etc/llvm
|
||||
+PROJ_includedir := $(PROJ_prefix)/include
|
||||
+PROJ_infodir := $(PROJ_prefix)/info
|
||||
+PROJ_mandir := $(PROJ_prefix)/share/man
|
||||
|
||||
# Determine if we're on a unix type operating system
|
||||
LLVM_ON_UNIX:=@LLVM_ON_UNIX@
|
||||
diff -ru llvm-2.5.destdir/Makefile.rules llvm-2.5/Makefile.rules
|
||||
--- llvm-2.5.destdir/Makefile.rules 2009-02-13 20:07:49.000000000 -0500
|
||||
+++ llvm-2.5/Makefile.rules 2009-09-08 21:36:45.680391473 -0400
|
||||
@@ -560,7 +560,7 @@
|
||||
# in the file so they get built before dependencies
|
||||
#---------------------------------------------------------
|
||||
|
||||
-$(PROJ_bindir) $(PROJ_libdir) $(PROJ_includedir) $(PROJ_etcdir)::
|
||||
+$(DESTDIR)$(PROJ_bindir) $(DESTDIR)$(PROJ_libdir) $(DESTDIR)$(PROJ_includedir) $(DESTDIR)$(PROJ_etcdir)::
|
||||
$(Verb) $(MKDIR) $@
|
||||
|
||||
# To create other directories, as needed, and timestamp their creation
|
||||
@@ -682,22 +682,22 @@
|
||||
uninstall-local::
|
||||
$(Echo) UnInstall circumvented with NO_INSTALL
|
||||
else
|
||||
-install-local:: $(PROJ_etcdir) $(CONFIG_FILES)
|
||||
- $(Echo) Installing Configuration Files To $(PROJ_etcdir)
|
||||
+install-local:: $(DESTDIR)$(PROJ_etcdir) $(CONFIG_FILES)
|
||||
+ $(Echo) Installing Configuration Files To $(DESTDIR)$(PROJ_etcdir)
|
||||
$(Verb)for file in $(CONFIG_FILES); do \
|
||||
if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
|
||||
- $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
|
||||
+ $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(DESTDIR)$(PROJ_etcdir) ; \
|
||||
elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
|
||||
- $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
|
||||
+ $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(DESTDIR)$(PROJ_etcdir) ; \
|
||||
else \
|
||||
$(ECHO) Error: cannot find config file $${file}. ; \
|
||||
fi \
|
||||
done
|
||||
|
||||
uninstall-local::
|
||||
- $(Echo) Uninstalling Configuration Files From $(PROJ_etcdir)
|
||||
+ $(Echo) Uninstalling Configuration Files From $(DESTDIR)$(PROJ_etcdir)
|
||||
$(Verb)for file in $(CONFIG_FILES); do \
|
||||
- $(RM) -f $(PROJ_etcdir)/$${file} ; \
|
||||
+ $(RM) -f $(DESTDIR)$(PROJ_etcdir)/$${file} ; \
|
||||
done
|
||||
endif
|
||||
|
||||
@@ -784,7 +784,7 @@
|
||||
ifdef BYTECODE_DESTINATION
|
||||
ModuleDestDir := $(BYTECODE_DESTINATION)
|
||||
else
|
||||
-ModuleDestDir := $(PROJ_libdir)
|
||||
+ModuleDestDir := $(DESTDIR)$(PROJ_libdir)
|
||||
endif
|
||||
|
||||
ifdef NO_INSTALL
|
||||
@@ -864,18 +864,18 @@
|
||||
uninstall-local::
|
||||
$(Echo) Uninstall circumvented with NO_INSTALL
|
||||
else
|
||||
-DestSharedLib = $(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
|
||||
+DestSharedLib = $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
|
||||
|
||||
install-local:: $(DestSharedLib)
|
||||
|
||||
-$(DestSharedLib): $(LibName.LA) $(PROJ_libdir)
|
||||
+$(DestSharedLib): $(LibName.LA) $(DESTDIR)$(PROJ_libdir)
|
||||
$(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib)
|
||||
$(Verb) $(LTInstall) $(LibName.LA) $(DestSharedLib)
|
||||
$(Verb) $(LIBTOOL) --finish $(PROJ_libdir)
|
||||
|
||||
uninstall-local::
|
||||
$(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
|
||||
- -$(Verb) $(RM) -f $(PROJ_libdir)/lib$(LIBRARYNAME).*
|
||||
+ -$(Verb) $(RM) -f $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME).*
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -920,7 +920,7 @@
|
||||
ifdef BYTECODE_DESTINATION
|
||||
BytecodeDestDir := $(BYTECODE_DESTINATION)
|
||||
else
|
||||
-BytecodeDestDir := $(PROJ_libdir)
|
||||
+BytecodeDestDir := $(DESTDIR)$(PROJ_libdir)
|
||||
endif
|
||||
|
||||
DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).a
|
||||
@@ -978,11 +978,11 @@
|
||||
uninstall-local::
|
||||
$(Echo) Uninstall circumvented with NO_INSTALL
|
||||
else
|
||||
-DestRelinkedLib = $(PROJ_libdir)/$(LIBRARYNAME).o
|
||||
+DestRelinkedLib = $(DESTDIR)$(PROJ_libdir)/$(LIBRARYNAME).o
|
||||
|
||||
install-local:: $(DestRelinkedLib)
|
||||
|
||||
-$(DestRelinkedLib): $(LibName.O) $(PROJ_libdir)
|
||||
+$(DestRelinkedLib): $(LibName.O) $(DESTDIR)$(PROJ_libdir)
|
||||
$(Echo) Installing $(BuildMode) Object Library $(DestRelinkedLib)
|
||||
$(Verb) $(LTInstall) $(LibName.O) $(DestRelinkedLib)
|
||||
|
||||
@@ -1018,13 +1018,13 @@
|
||||
uninstall-local::
|
||||
$(Echo) Uninstall circumvented with NO_INSTALL
|
||||
else
|
||||
-DestArchiveLib := $(PROJ_libdir)/lib$(LIBRARYNAME).a
|
||||
+DestArchiveLib := $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME).a
|
||||
|
||||
install-local:: $(DestArchiveLib)
|
||||
|
||||
-$(DestArchiveLib): $(LibName.A) $(PROJ_libdir)
|
||||
+$(DestArchiveLib): $(LibName.A) $(DESTDIR)$(PROJ_libdir)
|
||||
$(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
|
||||
- $(Verb) $(MKDIR) $(PROJ_libdir)
|
||||
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_libdir)
|
||||
$(Verb) $(LTInstall) $(LibName.A) $(DestArchiveLib)
|
||||
|
||||
uninstall-local::
|
||||
@@ -1080,11 +1080,11 @@
|
||||
uninstall-local::
|
||||
$(Echo) Uninstall circumvented with NO_INSTALL
|
||||
else
|
||||
-DestTool = $(PROJ_bindir)/$(TOOLNAME)
|
||||
+DestTool = $(DESTDIR)$(PROJ_bindir)/$(TOOLNAME)
|
||||
|
||||
install-local:: $(DestTool)
|
||||
|
||||
-$(DestTool): $(ToolBuildPath) $(PROJ_bindir)
|
||||
+$(DestTool): $(ToolBuildPath) $(DESTDIR)$(PROJ_bindir)
|
||||
$(Echo) Installing $(BuildMode) $(DestTool)
|
||||
$(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
|
||||
|
||||
@@ -1652,25 +1652,25 @@
|
||||
else
|
||||
install-local::
|
||||
$(Echo) Installing include files
|
||||
- $(Verb) $(MKDIR) $(PROJ_includedir)
|
||||
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
|
||||
$(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \
|
||||
cd $(PROJ_SRC_ROOT)/include && \
|
||||
for hdr in `find . -type f '!' '(' -name '*~' \
|
||||
-o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS | \
|
||||
grep -v .svn` ; do \
|
||||
- instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
|
||||
+ instdir=`dirname "$(DESTDIR)$(PROJ_includedir)/$$hdr"` ; \
|
||||
if test \! -d "$$instdir" ; then \
|
||||
$(EchoCmd) Making install directory $$instdir ; \
|
||||
$(MKDIR) $$instdir ;\
|
||||
fi ; \
|
||||
- $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
|
||||
+ $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
|
||||
done ; \
|
||||
fi
|
||||
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
|
||||
$(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
|
||||
cd $(PROJ_OBJ_ROOT)/include && \
|
||||
for hdr in `find . -type f -print | grep -v CVS` ; do \
|
||||
- $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
|
||||
+ $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
|
||||
done ; \
|
||||
fi
|
||||
endif
|
||||
@@ -1682,10 +1682,10 @@
|
||||
$(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
|
||||
'!' '(' -name '*~' -o -name '.#*' \
|
||||
-o -name '*.in' ')' -print ')' | \
|
||||
- grep -v CVS | sed 's#^#$(PROJ_includedir)/#'` ; \
|
||||
+ grep -v CVS | sed 's#^#$(DESTDIR)$(PROJ_includedir)/#'` ; \
|
||||
cd $(PROJ_SRC_ROOT)/include && \
|
||||
$(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' \
|
||||
- -print ')' | sed 's#\.in$$##;s#^#$(PROJ_includedir)/#'` ; \
|
||||
+ -print ')' | sed 's#\.in$$##;s#^#$(DESTDIR)$(PROJ_includedir)/#'` ; \
|
||||
fi
|
||||
endif
|
||||
endif
|
||||
diff -ru llvm-2.5.destdir/tools/gccas/Makefile llvm-2.5/tools/gccas/Makefile
|
||||
--- llvm-2.5.destdir/tools/gccas/Makefile 2007-12-29 15:07:17.000000000 -0500
|
||||
+++ llvm-2.5/tools/gccas/Makefile 2009-09-08 21:29:53.058390400 -0400
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
||||
-install-local:: $(PROJ_bindir)/gccas
|
||||
+install-local:: $(DESTDIR)$(PROJ_bindir)/gccas
|
||||
|
||||
-$(PROJ_bindir)/gccas : gccas.sh Makefile
|
||||
+$(DESTDIR)$(PROJ_bindir)/gccas : gccas.sh Makefile
|
||||
$(Echo) Installing gccas shell script.
|
||||
$(Verb) sed "s#@TOOLDIR@#$(PROJ_bindir)#" $< > $@
|
||||
$(Verb) chmod 0755 $@
|
||||
diff -ru llvm-2.5.destdir/tools/gccld/Makefile llvm-2.5/tools/gccld/Makefile
|
||||
--- llvm-2.5.destdir/tools/gccld/Makefile 2007-12-29 15:07:17.000000000 -0500
|
||||
+++ llvm-2.5/tools/gccld/Makefile 2009-09-08 21:29:53.059390658 -0400
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
||||
-install-local:: $(PROJ_bindir)/gccld
|
||||
+install-local:: $(DESTDIR)$(PROJ_bindir)/gccld
|
||||
|
||||
-$(PROJ_bindir)/gccld : gccld.sh Makefile
|
||||
+$(DESTDIR)$(PROJ_bindir)/gccld : gccld.sh Makefile
|
||||
$(Echo) Installing gccld shell script.
|
||||
$(Verb) sed "s#@TOOLDIR@#$(PROJ_bindir)#" $< > $@
|
||||
$(Verb) chmod 0755 $@
|
||||
diff -ru llvm-2.5.destdir/tools/llvm-config/Makefile llvm-2.5/tools/llvm-config/Makefile
|
||||
--- llvm-2.5.destdir/tools/llvm-config/Makefile 2007-12-29 15:07:17.000000000 -0500
|
||||
+++ llvm-2.5/tools/llvm-config/Makefile 2009-09-08 21:29:53.060389870 -0400
|
||||
@@ -82,6 +82,6 @@
|
||||
$(LibDeps) GenLibDeps.out
|
||||
install-local:: all-local
|
||||
$(Echo) Installing llvm-config
|
||||
- $(Verb) $(MKDIR) $(PROJ_bindir)
|
||||
- $(Verb) $(ScriptInstall) $(ToolDir)/llvm-config $(PROJ_bindir)
|
||||
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_bindir)
|
||||
+ $(Verb) $(ScriptInstall) $(ToolDir)/llvm-config $(DESTDIR)$(PROJ_bindir)
|
||||
|
20
llvm-2.5-gcc44.patch
Normal file
20
llvm-2.5-gcc44.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- llvm-2.5/lib/System/Unix/Signals.inc.gcc44 2008-12-05 18:39:24.000000000 -0500
|
||||
+++ llvm-2.5/lib/System/Unix/Signals.inc 2009-03-04 13:56:32.804820443 -0500
|
||||
@@ -78,7 +78,7 @@
|
||||
for (int i = 0; i < depth; ++i) {
|
||||
Dl_info dlinfo;
|
||||
dladdr(StackTrace[i], &dlinfo);
|
||||
- char* name = strrchr(dlinfo.dli_fname, '/');
|
||||
+ const char* name = strrchr(dlinfo.dli_fname, '/');
|
||||
|
||||
int nwidth;
|
||||
if (name == NULL) nwidth = strlen(dlinfo.dli_fname);
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
fprintf(stderr, "%-3d", i);
|
||||
|
||||
- char* name = strrchr(dlinfo.dli_fname, '/');
|
||||
+ const char* name = strrchr(dlinfo.dli_fname, '/');
|
||||
if (name == NULL) fprintf(stderr, " %-*s", width, dlinfo.dli_fname);
|
||||
else fprintf(stderr, " %-*s", width, name+1);
|
||||
|
11
llvm-2.5-tclsh_check.patch
Normal file
11
llvm-2.5-tclsh_check.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- llvm-2.5/configure.tclsh_check 2009-02-03 00:29:49.000000000 -0500
|
||||
+++ llvm-2.5/configure 2009-09-05 12:25:54.761389908 -0400
|
||||
@@ -8032,7 +8032,7 @@
|
||||
else
|
||||
|
||||
if test x"${with_tclinclude}" != x ; then
|
||||
- if test -f ${with_tclinclude}/tclsh ; then
|
||||
+ if test -f ${with_tclinclude}/tcl.h ; then
|
||||
ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)`
|
||||
elif test -f ${with_tclinclude}/src/tclsh ; then
|
||||
ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)`
|
338
llvm.spec
338
llvm.spec
@ -2,41 +2,49 @@
|
||||
#
|
||||
# --with doxygen
|
||||
# The doxygen docs are HUGE, so they are not built by default.
|
||||
#
|
||||
# --with gcc
|
||||
# The llvm-gcc package doesn't currently build.
|
||||
|
||||
%define lgcc_version 4.2
|
||||
|
||||
# LLVM object files don't contain build IDs. I don't know why yet.
|
||||
# Suppress their generation for now.
|
||||
%define __debug_install_post echo not building debuginfo
|
||||
|
||||
Name: llvm
|
||||
Version: 2.3
|
||||
Release: 2%{?dist}
|
||||
Summary: The Low Level Virtual Machine
|
||||
License: NCSA
|
||||
Group: Development/Languages
|
||||
URL: http://llvm.org/
|
||||
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tar.gz
|
||||
%if %{?_with_gcc:1}%{!?_with_gcc:0}
|
||||
Source1: http://llvm.org/releases/%{version}/llvm-gcc%{lgcc_version}-%{version}.source.tar.gz
|
||||
%endif
|
||||
%define debug_package %{nil}
|
||||
|
||||
Patch0: llvm-2.1-fix-sed.patch
|
||||
Name: llvm
|
||||
Version: 2.5
|
||||
Release: 7%{?dist}
|
||||
Summary: The Low Level Virtual Machine
|
||||
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
BuildRequires: bison
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: flex
|
||||
BuildRequires: gcc-c++ >= 3.4
|
||||
BuildRequires: groff
|
||||
BuildRequires: libtool-ltdl-devel
|
||||
Group: Development/Languages
|
||||
License: NCSA
|
||||
URL: http://llvm.org/
|
||||
Source0: http://llvm.org/prereleases/%{version}/llvm-%{version}.tar.gz
|
||||
Patch0: llvm-2.1-fix-sed.patch
|
||||
# http://llvm.org/bugs/show_bug.cgi?id=3153
|
||||
# backported from 2.6 patch
|
||||
Patch1: llvm-2.5-destdir.patch
|
||||
# http://llvm.org/bugs/show_bug.cgi?id=3726
|
||||
Patch2: llvm-2.5-gcc44.patch
|
||||
# http://llvm.org/bugs/show_bug.cgi?id=4911
|
||||
Patch3: llvm-2.5-tclsh_check.patch
|
||||
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: flex
|
||||
BuildRequires: gcc-c++ >= 3.4
|
||||
BuildRequires: groff
|
||||
BuildRequires: libtool-ltdl-devel
|
||||
BuildRequires: ocaml-ocamldoc
|
||||
# for DejaGNU test suite
|
||||
BuildRequires: dejagnu tcl-devel python
|
||||
%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
|
||||
BuildRequires: doxygen graphviz
|
||||
BuildRequires: doxygen graphviz
|
||||
%endif
|
||||
|
||||
# LLVM is not supported on PPC64
|
||||
# http://llvm.org/bugs/show_bug.cgi?id=3729
|
||||
ExcludeArch: ppc64
|
||||
|
||||
%description
|
||||
LLVM is a compiler infrastructure designed for compile-time,
|
||||
link-time, runtime, and idle-time optimization of programs from
|
||||
@ -44,17 +52,12 @@ arbitrary programming languages. The compiler infrastructure includes
|
||||
mirror sets of programming tools as well as libraries with equivalent
|
||||
functionality.
|
||||
|
||||
%if %{?_with_gcc:1}%{!?_with_gcc:0}
|
||||
It currently supports compilation of C and C++ programs, using front
|
||||
ends derived from GCC %{lgcc_version}.
|
||||
%endif
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Libraries and header files for LLVM
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: libstdc++-devel >= 3.4
|
||||
Summary: Libraries and header files for LLVM
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: libstdc++-devel >= 3.4
|
||||
|
||||
|
||||
%description devel
|
||||
@ -63,46 +66,19 @@ native programs that use the LLVM infrastructure.
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for LLVM
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
Summary: Documentation for LLVM
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description doc
|
||||
Documentation for the LLVM compiler infrastructure.
|
||||
|
||||
|
||||
%if %{?_with_gcc:1}%{!?_with_gcc:0}
|
||||
|
||||
%package gcc
|
||||
Summary: C compiler for LLVM
|
||||
License: GPL+
|
||||
Group: Development/Languages
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
|
||||
%description gcc
|
||||
C compiler for LLVM.
|
||||
|
||||
|
||||
%package gcc-c++
|
||||
Summary: C++ compiler for LLVM
|
||||
License: GPL+
|
||||
Group: Development/Languages
|
||||
Requires: %{name}-gcc = %{version}-%{release}
|
||||
|
||||
|
||||
%description gcc-c++
|
||||
C++ compiler for LLVM.
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
|
||||
%package apidoc
|
||||
Summary: API documentation for LLVM
|
||||
Group: Development/Languages
|
||||
Requires: %{name}-docs = %{version}-%{release}
|
||||
Summary: API documentation for LLVM
|
||||
Group: Development/Languages
|
||||
Requires: %{name}-docs = %{version}-%{release}
|
||||
|
||||
|
||||
%description apidoc
|
||||
@ -110,99 +86,107 @@ API documentation for the LLVM compiler infrastructure.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n llvm-%{version} %{?_with_gcc:-a1}
|
||||
%package ocaml
|
||||
Summary: OCaml binding for LLVM
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: ocaml-runtime
|
||||
|
||||
%description ocaml
|
||||
OCaml binding for LLVM.
|
||||
|
||||
|
||||
%package ocaml-devel
|
||||
Summary: Development files for %{name}-ocaml
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-devel = %{version}-%{release}
|
||||
Requires: %{name}-ocaml = %{version}-%{release}
|
||||
|
||||
%description ocaml-devel
|
||||
The %{name}-ocaml-devel package contains libraries and signature files
|
||||
for developing applications that use %{name}-ocaml.
|
||||
|
||||
|
||||
%package ocaml-doc
|
||||
Summary: Documentation for LLVM's OCaml binding
|
||||
Group: Documentation
|
||||
Requires: %{name}-ocaml = %{version}-%{release}
|
||||
|
||||
%description ocaml-doc
|
||||
HTML documentation for LLVM's OCaml binding.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .fix-sed
|
||||
%patch1 -p1 -b .destdir
|
||||
%patch2 -p1 -b .gcc44
|
||||
%patch3 -p1 -b .tclsh_check
|
||||
|
||||
|
||||
%build
|
||||
# We're not building a debuginfo package yet, because some generated
|
||||
# files don't include build IDs.
|
||||
cat /dev/null > debugfiles.list
|
||||
|
||||
%configure \
|
||||
# Disabling assertions now, rec. by pure and needed for OpenGTL
|
||||
# no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3239
|
||||
mkdir obj && cd obj
|
||||
../configure \
|
||||
--prefix=%{_prefix} \
|
||||
--libdir=%{_libdir}/%{name} \
|
||||
--datadir=%{_datadir}/%{name}-%{version} \
|
||||
--disable-static \
|
||||
--enable-assertions \
|
||||
--disable-assertions \
|
||||
--enable-debug-runtime \
|
||||
--enable-jit \
|
||||
--enable-optimized \
|
||||
--enable-shared \
|
||||
--enable-targets=host-only \
|
||||
--with-pic
|
||||
make %{_smp_mflags} tools-only VERBOSE=1 OmitFramePointer='' REQUIRES_EH=1 \
|
||||
OPTIMIZE_OPTION='%{optflags}'
|
||||
|
||||
%if %{?_with_gcc:1}%{!?_with_gcc:0}
|
||||
# Build llvm-gcc.
|
||||
|
||||
export PATH=%{_builddir}/%{?buildsubdir}/Release/bin:$PATH
|
||||
|
||||
mkdir llvm-gcc%{lgcc_version}-%{version}.source/build
|
||||
cd llvm-gcc%{lgcc_version}-%{version}.source/build
|
||||
|
||||
../configure \
|
||||
--host=%{_host} \
|
||||
--build=%{_build} \
|
||||
--target=%{_target_platform} \
|
||||
--prefix=%{_libdir}/llvm-gcc \
|
||||
--libdir=%{_libdir}/llvm-gcc/%{_lib} \
|
||||
--enable-threads \
|
||||
--disable-nls \
|
||||
%ifarch x86_64
|
||||
--disable-multilib \
|
||||
--disable-shared \
|
||||
%endif
|
||||
--enable-languages=c,c++ \
|
||||
--enable-llvm=%{_builddir}/%{?buildsubdir} \
|
||||
--program-prefix=llvm-
|
||||
make %{_smp_mflags} LLVM_VERSION_INFO=%{version}
|
||||
%ifnarch %{ix86}
|
||||
--enable-pic=yes
|
||||
%endif
|
||||
|
||||
# FIXME file this
|
||||
# configure does not properly specify libdir
|
||||
sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
|
||||
|
||||
make %{_smp_mflags} OPTIMIZE_OPTION='%{optflags}'
|
||||
|
||||
|
||||
%check
|
||||
(cd obj && make check) 2>&1 | tee testlog.txt || true
|
||||
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
cd obj
|
||||
chmod -x examples/Makefile
|
||||
make install \
|
||||
PROJ_prefix=%{buildroot}/%{_prefix} \
|
||||
PROJ_bindir=%{buildroot}/%{_bindir} \
|
||||
PROJ_libdir=%{buildroot}/%{_libdir}/%{name} \
|
||||
PROJ_datadir=%{buildroot}/%{_datadir} \
|
||||
PROJ_docsdir=%{buildroot}/%{_docdir}/%{name}-%{version} \
|
||||
PROJ_etcdir=%{buildroot}/%{_datadir}/%{name}-%{version} \
|
||||
PROJ_includedir=%{buildroot}/%{_includedir} \
|
||||
PROJ_infodir=%{buildroot}/%{_infodir} \
|
||||
PROJ_mandir=%{buildroot}/%{_mandir}
|
||||
|
||||
make install DESTDIR=%{buildroot} \
|
||||
PROJ_docsdir=/moredocs
|
||||
|
||||
# Move documentation back to build directory
|
||||
#
|
||||
mv %{buildroot}/moredocs ../
|
||||
rm ../moredocs/*.tar.gz
|
||||
rm ../moredocs/ocamldoc/html/*.tar.gz
|
||||
|
||||
find %{buildroot} -name .dir -print0 | xargs -0r rm -f
|
||||
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
||||
file %{buildroot}/%{_libdir}/llvm/*.so | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d
|
||||
|
||||
# Get rid of erroneously installed example files.
|
||||
rm %{buildroot}%{_libdir}/%{name}/LLVMHello.*
|
||||
rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.*
|
||||
|
||||
# And OCaml .o files
|
||||
rm %{buildroot}%{_libdir}/ocaml/*.o
|
||||
|
||||
# Remove deprecated tools.
|
||||
rm %{buildroot}%{_bindir}/gcc{as,ld}
|
||||
|
||||
# FIXME file this bug
|
||||
sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
|
||||
%{buildroot}%{_bindir}/llvm-config
|
||||
|
||||
chmod -x %{buildroot}%{_libdir}/%{name}/*.[oa]
|
||||
chmod -x %{buildroot}%{_libdir}/%{name}/*.a
|
||||
|
||||
%if %{?_with_gcc:1}%{!?_with_gcc:0}
|
||||
# Install llvm-gcc.
|
||||
# remove documentation makefiles:
|
||||
# they require the build directory to work
|
||||
find examples -name 'Makefile' | xargs -0r rm -f
|
||||
|
||||
make -C llvm-gcc%{lgcc_version}-%{version}.source/build install DESTDIR=%{buildroot}
|
||||
cd %{buildroot}%{_libdir}/llvm-gcc/%{_lib}
|
||||
find . -name '*.la' -print0 | xargs -0r rm
|
||||
find . -name '*.a' -exec %{buildroot}%{_bindir}/llvm-ranlib {} \;
|
||||
cd ../bin
|
||||
ln llvm-c++ llvm-gcc llvm-g++ %{buildroot}%{_bindir}
|
||||
rm llvm-cpp llvm-gccbug llvm-gcov %{_target_platform}-gcc*
|
||||
cd ..
|
||||
mv man/man1/llvm-gcc.1 man/man1/llvm-g++.1 %{buildroot}%{_mandir}/man1
|
||||
rm -r info man %{_lib}/libiberty.a
|
||||
rm -r libexec/gcc/%{_target_platform}/%{lgcc_version}/install-tools
|
||||
rm -r %{_lib}/gcc/%{_target_platform}/%{lgcc_version}/install-tools
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
@ -232,7 +216,6 @@ rm -rf %{buildroot}
|
||||
%exclude %{_mandir}/man1/llvm-gcc.*
|
||||
%endif
|
||||
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/llvm-config
|
||||
@ -240,11 +223,24 @@ rm -rf %{buildroot}
|
||||
%{_includedir}/%{name}-c
|
||||
%{_libdir}/%{name}
|
||||
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc docs/*.{html,css} docs/img examples
|
||||
%doc examples moredocs/html
|
||||
|
||||
%files ocaml
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/ocaml/*.cma
|
||||
%{_libdir}/ocaml/*.cmi
|
||||
|
||||
%files ocaml-devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/ocaml/*.a
|
||||
%{_libdir}/ocaml/*.cmx*
|
||||
%{_libdir}/ocaml/*.mli
|
||||
|
||||
%files ocaml-doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc moredocs/ocamldoc/html/*
|
||||
|
||||
%if %{?_with_doxygen:1}%{!?_with_doxygen:0}
|
||||
%files apidoc
|
||||
@ -253,40 +249,40 @@ rm -rf %{buildroot}
|
||||
%endif
|
||||
|
||||
|
||||
%if %{?_with_gcc:1}%{!?_with_gcc:0}
|
||||
%files gcc
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/llvm-gcc
|
||||
%dir %{_libdir}/llvm-gcc
|
||||
%dir %{_libdir}/llvm-gcc/bin
|
||||
%dir %{_libdir}/llvm-gcc/include
|
||||
%dir %{_libdir}/llvm-gcc/%{_lib}
|
||||
%dir %{_libdir}/llvm-gcc/libexec
|
||||
%dir %{_libdir}/llvm-gcc/libexec/gcc
|
||||
%dir %{_libdir}/llvm-gcc/libexec/gcc/%{_target_platform}/%{lgcc_version}
|
||||
%{_libdir}/llvm-gcc/%{_lib}/gcc
|
||||
%{_libdir}/llvm-gcc/%{_lib}/libmudflap*.a
|
||||
%{_libdir}/llvm-gcc/bin/%{_target_platform}-llvm-gcc
|
||||
%{_libdir}/llvm-gcc/bin/llvm-gcc
|
||||
%{_libdir}/llvm-gcc/include/mf-runtime.h
|
||||
%{_libdir}/llvm-gcc/libexec/gcc/%{_target_platform}/%{lgcc_version}/cc1
|
||||
%{_libdir}/llvm-gcc/libexec/gcc/%{_target_platform}/%{lgcc_version}/collect2
|
||||
%doc %{_mandir}/man1/llvm-gcc.*
|
||||
|
||||
|
||||
%files gcc-c++
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/llvm-[cg]++
|
||||
%{_libdir}/llvm-gcc/%{_lib}/lib*++.a
|
||||
%{_libdir}/llvm-gcc/bin/%{_target_platform}-llvm-[cg]++
|
||||
%{_libdir}/llvm-gcc/bin/llvm-[cg]++
|
||||
%{_libdir}/llvm-gcc/include/c++
|
||||
%{_libdir}/llvm-gcc/libexec/gcc/%{_target_platform}/%{lgcc_version}/cc1plus
|
||||
%doc %{_mandir}/man1/llvm-g++.*
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Sep 8 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-7
|
||||
- Backport destdir patch from 2.6
|
||||
|
||||
* Sat Sep 5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
|
||||
- Disable assertions (needed by OpenGTL)
|
||||
- Align spec file with upstream build instructions
|
||||
- Enable unit tests
|
||||
|
||||
* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-5
|
||||
- Only disable PIC on %%ix86; ppc actually needs it
|
||||
|
||||
* Sat Aug 22 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-4
|
||||
- Disable use of position-independent code on 32-bit platforms
|
||||
(buggy in LLVM <= 2.5)
|
||||
|
||||
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-2
|
||||
- Remove build scripts; they require the build directory to work
|
||||
|
||||
* Wed Mar 4 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-1
|
||||
- Update to 2.5
|
||||
- Package build scripts (bug #457881)
|
||||
|
||||
* Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-2
|
||||
- Patched build process for the OCaml binding
|
||||
|
||||
* Tue Dec 2 2008 Michel Salim <salimma@fedoraproject.org> - 2.4-1
|
||||
- Update to 2.4
|
||||
- Package Ocaml binding
|
||||
|
||||
* Wed Jun 18 2008 Bryan O'Sullivan <bos@serpentine.com> - 2.3-2
|
||||
- Add dependency on groff
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user