llvm 3.5.0
This commit is contained in:
parent
cf5904acdb
commit
5b7309a0cb
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,3 +3,7 @@
|
|||||||
/lldb-*.src.tar.gz
|
/lldb-*.src.tar.gz
|
||||||
/llvm-*.src.tar.gz
|
/llvm-*.src.tar.gz
|
||||||
/clang-3.4.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
14
clang-fake-gcc43.patch
Normal 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
16
lldb-python.patch
Normal 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)
|
43
llvm-3.5.0-build-fix.patch
Normal file
43
llvm-3.5.0-build-fix.patch
Normal 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
100
llvm.spec
@ -32,11 +32,10 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
#global prerel rc3
|
#global prerel rc3
|
||||||
%global downloadurl http://llvm.org/%{?prerel:pre-}releases/%{version}%{?prerel:/%{prerel}}
|
|
||||||
|
|
||||||
Name: llvm
|
Name: llvm
|
||||||
Version: 3.4
|
Version: 3.5.0
|
||||||
Release: 20%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The Low Level Virtual Machine
|
Summary: The Low Level Virtual Machine
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -44,34 +43,38 @@ License: NCSA
|
|||||||
URL: http://llvm.org/
|
URL: http://llvm.org/
|
||||||
|
|
||||||
# source archives
|
# source archives
|
||||||
Source0: http://llvm.org/releases/3.4.2/llvm-3.4.2.src.tar.gz
|
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz
|
||||||
Source1: http://llvm.org/releases/3.4.2/cfe-3.4.2.src.tar.gz
|
Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
|
||||||
Source2: %{downloadurl}/compiler-rt-%{version}%{?prerel}.src.tar.gz
|
Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
|
||||||
Source3: %{downloadurl}/lldb-%{version}%{?prerel}.src.tar.gz
|
Source3: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
|
||||||
|
|
||||||
# multilib fixes
|
# multilib fixes
|
||||||
Source10: llvm-Config-config.h
|
Source10: llvm-Config-config.h
|
||||||
Source11: llvm-Config-llvm-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
|
# patches
|
||||||
Patch11: 0001-data-install-preserve-timestamps.patch
|
Patch1: llvm-3.5.0-build-fix.patch
|
||||||
Patch12: 0002-linker-flags-speedup-memory.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
|
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
|
# http://llvm.org/bugs/attachment.cgi?id=12586
|
||||||
Patch22: pr12586.patch
|
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: bison
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
@ -291,25 +294,38 @@ HTML documentation for LLVM's OCaml binding.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%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
|
rm -rf tools/clang tools/lldb projects/compiler-rt
|
||||||
%if %{with clang}
|
%if %{with clang}
|
||||||
mv cfe-*/ tools/clang
|
mv cfe-*/ tools/clang
|
||||||
%endif
|
%endif
|
||||||
%if %{with crt}
|
%if %{with crt}
|
||||||
mv compiler-rt-%{version} projects/compiler-rt
|
mv compiler-rt-*/ projects/compiler-rt
|
||||||
%endif
|
%endif
|
||||||
%if %{with lldb}
|
%if %{with lldb}
|
||||||
mv lldb-%{version} tools/lldb
|
mv lldb-*/ tools/lldb
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%patch11 -p1
|
%patch1 -p1
|
||||||
%patch12 -p1
|
%patch2 -p1
|
||||||
%if %{with clang}
|
%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
|
%endif
|
||||||
%patch21 -p1
|
|
||||||
%patch22 -p1
|
|
||||||
|
|
||||||
# fix library paths
|
# fix library paths
|
||||||
sed -i 's|/lib /usr/lib $lt_ld_extra|%{_libdir} $lt_ld_extra|' ./configure
|
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
|
%build
|
||||||
# clang is lovely and all, but fedora builds with gcc
|
# 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 CC=gcc
|
||||||
export CXX=c++
|
export CXX=g++
|
||||||
%configure \
|
%configure \
|
||||||
|
--with-extra-options="-fno-devirtualize" \
|
||||||
|
--with-extra-ld-options=-Wl,-Bsymbolic \
|
||||||
--libdir=%{_libdir}/%{name} \
|
--libdir=%{_libdir}/%{name} \
|
||||||
--disable-polly \
|
--disable-polly \
|
||||||
--disable-libcpp \
|
--disable-libcpp \
|
||||||
@ -350,8 +370,7 @@ export CXX=c++
|
|||||||
--disable-embed-stdcxx \
|
--disable-embed-stdcxx \
|
||||||
--enable-timestamps \
|
--enable-timestamps \
|
||||||
--enable-backtraces \
|
--enable-backtraces \
|
||||||
--enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx,systemz \
|
--enable-targets=x86,powerpc,arm,aarch64,cpp,nvptx,systemz,r600 \
|
||||||
--enable-experimental-targets=R600 \
|
|
||||||
%if %{with ocaml}
|
%if %{with ocaml}
|
||||||
--enable-bindings=ocaml \
|
--enable-bindings=ocaml \
|
||||||
%else
|
%else
|
||||||
@ -375,17 +394,15 @@ export CXX=c++
|
|||||||
--with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/*/include) \
|
--with-c-include-dirs=%{_includedir}:$(echo %{_prefix}/lib/gcc/%{_target_cpu}*/*/include) \
|
||||||
--with-optimize-option=-O3
|
--with-optimize-option=-O3
|
||||||
|
|
||||||
make %{_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1 \
|
make %{?_smp_mflags} REQUIRES_RTTI=1 VERBOSE=1
|
||||||
%ifarch ppc
|
#make REQUIRES_RTTI=1 VERBOSE=1
|
||||||
OPTIMIZE_OPTION="%{optflags} -UPPC"
|
|
||||||
%else
|
|
||||||
OPTIMIZE_OPTION="%{optflags}"
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=%{buildroot} PROJ_docsdir=/moredocs
|
make install DESTDIR=%{buildroot} PROJ_docsdir=/moredocs
|
||||||
|
|
||||||
|
# you have got to be kidding me
|
||||||
|
rm -f %{buildroot}%{_bindir}/{FileCheck,count,not}
|
||||||
|
|
||||||
# multilib fixes
|
# multilib fixes
|
||||||
mv %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
|
mv %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
|
||||||
|
|
||||||
@ -630,8 +647,10 @@ exit 0
|
|||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc %{llvmdocdir lldb}/
|
%doc %{llvmdocdir lldb}/
|
||||||
%{_bindir}/lldb
|
%{_bindir}/lldb
|
||||||
%{_bindir}/lldb-platform
|
%{_bindir}/lldb-*
|
||||||
%{_libdir}/%{name}/liblldb.so
|
%{_libdir}/%{name}/liblldb.so
|
||||||
|
# XXX double check this
|
||||||
|
%{python2_sitearch}/*
|
||||||
%doc %{_mandir}/man1/lldb.1.*
|
%doc %{_mandir}/man1/lldb.1.*
|
||||||
|
|
||||||
%files -n lldb-devel
|
%files -n lldb-devel
|
||||||
@ -675,6 +694,9 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%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
|
* Sun Aug 31 2014 Richard W.M. Jones <rjones@redhat.com> - 3.4-20
|
||||||
- Bump release and rebuild.
|
- Bump release and rebuild.
|
||||||
|
|
||||||
|
8
sources
8
sources
@ -1,4 +1,4 @@
|
|||||||
7ed60a0463f9fdfa20db7109d4624cee lldb-3.4.src.tar.gz
|
27718dd13c7df83e15f997116bbb4aef cfe-3.5.0.src.tar.xz
|
||||||
7938353e3a3bda85733a165e7ac4bb84 compiler-rt-3.4.src.tar.gz
|
02624d2a9144278c3808c00dbbab56c8 compiler-rt-3.5.0.src.tar.xz
|
||||||
87945973b7c73038871c5f849a818588 cfe-3.4.2.src.tar.gz
|
9597d5376309805ac586adfbd1e992f4 lldb-3.5.0.src.tar.xz
|
||||||
a20669f75967440de949ac3b1bad439c llvm-3.4.2.src.tar.gz
|
d6987305a1a0e58e128c1374cd3b8fef llvm-3.5.0.src.tar.xz
|
||||||
|
Loading…
Reference in New Issue
Block a user