llvm: update to 3.2.
This commit is contained in:
parent
44bbc409f1
commit
a01dca3f8e
|
@ -892,8 +892,7 @@ libyaml-0.so.2 libyaml-0.1.4_1
|
|||
libgtksourceviewmm-3.0.so.0 gtksourceviewmm-3.2.0_1
|
||||
libyajl.so.2 yajl-2.0.1_1
|
||||
libconfuse.so.0 confuse-2.7_1
|
||||
libLLVM-3.1.so libllvm-3.1_1
|
||||
libclang.so libclang-3.0_1
|
||||
libLLVM-3.2.so llvm-3.2_1
|
||||
libisofs.so.6 libisofs-0.6.24_1
|
||||
libbfd-2.22.so binutils-2.22_1<2.23_1
|
||||
libopcodes-2.22.so binutils-2.22_1<2.23_1
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
llvm
|
|
@ -1 +0,0 @@
|
|||
llvm
|
|
@ -1 +0,0 @@
|
|||
llvm
|
|
@ -1 +0,0 @@
|
|||
llvm
|
|
@ -2,23 +2,13 @@
|
|||
#
|
||||
noarch=yes
|
||||
pycompile_dirs="usr/lib/clang-analyzer"
|
||||
depends="clang>=$version python perl"
|
||||
depends="clang>=${version} python"
|
||||
short_desc="Low-Level Virtual Machine (LLVM) - A source code analysis framework"
|
||||
long_desc="
|
||||
The Clang Static Analyzer is source code analysis tool that find bugs in
|
||||
C and Objective-C programs.
|
||||
|
||||
Currently it can be run either as a standalone tool or within Xcode. The
|
||||
standalone tool is invoked from the command-line, and is intended to be run
|
||||
in tandem with a build of a codebase.
|
||||
|
||||
The analyzer is 100% open source and is part of the Clang project. Like the
|
||||
rest of Clang, the analyzer is implemented as a C++ library that can be used
|
||||
by other tools and applications."
|
||||
homepage="http://clang-analyzer.llvm.org/"
|
||||
|
||||
do_install() {
|
||||
install -d ${DESTDIR}/usr/bin
|
||||
install -d ${DESTDIR}/usr/lib/clang-analyzer
|
||||
vmkdir usr/bin
|
||||
vmkdir usr/lib/clang-analyzer
|
||||
|
||||
for f in build view; do
|
||||
cp -r ${wrksrc}/tools/clang/tools/scan-${f} \
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
# Template file for 'clang-devel'.
|
||||
#
|
||||
depends="clang>=$version"
|
||||
short_desc="LLVM C language family frontend - development files"
|
||||
long_desc="
|
||||
Clang project is a new C, C++, Objective C and Objective C++ front-end for
|
||||
the LLVM compiler. Some of its goals include the following:
|
||||
|
||||
End-User Features:
|
||||
|
||||
* Fast compiles and low memory use
|
||||
* Expressive diagnostics (examples)
|
||||
* GCC compatibility
|
||||
|
||||
Utility and Applications:
|
||||
|
||||
* Modular library based architecture
|
||||
* Support diverse clients (refactoring, static analysis, code
|
||||
generation, etc)
|
||||
* Allow tight integration with IDEs
|
||||
* Use the LLVM 'BSD' License
|
||||
|
||||
Internal Design and Implementation:
|
||||
|
||||
* A real-world, production quality compiler
|
||||
* A simple and hackable code base
|
||||
* A single unified parser for C, Objective C, C++, and Objective C++
|
||||
* Conformance with C/C++/ObjC and their variants
|
||||
|
||||
This package includes development files for the LLVM clang."
|
||||
|
||||
do_install() {
|
||||
vmove "usr/include/clang*" usr/include
|
||||
vmove "usr/lib/libclang*.a" usr/lib
|
||||
}
|
|
@ -1,34 +1,14 @@
|
|||
# Template file for 'clang'.
|
||||
#
|
||||
depends="libffi gcc>=4.5"
|
||||
short_desc="Low-Level Virtual Machine (LLVM), C language family frontend"
|
||||
long_desc="
|
||||
Clang project is a new C, C++, Objective C and Objective C++ front-end for
|
||||
the LLVM compiler. Some of its goals include the following:
|
||||
|
||||
End-User Features:
|
||||
|
||||
* Fast compiles and low memory use
|
||||
* Expressive diagnostics (examples)
|
||||
* GCC compatibility
|
||||
|
||||
Utility and Applications:
|
||||
|
||||
* Modular library based architecture
|
||||
* Support diverse clients (refactoring, static analysis, code
|
||||
generation, etc)
|
||||
* Allow tight integration with IDEs
|
||||
* Use the LLVM 'BSD' License
|
||||
|
||||
Internal Design and Implementation:
|
||||
|
||||
* A real-world, production quality compiler
|
||||
* A simple and hackable code base
|
||||
* A single unified parser for C, Objective C, C++, and Objective C++
|
||||
* Conformance with C/C++/ObjC and their variants"
|
||||
depends="libstdc++-devel binutils"
|
||||
short_desc="Low-Level Virtual Machine (LLVM) -- C language family frontend"
|
||||
homepage="http://clang.llvm.org/"
|
||||
|
||||
do_install() {
|
||||
vmove usr/include/clang usr/include
|
||||
vmove "usr/bin/*clang*" usr/bin
|
||||
vmove usr/bin/c-index-test usr/bin
|
||||
vmove usr/lib/clang usr/lib
|
||||
vmove usr/lib/llvm/libclang* usr/lib/llvm
|
||||
vmove "usr/share/man/man1/*clang*" usr/share/man/man1
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
#include "config-32.h"
|
||||
#elif __WORDSIZE == 64
|
||||
#include "config-64.h"
|
||||
#else
|
||||
#error "Unknown word size"
|
||||
#endif
|
|
@ -0,0 +1,9 @@
|
|||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
#include "llvm-config-32.h"
|
||||
#elif __WORDSIZE == 64
|
||||
#include "llvm-config-64.h"
|
||||
#else
|
||||
#error "Unknown word size"
|
||||
#endif
|
|
@ -1,34 +0,0 @@
|
|||
# Template file for 'libclang'.
|
||||
#
|
||||
depends="libffi"
|
||||
short_desc="Low-Level Virtual Machine (LLVM), C language family frontend library"
|
||||
long_desc="
|
||||
Clang project is a new C, C++, Objective C and Objective C++ front-end for
|
||||
the LLVM compiler. Some of its goals include the following:
|
||||
|
||||
End-User Features:
|
||||
|
||||
* Fast compiles and low memory use
|
||||
* Expressive diagnostics (examples)
|
||||
* GCC compatibility
|
||||
|
||||
Utility and Applications:
|
||||
|
||||
* Modular library based architecture
|
||||
* Support diverse clients (refactoring, static analysis, code
|
||||
generation, etc)
|
||||
* Allow tight integration with IDEs
|
||||
* Use the LLVM 'BSD' License
|
||||
|
||||
Internal Design and Implementation:
|
||||
|
||||
* A real-world, production quality compiler
|
||||
* A simple and hackable code base
|
||||
* A single unified parser for C, Objective C, C++, and Objective C++
|
||||
* Conformance with C/C++/ObjC and their variants
|
||||
|
||||
This package includes the shared library used by the Clang frontend."
|
||||
|
||||
do_install() {
|
||||
vmove "usr/lib/libclang.so*" usr/lib
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
# Template file for 'libllvm'.
|
||||
#
|
||||
short_desc="Low-Level Virtual Machine (LLVM) - shared libraries"
|
||||
long_desc="
|
||||
${long_desc}
|
||||
|
||||
This package includes the shared libraries used by the LLVM projects."
|
||||
|
||||
do_install() {
|
||||
vmove "usr/lib/*.so*" usr/lib
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
# Template file for 'llvm-devel'.
|
||||
#
|
||||
depends="libffi-devel llvm>=$version"
|
||||
short_desc="Low Level Virtual Machine - development files"
|
||||
long_desc="
|
||||
${long_desc}
|
||||
|
||||
This package includes development files for the LLVM clang."
|
||||
|
||||
do_install() {
|
||||
vmove usr/include usr
|
||||
vmove usr/lib usr
|
||||
}
|
|
@ -2,10 +2,7 @@
|
|||
#
|
||||
noarch=yes
|
||||
short_desc="${sourcepkg} - documentation files"
|
||||
long_desc="${long_desc}
|
||||
|
||||
This package contains the documentation for LLVM."
|
||||
|
||||
do_install() {
|
||||
vmove usr/docs usr/share/llvm
|
||||
vmove usr/share/doc usr/share
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- tools/clang/lib/Driver/Tools.cpp 2012-04-19 00:32:25.000000000 +0300
|
||||
+++ tools/clang/lib/Driver/Tools.cpp 2012-05-23 21:12:08.000000000 +0300
|
||||
@@ -193,7 +193,7 @@ static void addProfileRT(const ToolChain
|
||||
// libprofile_rt.so. We used to use the -l:libprofile_rt.a syntax, but that is
|
||||
// not supported by old linkers.
|
||||
std::string ProfileRT =
|
||||
- std::string(TC.getDriver().Dir) + "/../lib/libprofile_rt.a";
|
||||
+ std::string(TC.getDriver().Dir) + "/../lib/llvm/libprofile_rt.a";
|
||||
|
||||
CmdArgs.push_back(Args.MakeArgString(ProfileRT));
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
From 737fdba46f2b2b7d39bc728d15ea2334c44779e0 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Longbons <b.r.longbons@gmail.com>
|
||||
Date: Fri, 29 Jun 2012 12:58:34 -0700
|
||||
Subject: [PATCH] Revert "Patch to set is_stmt a little better for prologue
|
||||
lines in a function."
|
||||
|
||||
This meants that the debugger could find meaningful line information.
|
||||
|
||||
This reverts commit 60b35f408bc3194e7ea4e96367c0b42dc5e7f850.
|
||||
---
|
||||
lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 ++-----
|
||||
test/DebugInfo/X86/ending-run.ll | 6 ++----
|
||||
2 files changed, 4 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
|
||||
index 3e79a6d..24aedfb 100644
|
||||
--- lib/CodeGen/AsmPrinter/DwarfDebug.cpp
|
||||
+++ lib/CodeGen/AsmPrinter/DwarfDebug.cpp
|
||||
@@ -1093,15 +1093,12 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) {
|
||||
if (!MI->isDebugValue()) {
|
||||
DebugLoc DL = MI->getDebugLoc();
|
||||
if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) {
|
||||
- unsigned Flags = 0;
|
||||
+ unsigned Flags = DWARF2_FLAG_IS_STMT;
|
||||
PrevInstLoc = DL;
|
||||
if (DL == PrologEndLoc) {
|
||||
Flags |= DWARF2_FLAG_PROLOGUE_END;
|
||||
PrologEndLoc = DebugLoc();
|
||||
}
|
||||
- if (PrologEndLoc.isUnknown())
|
||||
- Flags |= DWARF2_FLAG_IS_STMT;
|
||||
-
|
||||
if (!DL.isUnknown()) {
|
||||
const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
|
||||
recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags);
|
||||
@@ -1382,7 +1379,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
|
||||
MF->getFunction()->getContext());
|
||||
recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
|
||||
FnStartDL.getScope(MF->getFunction()->getContext()),
|
||||
- 0);
|
||||
+ DWARF2_FLAG_IS_STMT);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/test/DebugInfo/X86/ending-run.ll b/test/DebugInfo/X86/ending-run.ll
|
||||
index 6935c47..0cd3de1 100644
|
||||
--- test/DebugInfo/X86/ending-run.ll
|
||||
+++ test/DebugInfo/X86/ending-run.ll
|
||||
@@ -1,11 +1,9 @@
|
||||
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
|
||||
; RUN: llvm-dwarfdump %t | FileCheck %s
|
||||
|
||||
-; Check that the line table starts at 7, not 4, but that the first
|
||||
-; statement isn't until line 8.
|
||||
+; Check that the line table starts at 7, not 4.
|
||||
|
||||
-; CHECK-NOT: 0x0000000000000000 7 0 1 0 is_stmt
|
||||
-; CHECK: 0x0000000000000000 7 0 1 0
|
||||
+; CHECK: 0x0000000000000000 7 0 1 0 is_stmt
|
||||
; CHECK: 0x0000000000000004 8 18 1 0 is_stmt prologue_end
|
||||
|
||||
define i32 @callee(i32 %x) nounwind uwtable ssp {
|
||||
--
|
||||
1.7.10
|
|
@ -1,60 +1,82 @@
|
|||
# Template file for 'llvm'
|
||||
pkgname=llvm
|
||||
version=3.1
|
||||
wrksrc="${pkgname}-${version}.src"
|
||||
distfiles="
|
||||
http://www.llvm.org/releases/${version}/llvm-${version}.src.tar.gz
|
||||
http://www.llvm.org/releases/${version}/clang-${version}.src.tar.gz"
|
||||
subpackages="libclang clang-analyzer clang clang-devel libllvm llvm-devel llvm-docs"
|
||||
version=3.2
|
||||
wrksrc="llvm-${version}.src"
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
configure_args="--disable-expensive-checks --disable-debug-runtime
|
||||
--enable-targets=all --enable-bindings=none --enable-optimize
|
||||
--enable-shared --enable-libffi --enable-llvmc-dynamic"
|
||||
# XXX: Investigate bindings support.
|
||||
makedepends="groff perl python libffi-devel"
|
||||
revision=1
|
||||
--enable-targets=all --enable-bindings=none --enable-optimize
|
||||
--enable-shared --enable-libffi --enable-llvmc-dynamic
|
||||
--disable-assertions --libdir=/usr/lib/llvm"
|
||||
short_desc="Low Level Virtual Machine"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
homepage="http://www.llvm.org"
|
||||
license="BSD"
|
||||
distfiles="
|
||||
http://www.llvm.org/releases/${version}/llvm-${version}.src.tar.gz
|
||||
http://www.llvm.org/releases/${version}/clang-${version}.src.tar.gz
|
||||
http://dev.archlinux.org/~foutrelis/sources/compiler-rt/compiler-rt-${version}.src.tar.xz"
|
||||
checksum="
|
||||
1ea05135197b5400c1f88d00ff280d775ce778f8f9ea042e25a1e1e734a4b9ab
|
||||
ff63e215dcd3e2838ffdea38502f8d35bab17e487f3c3799579961e452d5a786"
|
||||
long_desc="
|
||||
Low Level Virtual Machine (LLVM) is:
|
||||
125090c4d26740f1d5e9838477c931ed7d9ad70d599ba265f46f3a42cb066343
|
||||
2aaaf03f7c0f6b16fe97ecc81247dc2bf2d4bec7620a77cc74670b7e07ff5658
|
||||
a9a6b73a1bd5fc763f3b3826a6ce796cb150042d37d319e06e72d3d9778aaac1"
|
||||
|
||||
1. A compilation strategy designed to enable effective program optimization
|
||||
across the entire lifetime of a program. LLVM supports effective
|
||||
optimization at compile time, link-time (particularly interprocedural),
|
||||
run-time and offline (i.e., after software is installed), while remaining
|
||||
transparent to developers and maintaining compatibility with existing
|
||||
build scripts.
|
||||
# Do not build huge debug pkgs.
|
||||
disable_debug=yes
|
||||
|
||||
2. A virtual instruction set - LLVM is a low-level object code
|
||||
representation that uses simple RISC-like instructions, but provides
|
||||
rich, language-independent, type information and dataflow (SSA)
|
||||
information about operands. This combination enables sophisticated
|
||||
transformations on object code, while remaining light-weight enough to
|
||||
be attached to the executable. This combination is key to allowing
|
||||
link-time, run-time, and offline transformations.
|
||||
# XXX gzip compressed wtf?!!
|
||||
skip_extraction="compiler-rt-${version}.src.tar.xz"
|
||||
|
||||
3. A compiler infrastructure - LLVM is also a collection of source code that
|
||||
implements the language and compilation strategy. The primary components
|
||||
of the LLVM infrastructure are a GCC-based C & C++ front-end, a
|
||||
link-time optimization framework with a growing set of global and
|
||||
interprocedural analyses and transformations, static back-ends for many
|
||||
popular (and some obscure) architectures, a back-end which emits portable
|
||||
C code, and a Just-In-Time compilers for several architectures.
|
||||
|
||||
4. LLVM does not imply things that you would expect from a high-level
|
||||
virtual machine. It does not require garbage collection or run-time code
|
||||
generation (In fact, LLVM makes a great static compiler!). Note that
|
||||
optional LLVM components can be used to build high-level virtual machines
|
||||
and other systems that need these services."
|
||||
# XXX Investigate ocaml bindings.
|
||||
subpackages="clang-analyzer clang llvm-docs"
|
||||
makedepends="groff bsdtar perl python libffi-devel"
|
||||
|
||||
post_extract() {
|
||||
# Move clang files into the llvm source.
|
||||
if [ -d ${XBPS_BUILDDIR}/clang-${version}.src ]; then
|
||||
mv ${XBPS_BUILDDIR}/clang-${version}.src ${wrksrc}/tools/clang
|
||||
fi
|
||||
# XXX unpack with bsdtar due to being gzip compressed!
|
||||
bsdtar xf ${XBPS_SRCDISTDIR}/compiler-rt-${version}.src.tar.xz -C ${XBPS_BUILDDIR}
|
||||
# Move compiler-rt files into the llvm source.
|
||||
if [ -d ${XBPS_BUILDDIR}/compiler-rt-${version}.src ]; then
|
||||
mv ${XBPS_BUILDDIR}/compiler-rt-${version}.src \
|
||||
${wrksrc}/projects/compiler-rt
|
||||
fi
|
||||
}
|
||||
|
||||
pre_configure() {
|
||||
# Fix installation directories, ./configure doesn't seem to set them right
|
||||
sed -i -e 's:\$(PROJ_prefix)/etc/llvm:/etc/llvm:' \
|
||||
-e 's:\$(PROJ_prefix)/lib:$(PROJ_prefix)/lib/llvm:' \
|
||||
-e 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
|
||||
Makefile.config.in
|
||||
sed -i '/ActiveLibDir = ActivePrefix/s:lib:lib/llvm:' \
|
||||
tools/llvm-config/llvm-config.cpp
|
||||
sed -i 's:LLVM_LIBDIR="${prefix}/lib":LLVM_LIBDIR="${prefix}/lib/llvm":' \
|
||||
autoconf/configure.ac configure
|
||||
|
||||
# Drop "svn" suffix from version string
|
||||
sed -i 's/3\.2svn/3.2/g' configure
|
||||
}
|
||||
|
||||
post_install() {
|
||||
# Fix permissions of static libs
|
||||
chmod -x ${DESTDIR}/usr/lib/llvm/*.a
|
||||
|
||||
# Get rid of example Hello transformation
|
||||
rm ${DESTDIR}/usr/lib/llvm/*LLVMHello.*
|
||||
|
||||
# Add ld.so.conf.d entry
|
||||
vmkdir etc/ld.so.conf.d
|
||||
echo /usr/lib/llvm > ${DESTDIR}/etc/ld.so.conf.d/llvm.conf
|
||||
|
||||
# Required for multilib.
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
for _header in config llvm-config; do
|
||||
mv ${DESTDIR}/usr/include/llvm/Config/${_header}{,-64}.h
|
||||
vinstall ${FILESDIR}/llvm-Config-${_header}.h 644 \
|
||||
usr/include/llvm/Config ${_header}.h
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue