- First 2.6 prerelease

- Enable Clang front-end
- Enable debuginfo generation
This commit is contained in:
Michel Alexandre Salim 2009-09-07 06:59:47 +00:00
parent a973d41142
commit c6833e1538
8 changed files with 552 additions and 226 deletions

View File

@ -1,2 +1,2 @@
llvm-2.5.tar.gz llvm-2.6.tar.gz
llvm-gcc-4.2-2.5.source.tar.gz clang-2.6.tar.gz

View File

@ -1,20 +0,0 @@
diff -r d001baf31c4b tools/llvm-config/Makefile
--- a/tools/llvm-config/Makefile Sat Jan 19 21:47:39 2008 -0800
+++ b/tools/llvm-config/Makefile Sat Jan 19 21:49:20 2008 -0800
@@ -57,11 +57,11 @@ llvm-config.in: $(ConfigInIn) $(ConfigSt
# Build our final script.
$(ToolDir)/llvm-config: llvm-config.in $(FinalLibDeps)
$(Echo) "Building llvm-config script."
- $(Verb) $(ECHO) 's,@LLVM_CPPFLAGS@,$(SUB_CPPFLAGS),' > temp.sed
- $(Verb) $(ECHO) 's,@LLVM_CFLAGS@,$(SUB_CFLAGS),' >> temp.sed
- $(Verb) $(ECHO) 's,@LLVM_CXXFLAGS@,$(SUB_CXXFLAGS),' >> temp.sed
- $(Verb) $(ECHO) 's,@LLVM_LDFLAGS@,$(SUB_LDFLAGS),' >> temp.sed
- $(Verb) $(ECHO) 's,@LLVM_BUILDMODE@,$(BuildMode),' >> temp.sed
+ $(Verb) $(ECHO) 's!@LLVM_CPPFLAGS@!$(SUB_CPPFLAGS)!' > temp.sed
+ $(Verb) $(ECHO) 's!@LLVM_CFLAGS@!$(SUB_CFLAGS)!' >> temp.sed
+ $(Verb) $(ECHO) 's!@LLVM_CXXFLAGS@!$(SUB_CXXFLAGS)!' >> temp.sed
+ $(Verb) $(ECHO) 's!@LLVM_LDFLAGS@!$(SUB_LDFLAGS)!' >> temp.sed
+ $(Verb) $(ECHO) 's!@LLVM_BUILDMODE@!$(BuildMode)!' >> temp.sed
$(Verb) $(SED) -f temp.sed < $< > $@
$(Verb) $(RM) temp.sed
$(Verb) cat $(FinalLibDeps) >> $@

View File

@ -1,11 +0,0 @@
--- llvm-2.4/bindings/ocaml/Makefile.ocaml.ocaml-symlinks 2008-03-10 12:15:32.000000000 -0400
+++ llvm-2.4/bindings/ocaml/Makefile.ocaml 2008-12-02 16:29:01.000000000 -0500
@@ -160,7 +160,7 @@
install-deplibs:
$(Verb) for i in $(DestLibs:$(PROJ_libocamldir)/%=%); do \
- ln -sf "$(PROJ_libdir)/$$i" "$(PROJ_libocamldir)/$$i"; \
+ ln -sf "${OVERRIDE_libdir}/$$i" "$(PROJ_libocamldir)/$$i"; \
done
uninstall-deplibs:

View File

@ -1,20 +0,0 @@
--- 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);

View File

@ -0,0 +1,99 @@
From 01c48a60e0a3bcd2e4d6829f2f0186d4ee6ef504 Mon Sep 17 00:00:00 2001
From: Erick Tryzelaar <erickt@pixar.com>
Date: Fri, 21 Aug 2009 12:37:18 -0700
Subject: [PATCH] Use LLVM's new DESTDIR-less PROJ_* variables.
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1.6.4"
This is a multi-part message in MIME format.
--------------1.6.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
docs/Makefile | 18 +++++++++---------
docs/tools/Makefile | 6 +++---
tools/clang-cc/Makefile | 2 +-
3 files changed, 13 insertions(+), 13 deletions(-)
--------------1.6.4
Content-Type: text/x-patch; name="0001-Use-LLVM-s-new-DESTDIR-less-PROJ_-variables.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Use-LLVM-s-new-DESTDIR-less-PROJ_-variables.patch"
diff --git docs/Makefile docs/Makefile
index 9b706c7..e9bbb28 100644
--- docs/Makefile
+++ docs/Makefile
@@ -48,11 +48,11 @@ generated:: doxygen
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 @@ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
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,4 +94,4 @@ $(LLVM_SRC_ROOT)/docs/userloc.html:
uninstall-local::
$(Echo) Uninstalling Documentation
- $(Verb) $(RM) -rf $(PROJ_docsdir)
+ $(Verb) $(RM) -rf $(DESTDIR)$(PROJ_docsdir)
diff --git docs/tools/Makefile docs/tools/Makefile
index 90eb776..8107754 100644
--- docs/tools/Makefile
+++ docs/tools/Makefile
@@ -81,9 +81,9 @@ EXTRA_DIST := $(POD)
clean-local::
$(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
-HTML_DIR := $(PROJ_docsdir)/html/clang
-MAN_DIR := $(PROJ_mandir)/man1
-PS_DIR := $(PROJ_docsdir)/ps
+HTML_DIR := $(DESTDIR)$(PROJ_docsdir)/html/clang
+MAN_DIR := $(DESTDIR)$(PROJ_mandir)/man1
+PS_DIR := $(DESTDIR)$(PROJ_docsdir)/ps
install-html:: $(HTML)
$(Echo) Installing HTML Clang Tools Documentation
diff --git tools/clang-cc/Makefile tools/clang-cc/Makefile
index 874a42f..7c31f37 100644
--- tools/clang-cc/Makefile
+++ tools/clang-cc/Makefile
@@ -27,6 +27,6 @@ USEDLIBS = clangFrontend.a clangCodeGen.a clangAnalysis.a \
# clang-cc lives in a special location; we can get away with this
# because nothing else gets installed from here.
-PROJ_bindir := $(DESTDIR)$(PROJ_prefix)/libexec
+PROJ_bindir := $(PROJ_prefix)/libexec
include $(LLVM_SRC_ROOT)/Makefile.rules
--------------1.6.4--

361
llvm-2.6-destdir.patch Normal file
View File

@ -0,0 +1,361 @@
From 5a380ce5d1c8d5a1474764a7a54a1e2072fddb03 Mon Sep 17 00:00:00 2001
From: Erick Tryzelaar <idadesub@users.sourceforge.net>
Date: Fri, 21 Aug 2009 11:59:01 -0700
Subject: [PATCH] Rewrite makefiles to explicitly reference DESTDIR so we can not bake DESTDIR
into the O'Caml symlinks.
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------1.6.4"
This is a multi-part message in MIME format.
--------------1.6.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
Makefile.config.in | 16 +++++++-------
Makefile.rules | 46 ++++++++++++++++++++++----------------------
docs/CommandGuide/Makefile | 6 ++--
docs/Makefile | 24 +++++++++++-----------
docs/tutorial/Makefile | 2 +-
lib/VMCore/Makefile | 4 +-
tools/gccas/Makefile | 4 +-
tools/gccld/Makefile | 4 +-
tools/llvm-config/Makefile | 4 +-
9 files changed, 55 insertions(+), 55 deletions(-)
--------------1.6.4
Content-Type: text/x-patch; name="0001-Rewrite-makefiles-to-explicitly-reference-DESTDIR-so.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Rewrite-makefiles-to-explicitly-reference-DESTDIR-so.patch"
diff --git Makefile.config.in Makefile.config.in
index ecd0595..73656f7 100644
--- Makefile.config.in
+++ Makefile.config.in
@@ -76,14 +76,14 @@ endif
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 --git Makefile.rules Makefile.rules
index 5556684..08965f3 100644
--- Makefile.rules
+++ Makefile.rules
@@ -720,7 +720,7 @@ ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
# 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
@@ -842,22 +842,22 @@ install-local::
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
@@ -944,7 +944,7 @@ endif
ifdef BYTECODE_DESTINATION
ModuleDestDir := $(BYTECODE_DESTINATION)
else
-ModuleDestDir := $(PROJ_libdir)
+ModuleDestDir := $(DESTDIR)$(PROJ_libdir)
endif
ifdef NO_INSTALL
@@ -1023,17 +1023,17 @@ install-local::
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.SO) $(PROJ_libdir)
+$(DestSharedLib): $(LibName.SO) $(DESTDIR)$(PROJ_libdir)
$(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib)
$(Verb) $(INSTALL) $(LibName.SO) $(DestSharedLib)
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
@@ -1078,7 +1078,7 @@ endif
ifdef BYTECODE_DESTINATION
BytecodeDestDir := $(BYTECODE_DESTINATION)
else
-BytecodeDestDir := $(PROJ_libdir)
+BytecodeDestDir := $(DESTDIR)$(PROJ_libdir)
endif
DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).bca
@@ -1141,13 +1141,13 @@ install-local::
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) $(INSTALL) $(LibName.A) $(DestArchiveLib)
uninstall-local::
@@ -1225,11 +1225,11 @@ install-local::
uninstall-local::
$(Echo) Uninstall circumvented with NO_INSTALL
else
-DestTool = $(PROJ_bindir)/$(TOOLNAME)$(EXEEXT)
+DestTool = $(DESTDIR)$(PROJ_bindir)/$(TOOLNAME)$(EXEEXT)
install-local:: $(DestTool)
-$(DestTool): $(ToolBuildPath) $(PROJ_bindir)
+$(DestTool): $(ToolBuildPath) $(DESTDIR)$(PROJ_bindir)
$(Echo) Installing $(BuildMode) $(DestTool)
$(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
@@ -1824,25 +1824,25 @@ uninstall-local::
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
@@ -1854,10 +1854,10 @@ uninstall-local::
$(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 --git docs/CommandGuide/Makefile docs/CommandGuide/Makefile
index cf77e6a..28835ac 100644
--- docs/CommandGuide/Makefile
+++ docs/CommandGuide/Makefile
@@ -71,9 +71,9 @@ EXTRA_DIST := $(POD) index.html
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 --git docs/Makefile docs/Makefile
index 310c4bd..30cd8a7 100644
--- docs/Makefile
+++ docs/Makefile
@@ -48,11 +48,11 @@ generated:: doxygen ocamldoc
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 @@ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
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 @@ $(LLVM_SRC_ROOT)/docs/userloc.html:
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 @@ $(PROJ_OBJ_DIR)/ocamldoc.tar.gz:
uninstall-local::
$(Echo) Uninstalling Documentation
- $(Verb) $(RM) -rf $(PROJ_docsdir)
+ $(Verb) $(RM) -rf $(DESTDIR)$(PROJ_docsdir)
diff --git docs/tutorial/Makefile docs/tutorial/Makefile
index 6169bb8..9082ad4 100644
--- docs/tutorial/Makefile
+++ docs/tutorial/Makefile
@@ -12,7 +12,7 @@ include $(LEVEL)/Makefile.common
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 --git lib/VMCore/Makefile lib/VMCore/Makefile
index e9d3dc8..c4817a5 100644
--- lib/VMCore/Makefile
+++ lib/VMCore/Makefile
@@ -29,5 +29,5 @@ $(GENFILE): $(ObjDir)/Intrinsics.gen.tmp
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 --git tools/gccas/Makefile tools/gccas/Makefile
index ff84d96..594f9e4 100644
--- tools/gccas/Makefile
+++ tools/gccas/Makefile
@@ -10,9 +10,9 @@ LEVEL = ../..
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 --git tools/gccld/Makefile tools/gccld/Makefile
index b2d3f73..8ec0307 100644
--- tools/gccld/Makefile
+++ tools/gccld/Makefile
@@ -11,9 +11,9 @@ LEVEL = ../..
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 --git tools/llvm-config/Makefile tools/llvm-config/Makefile
index 6eedca0..8659681 100644
--- tools/llvm-config/Makefile
+++ tools/llvm-config/Makefile
@@ -87,6 +87,6 @@ clean-local::
$(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)
--------------1.6.4--

259
llvm.spec
View File

@ -2,37 +2,24 @@
# #
# --with doxygen # --with doxygen
# The doxygen docs are HUGE, so they are not built by default. # The doxygen docs are HUGE, so they are not built by default.
#
# --with gcc
# The llvm-gcc package doesn't currently build
# (builds on x86_64, not on i686). Plan is to enable clang instead.
%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 _missing_build_ids_terminate_build 0
#define debug_package %{nil}
Name: llvm Name: llvm
Version: 2.5 Version: 2.6
Release: 6%{?dist} Release: 0.1.pre1%{?dist}
Summary: The Low Level Virtual Machine Summary: The Low Level Virtual Machine
Group: Development/Languages Group: Development/Languages
License: NCSA License: NCSA
URL: http://llvm.org/ URL: http://llvm.org/
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.tar.gz Source0: http://llvm.org/prereleases/%{version}/llvm-%{version}.tar.gz
%if %{?_with_gcc:1}%{!?_with_gcc:0} Source1: http://llvm.org/prereleases/%{version}/clang-%{version}.tar.gz
Source1: http://llvm.org/releases/%{version}/llvm-gcc-%{lgcc_version}-%{version}.source.tar.gz # http://llvm.org/bugs/show_bug.cgi?id=3153
%endif Patch0: llvm-2.6-destdir.patch
Patch0: llvm-2.1-fix-sed.patch Patch1: llvm-2.6-destdir-clang.patch
Patch1: llvm-2.4-fix-ocaml.patch # http://llvm.org/bugs/show_bug.cgi?id=4911
# http://llvm.org/bugs/show_bug.cgi?id=3726 Patch2: llvm-2.5-tclsh_check.patch
Patch2: llvm-2.5-gcc44.patch # http://llvm.org/bugs/show_bug.cgi?id=3239
Patch3: llvm-2.5-tclsh_check.patch Patch3: llvm-2.5-Base.td-x86_32.patch
Patch4: llvm-2.5-Base.td-x86_32.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@ -60,11 +47,6 @@ arbitrary programming languages. The compiler infrastructure includes
mirror sets of programming tools as well as libraries with equivalent mirror sets of programming tools as well as libraries with equivalent
functionality. 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 %package devel
Summary: Libraries and header files for LLVM Summary: Libraries and header files for LLVM
@ -87,30 +69,21 @@ Requires: %{name} = %{version}-%{release}
Documentation for the LLVM compiler infrastructure. Documentation for the LLVM compiler infrastructure.
%if %{?_with_gcc:1}%{!?_with_gcc:0} %package clang
Summary: A C language family frontend for LLVM
%package gcc License: NCSA
Summary: C compiler for LLVM
License: GPL+
Group: Development/Languages Group: Development/Languages
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description clang
clang: noun
1. A loud, resonant, metallic sound.
2. The strident call of a crane or goose.
3. C-language family front-end toolkit.
%description gcc The goal of the Clang project is to create a new C, C++, Objective C
C compiler for LLVM. and Objective C++ front-end for the LLVM compiler. Its qqqtools are built
as libraries and designed to be loosely-coupled and extendable.
%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} %if %{?_with_doxygen:1}%{!?_with_doxygen:0}
@ -146,16 +119,28 @@ The %{name}-ocaml-devel package contains libraries and signature files
for developing applications that use %{name}-ocaml. for developing applications that use %{name}-ocaml.
%prep %package ocaml-doc
%setup -q -n llvm-%{version} %{?_with_gcc:-a1} Summary: Documentation for LLVM's OCaml binding
Group: Documentation
Requires: %{name}-ocaml = %{version}-%{release}
%patch0 -p1 -b .fix-sed %description ocaml-doc
%patch1 -p1 -b .fix-ocaml HTML documentation for LLVM's OCaml binding.
%patch2 -p1 -b .gcc44
%patch3 -p1 -b .tclsh_check
%prep
%setup -q -n llvm-%{version} -a1 %{?_with_gcc:-a2}
mv clang-2.6 tools/clang
%patch0 -p0 -b .destdir
pushd tools/clang
%patch1 -p0 -b .destdir-clang
popd
%patch2 -p1 -b .tclsh_check
%ifarch %{ix86} %ifarch %{ix86}
%patch4 -p0 -b .ix86pic %patch3 -p0 -b .ix86pic
%endif %endif
%build %build
@ -166,7 +151,7 @@ for developing applications that use %{name}-ocaml.
mkdir obj && cd obj mkdir obj && cd obj
../configure \ ../configure \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--libdir=%{_libdir}/llvm \ --libdir=%{_libdir}/%{name} \
--disable-assertions \ --disable-assertions \
--enable-debug-runtime \ --enable-debug-runtime \
--enable-jit \ --enable-jit \
@ -174,108 +159,55 @@ mkdir obj && cd obj
--enable-pic --enable-pic
%endif %endif
# FIXME file this
# configure does not properly specify libdir # configure does not properly specify libdir
sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/llvm|g' Makefile.config sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}/%{name}|g' Makefile.config
make %{_smp_mflags} OPTIMIZE_OPTION='%{optflags}' make %{_smp_mflags} OPTIMIZE_OPTION='%{optflags}'
%if %{?_with_gcc:1}%{!?_with_gcc:0}
# Build llvm-gcc.
export PATH=%{_builddir}/obj/Release-Asserts/bin:$PATH
cd ..
mkdir gcc-obj
cd gcc-obj
../llvm-gcc%{lgcc_version}-%{version}.source/configure \
--target=%{_target_platform} \
--prefix=%{_libdir}/llvm-gcc \
--libdir=%{_libdir}/llvm-gcc/%{_lib} \
--enable-languages=c,c++ \
--enable-checking \
--enable-llvm=$PWD/../obj \
--disable-bootstrap \
%ifarch x86_64
--disable-multilib \
--disable-shared \
%endif
--program-prefix=llvm-
make %{_smp_mflags} LLVM_VERSION_INFO=%{version}
%endif
%check %check
(cd obj && make check) 2>&1 | tee testlogs.txt ; true cd obj && make check
# Report failures and unexpected successes
echo
cat testlogs.txt | grep FAIL
cat testlogs.txt | grep XPASS
echo
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
cd obj cd obj
chmod -x examples/Makefile chmod -x examples/Makefile
# OVERRIDE_libdir used by our patched Makefile.ocaml:
# see http://llvm.org/bugs/show_bug.cgi?id=3153
make install DESTDIR=%{buildroot} \
OVERRIDE_libdir=%{_libdir}/llvm \
PROJ_docsdir=`pwd`/../moredocs
#make install \ # Fix hard-coded libdir for clang Headers
# PROJ_prefix=%{buildroot}/%{_prefix} \ sed -i 's|(PROJ_prefix)/lib/clang|(PROJ_prefix)/%{_lib}/clang|g' \
# PROJ_bindir=%{buildroot}/%{_bindir} \ tools/clang/lib/Headers/Makefile
# PROJ_libdir=%{buildroot}/%{_libdir}/%{name} \
# PROJ_datadir=%{buildroot}/%{_datadir} \ make install DESTDIR=%{buildroot} \
# PROJ_docsdir=%{buildroot}/%{_docdir}/%{name}-%{version} \ PROJ_docsdir=/moredocs
# PROJ_etcdir=%{buildroot}/%{_datadir}/%{name}-%{version} \
# PROJ_includedir=%{buildroot}/%{_includedir} \ # Move documentation back to build directory
# PROJ_infodir=%{buildroot}/%{_infodir} \ #
# PROJ_mandir=%{buildroot}/%{_mandir} mv %{buildroot}/moredocs ../
rm ../moredocs/*.tar.gz
rm ../moredocs/ocamldoc/html/*.tar.gz
find %{buildroot} -name .dir -print0 | xargs -0r rm -f find %{buildroot} -name .dir -print0 | xargs -0r rm -f
file %{buildroot}/%{_bindir}/* | awk -F: '$2~/ELF/{print $1}' | xargs -r chrpath -d 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
chrpath -d %{buildroot}/%{_libexecdir}/clang-cc
# Get rid of erroneously installed example files. # Get rid of erroneously installed example files.
rm %{buildroot}%{_libdir}/llvm/LLVMHello.* rm %{buildroot}%{_libdir}/%{name}/*LLVMHello.*
# And OCaml .o files
rm %{buildroot}%{_libdir}/ocaml/*.o
# Use relative links for ocaml's libLLVM*.a
#(cd %{buildroot}%{_libdir}/ocaml && for i in libLLVM*.a; do
# ln -sf %{_libdir}/llvm/$i $i;
# done)
# Remove deprecated tools. # Remove deprecated tools.
rm %{buildroot}%{_bindir}/gcc{as,ld} rm %{buildroot}%{_bindir}/gcc{as,ld}
sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}",' \ # FIXME file this bug
sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}/%{name}",' \
%{buildroot}%{_bindir}/llvm-config %{buildroot}%{_bindir}/llvm-config
chmod -x %{buildroot}%{_libdir}/*.[oa] chmod -x %{buildroot}%{_libdir}/*/*.a
# remove documentation makefiles: # remove documentation makefiles:
# they require the build directory to work # they require the build directory to work
find examples -name 'Makefile' find examples -name 'Makefile' | xargs -0r rm -f
%if %{?_with_gcc:1}%{!?_with_gcc:0}
# Install llvm-gcc.
make -C ../gcc-obj 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}/*/install-tools
rm -r %{_lib}/gcc/%{_target_platform}/*/install-tools
%endif
%clean %clean
@ -290,7 +222,7 @@ rm -rf %{buildroot}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc CREDITS.TXT LICENSE.TXT README.txt testlogs.txt %doc CREDITS.TXT LICENSE.TXT README.txt
%exclude %{_bindir}/llvm-config %exclude %{_bindir}/llvm-config
%{_bindir}/bugpoint %{_bindir}/bugpoint
%{_bindir}/llc %{_bindir}/llc
@ -312,9 +244,22 @@ rm -rf %{buildroot}
%{_bindir}/llvm-config %{_bindir}/llvm-config
%{_includedir}/%{name} %{_includedir}/%{name}
%{_includedir}/%{name}-c %{_includedir}/%{name}-c
%{_libdir}/llvm %{_libdir}/%{name}
%files clang
%defattr(-,root,root,-)
%{_bindir}/clang*
%{_bindir}/FileCheck
%{_bindir}/FileUpdate
%{_bindir}/tblgen
%{_libdir}/clang
%{_libexecdir}/clang-cc
%files doc
%defattr(-,root,root,-)
%doc examples moredocs/html
%files ocaml %files ocaml
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/ocaml/*.cma %{_libdir}/ocaml/*.cma
@ -326,10 +271,9 @@ rm -rf %{buildroot}
%{_libdir}/ocaml/*.cmx* %{_libdir}/ocaml/*.cmx*
%{_libdir}/ocaml/*.mli %{_libdir}/ocaml/*.mli
%files doc %files ocaml-doc
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc docs/*.{html,css} docs/img examples moredocs/* %doc moredocs/ocamldoc/html/*
%if %{?_with_doxygen:1}%{!?_with_doxygen:0} %if %{?_with_doxygen:1}%{!?_with_doxygen:0}
%files apidoc %files apidoc
@ -338,41 +282,14 @@ rm -rf %{buildroot}
%endif %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 %changelog
* Sat Sep 6 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6 * Mon Sep 7 2009 Michel Salim <salimma@fedoraproject.org> - 2.6-0.1.pre1
- First 2.6 prerelease
- Enable Clang front-end
- Enable debuginfo generation
* Sat Sep 5 2009 Michel Salim <salimma@fedoraproject.org> - 2.5-6
- Disable assertions (needed by OpenGTL) - Disable assertions (needed by OpenGTL)
- Align spec file with upstream build instructions - Align spec file with upstream build instructions
- Enable unit tests - Enable unit tests

View File

@ -1,2 +1,2 @@
55df2ea8665c8094ad2ef85187b9fc74 llvm-2.5.tar.gz d4d2cfbb962eca0c96aa1d794e23a681 llvm-2.6.tar.gz
c5800d85059fcf80429a86c536127595 llvm-gcc-4.2-2.5.source.tar.gz 80a2a9bbe8fa7c403b2ec7aca8b4108f clang-2.6.tar.gz