llvm 3.5.0

This commit is contained in:
Adam Jackson 2014-10-27 11:48:00 -04:00
parent cf5904acdb
commit 5b7309a0cb
6 changed files with 142 additions and 43 deletions

4
.gitignore vendored
View File

@ -3,3 +3,7 @@
/lldb-*.src.tar.gz
/llvm-*.src.tar.gz
/clang-3.4.src.tar.gz
/cfe-3.5.0.src.tar.xz
/compiler-rt-3.5.0.src.tar.xz
/lldb-3.5.0.src.tar.xz
/llvm-3.5.0.src.tar.xz

14
clang-fake-gcc43.patch Normal file
View File

@ -0,0 +1,14 @@
diff -up clang/lib/Frontend/InitPreprocessor.cpp.jx clang/lib/Frontend/InitPreprocessor.cpp
--- clang/lib/Frontend/InitPreprocessor.cpp.jx 2014-07-17 16:12:32.000000000 -0400
+++ clang/lib/Frontend/InitPreprocessor.cpp 2014-08-25 13:16:11.273215190 -0400
@@ -464,8 +464,8 @@ static void InitializePredefinedMacros(c
if (!LangOpts.MSVCCompat) {
// Currently claim to be compatible with GCC 4.2.1-5621, but only if we're
// not compiling for MSVC compatibility
- Builder.defineMacro("__GNUC_MINOR__", "2");
- Builder.defineMacro("__GNUC_PATCHLEVEL__", "1");
+ Builder.defineMacro("__GNUC_MINOR__", "3");
+ Builder.defineMacro("__GNUC_PATCHLEVEL__", "0");
Builder.defineMacro("__GNUC__", "4");
Builder.defineMacro("__GXX_ABI_VERSION", "1002");
}

16
lldb-python.patch Normal file
View File

@ -0,0 +1,16 @@
diff -up lldb/scripts/Python/modules/readline/Makefile.jx lldb/scripts/Python/modules/readline/Makefile
--- lldb/scripts/Python/modules/readline/Makefile.jx 2014-02-26 10:05:48.000000000 -0500
+++ lldb/scripts/Python/modules/readline/Makefile 2014-10-14 11:55:05.112566400 -0400
@@ -91,9 +91,8 @@ $(LLDB_PYTHON_MODULE_DIR)/$(LIBRARYNAME)
# Target to move the shared library from the build python lib dir to
# the install python lib dir.
install-local:: $(LLDB_PYTHON_MODULE_DIR)/$(LIBRARYNAME)$(SHLIBEXT)
- $(Echo) Installing $(BuildMode) $(LLDB_PYTHON_MODULE_DIR)/$(LIBRARYNAME)$(SHLIBEXT) to $(DESTDIR)$(prefix)/lib/$(LLDB_PYTHON_MODULE_REL_DIR)
- $(Verb) $(MKDIR) "$(DESTDIR)$(prefix)/lib/$(LLDB_PYTHON_MODULE_REL_DIR)"
- $(Verb) $(ProgInstall) "$(LLDB_PYTHON_MODULE_DIR)/$(LIBRARYNAME)$(SHLIBEXT)" "$(DESTDIR)$(prefix)/lib/$(LLDB_PYTHON_MODULE_REL_DIR)"
- $(Verb) $(RM) "$(DESTDIR)$(prefix)/lib/$(LIBRARYNAME)$(SHLIBEXT)"
+ $(Echo) Installing $(BuildMode) $(LLDB_PYTHON_MODULE_DIR)/$(LIBRARYNAME)$(SHLIBEXT) to $(DESTDIR)$(prefix)/@lib@/$(LLDB_PYTHON_MODULE_REL_DIR)
+ $(Verb) $(MKDIR) "$(DESTDIR)$(prefix)/@lib@/$(LLDB_PYTHON_MODULE_REL_DIR)"
+ $(Verb) $(ProgInstall) "$(LLDB_PYTHON_MODULE_DIR)/$(LIBRARYNAME)$(SHLIBEXT)" "$(DESTDIR)$(prefix)/@lib@/$(LLDB_PYTHON_MODULE_REL_DIR)"
endif # if !defined(LLDB_DISABLE_PYTHON)

View File

@ -0,0 +1,43 @@
Error.cpp:28:44: error: declaration of virtual const char* {anonymous}::_object_error_category::name() const has a different exception specifier
const char *_object_error_category::name() const {
^
Error.cpp:23:15: error: from previous declaration virtual const char* {anonymous}::_object_error_category::name() const noexcept (true)
const char* name() const LLVM_NOEXCEPT override;
^
diff -up llvm.src/lib/Object/Error.cpp.jx llvm.src/lib/Object/Error.cpp
--- llvm.src/lib/Object/Error.cpp.jx 2014-06-13 11:36:17.000000000 -0400
+++ llvm.src/lib/Object/Error.cpp 2014-08-11 13:11:46.135014527 -0400
@@ -25,7 +25,7 @@ public:
};
}
-const char *_object_error_category::name() const {
+const char *_object_error_category::name() const LLVM_NOEXCEPT {
return "llvm.object";
}
diff -up llvm.src/tools/llvm-readobj/Error.cpp.jx llvm.src/tools/llvm-readobj/Error.cpp
--- llvm.src/tools/llvm-readobj/Error.cpp.jx 2014-06-13 11:36:17.000000000 -0400
+++ llvm.src/tools/llvm-readobj/Error.cpp 2014-08-11 13:49:16.624287424 -0400
@@ -24,7 +24,7 @@ public:
};
} // namespace
-const char *_readobj_error_category::name() const {
+const char *_readobj_error_category::name() const LLVM_NOEXCEPT {
return "llvm.readobj";
}
diff -up llvm.src/tools/obj2yaml/Error.cpp.jx llvm.src/tools/obj2yaml/Error.cpp
--- llvm.src/tools/obj2yaml/Error.cpp.jx 2014-06-13 11:36:17.000000000 -0400
+++ llvm.src/tools/obj2yaml/Error.cpp 2014-08-11 14:04:05.841996088 -0400
@@ -20,7 +20,7 @@ public:
};
} // namespace
-const char *_obj2yaml_error_category::name() const { return "obj2yaml"; }
+const char *_obj2yaml_error_category::name() const LLVM_NOEXCEPT { return "obj2yaml"; }
std::string _obj2yaml_error_category::message(int ev) const {
switch (static_cast<obj2yaml_error>(ev)) {

100
llvm.spec
View File

@ -32,11 +32,10 @@
%endif
#global prerel rc3
%global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}}
Name: llvm
Version: 3.4
Release: 20%{?dist}
Version: 3.5.0
Release: 1%{?dist}
Summary: The Low Level Virtual Machine
Group: Development/Languages
@ -44,34 +43,38 @@ License: NCSA
URL: http://llvm.org/
# source archives
Source0: http://llvm.org/releases/3.4.2/llvm-3.4.2.src.tar.gz
Source1: http://llvm.org/releases/3.4.2/cfe-3.4.2.src.tar.gz
Source2: %{downloadurl}/compiler-rt-%{version}%{?prerel}.src.tar.gz
Source3: %{downloadurl}/lldb-%{version}%{?prerel}.src.tar.gz
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz
Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
Source3: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
# multilib fixes
Source10: llvm-Config-config.h
Source11: llvm-Config-llvm-config.h
# sync with release_34@209031
#Patch1: 0001-Merging-r207990.patch
#Patch2: 0002-Merging-r208721.patch
#Patch3: 0003-Merging-r208501.patch
#Patch4: 0004-Merging-r208908.patch
# patches
Patch11: 0001-data-install-preserve-timestamps.patch
Patch12: 0002-linker-flags-speedup-memory.patch
Patch1: llvm-3.5.0-build-fix.patch
Patch2: 0001-data-install-preserve-timestamps.patch
# sledgehammer to default to hard-float on arm
# the next two are various attempts to get clang to actually work on arm
# by forcing a hard-float ABI. They don't apply anymore as of 3.5.0,
# and didn't seem to work very well in the first place. Interested parties
# are advised to follow:
#
# https://bugzilla.redhat.com/show_bug.cgi?id=803433
# http://llvm.org/bugs/show_bug.cgi?id=15666
Patch20: clang-3.4-arm-hard-float.patch
# temporary measure to get ppc64le building, if perhaps not working
Patch21: 0001-PPC64LE-ELFv2-ABI-updates-for-the-.opd-section.patch
# http://llvm.org/bugs/attachment.cgi?id=12586
Patch22: pr12586.patch
# newish glibc hides the definition of __extern_always_inline behind
# a check for gcc 4.3, clang pretends to be gcc 4.2. a proper fix would
# be to build everything herein with gcc, but i don't have the patience
# atm, so in the interest of bootstrapping...
Patch100: clang-fake-gcc43.patch
Patch200: lldb-python.patch
BuildRequires: bison
BuildRequires: chrpath
BuildRequires: flex
@ -291,25 +294,38 @@ HTML documentation for LLVM's OCaml binding.
%prep
%setup -q %{?with_clang:-a1} %{?with_crt:-a2} %{?with_lldb:-a3} -n llvm-3.4.2.src
%setup -q %{?with_clang:-a1} %{?with_crt:-a2} %{?with_lldb:-a3} -n llvm-%{version}.src
rm -rf tools/clang tools/lldb projects/compiler-rt
%if %{with clang}
mv cfe-*/ tools/clang
%endif
%if %{with crt}
mv compiler-rt-%{version} projects/compiler-rt
mv compiler-rt-*/ projects/compiler-rt
%endif
%if %{with lldb}
mv lldb-%{version} tools/lldb
mv lldb-*/ tools/lldb
%endif
%patch11 -p1
%patch12 -p1
%patch1 -p1
%patch2 -p1
%if %{with clang}
%patch20 -p1
#patch20 -p1
%endif
#patch22 -p1
%if %{with clang}
pushd tools/clang
%patch100 -p1
popd
%endif
%if %{with lldb}
pushd tools/lldb
# careful when recreating this patch...
%patch200 -p1 -b .python
sed -i s/@lib@/%{_lib}/g scripts/Python/modules/readline/Makefile
popd
%endif
%patch21 -p1
%patch22 -p1
# fix library paths
sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure
@ -318,9 +334,13 @@ sed -i 's|/lib\>|/%{_lib}/%{name}|g' tools/llvm-config/llvm-config.cpp
%build
# clang is lovely and all, but fedora builds with gcc
# -fno-devirtualize shouldn't be necessary, but gcc has scary template-related
# bugs that make it so. gcc 5 ought to be fixed.
export CC=gcc
export CXX=c++
export CXX=g++
%configure \
--with-extra-options="-fno-devirtualize" \
--with-extra-ld-options=-Wl,-Bsymbolic \
--libdir=%{_libdir}/%{name} \
--disable-polly \
--disable-libcpp \
@ -350,8 +370,7 @@ export CXX=c++
--disable-embed-stdcxx \
--enable-timestamps \
--enable-backtraces \
--enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx,systemz \
--enable-experimental-targets=R600 \
--enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx,systemz,r600 \
%if %{with ocaml}
--enable-bindings=ocaml \
%else
@ -375,17 +394,15 @@ export CXX=c++
--with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/*/include) \
--with-optimize-option=-O3
make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \
%ifarch ppc
OPTIMIZE_OPTION="%{optflags} -UPPC"
%else
OPTIMIZE_OPTION="%{optflags}"
%endif
make %{?_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1
#make REQUIRES_RTTI=1 VERBOSE=1
%install
make install DESTDIR=%{buildroot} PROJ_docsdir=/moredocs
# you have got to be kidding me
rm -f %{buildroot}%{_bindir}/{FileCheck,count,not}
# multilib fixes
mv %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
@ -630,8 +647,10 @@ exit 0
%defattr(-,root,root,-)
%doc %{llvmdocdir lldb}/
%{_bindir}/lldb
%{_bindir}/lldb-platform
%{_bindir}/lldb-*
%{_libdir}/%{name}/liblldb.so
# XXX double check this
%{python2_sitearch}/*
%doc %{_mandir}/man1/lldb.1.*
%files -n lldb-devel
@ -675,6 +694,9 @@ exit 0
%endif
%changelog
* Mon Oct 27 2014 Adam Jackson <ajax@redhat.com> 3.5.0-1
- llvm 3.5.0
* Sun Aug 31 2014 Richard W.M. Jones <rjones@redhat.com> - 3.4-20
- Bump release and rebuild.

View File

@ -1,4 +1,4 @@
7ed60a0463f9fdfa20db7109d4624cee lldb-3.4.src.tar.gz
7938353e3a3bda85733a165e7ac4bb84 compiler-rt-3.4.src.tar.gz
87945973b7c73038871c5f849a818588 cfe-3.4.2.src.tar.gz
a20669f75967440de949ac3b1bad439c llvm-3.4.2.src.tar.gz
27718dd13c7df83e15f997116bbb4aef cfe-3.5.0.src.tar.xz
02624d2a9144278c3808c00dbbab56c8 compiler-rt-3.5.0.src.tar.xz
9597d5376309805ac586adfbd1e992f4 lldb-3.5.0.src.tar.xz
d6987305a1a0e58e128c1374cd3b8fef llvm-3.5.0.src.tar.xz