Hello community,

here is the log from the commit of package llvm.3480 for openSUSE:13.1:Update 
checked in at 2015-02-09 17:09:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/llvm.3480 (Old)
 and      /work/SRC/openSUSE:13.1:Update/.llvm.3480.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "llvm.3480"

Changes:
--------
New Changes file:

--- /dev/null   2014-12-25 22:38:16.200041506 +0100
+++ /work/SRC/openSUSE:13.1:Update/.llvm.3480.new/llvm.changes  2015-02-09 
17:09:10.000000000 +0100
@@ -0,0 +1,773 @@
+-------------------------------------------------------------------
+Thu Jan 29 12:14:47 UTC 2015 - [email protected]
+
+- Add CVE-2014-2893.patch to fix CVE-2014-2893 (boo#874798) 
+
+-------------------------------------------------------------------
+Tue Oct 22 20:57:00 UTC 2013 - [email protected]
+
+- add r189852.diff: Remove vtables optimisation that breaks ARM
+  and PowerPC
+- Disable testsuite on ARMv7, takes forever to run
+
+-------------------------------------------------------------------
+Thu Oct 17 10:23:32 UTC 2013 - [email protected]
+
+- Fix file list for %arm
+
+-------------------------------------------------------------------
+Wed Oct  9 11:16:08 UTC 2013 - [email protected]
+
+- use %arm, not arm in arch conditions 
+- add arm-remove-xfails.diff: remove XFAILs in testsuite
+  that pass and thereby make check fail
+
+-------------------------------------------------------------------
+Fri Sep 27 15:15:58 UTC 2013 - [email protected]
+
+- Set DisablePrettyStackTrace to true since it messes up signal
+  handling. bnc#839074 and fdo#60929 implemented with
+  llvm-disable-pretty-stack-trace.patch)
+
+-------------------------------------------------------------------
+Wed Aug 28 20:31:11 UTC 2013 - [email protected]
+
+- Fix filelist for aarch64
+
+-------------------------------------------------------------------
+Wed Aug 28 11:07:16 UTC 2013 - [email protected]
+
+- aarch64-suse-support.patch: Enable AArch64 suse toolchain support
+
+-------------------------------------------------------------------
+Wed Aug 28 11:02:06 UTC 2013 - [email protected]
+
+- Add s390x support 
+
+-------------------------------------------------------------------
+Wed Aug 28 10:57:32 UTC 2013 - [email protected]
+
+- Remove unused chrpath dependency
+- Re-enable ARCMT since libclang depends on it
+
+-------------------------------------------------------------------
+Mon Aug 26 07:23:57 UTC 2013 - [email protected]
+
+- Define host_triple for aarch64
+
+-------------------------------------------------------------------
+Thu Aug 22 10:59:28 UTC 2013 - [email protected]
+
+- Fix ARMv6 build
+
+-------------------------------------------------------------------
+Wed Aug 21 11:04:35 UTC 2013 - [email protected]
+
+- Only enable PowerPC on ppc64 
+
+-------------------------------------------------------------------
+Mon Aug 12 16:43:26 UTC 2013 - [email protected]
+
+- Disable shared libs on PowerPC 
+- Disable ARCMT, it only makes sense for iOS/OSX
+
+-------------------------------------------------------------------
+Tue Aug  6 05:51:46 UTC 2013 - [email protected]
+
+- Fix build 
+
+-------------------------------------------------------------------
+Wed Jul 17 12:54:40 UTC 2013 - [email protected]
+
+- Disable building unit-tests, should fix undefined reference
+  problem on ARM & PowerPC 
+
+-------------------------------------------------------------------
+Tue Jul 16 08:35:00 UTC 2013 - [email protected]
+
+- do not build on slow or low memory workers
+
+-------------------------------------------------------------------
+Thu Jul  4 11:55:43 UTC 2013 - [email protected]
+
+- Drop disable_neon_in_armv7.diff, neon seems to be working fine
+- Add cmake-host-triple.patch to pass a host triple argument
+
+-------------------------------------------------------------------
+Wed Jul  3 13:13:25 UTC 2013 - [email protected]
+
+- Create libLLVM and libclang subpackages.
+
+-------------------------------------------------------------------
+Wed Jun 19 12:58:24 UTC 2013 - [email protected]
+
+- Fix finding internal headers on x86_64
+
+-------------------------------------------------------------------
+Wed Jun 19 12:41:30 UTC 2013 - [email protected]
+
+- Fix ARM v5/v7 builds
+
+-------------------------------------------------------------------
+Tue Jun 18 13:42:57 UTC 2013 - [email protected]
+
+- Create a baselibs.conf
+  Provide *-32 Bit Packages for x86_64
+
+-------------------------------------------------------------------
+Thu Jun 13 18:33:31 UTC 2013 - [email protected]
+
+- Initial version of a cmake based buildscript
+  + Updated arm_suse_support.diff (patch6) to work with llvm 3.3
+  + Set version in spec to 3.3
+
+-------------------------------------------------------------------
+Thu Jun 13 11:42:33 UTC 2013 - [email protected]
+
+- Update to final 3.3 release (r183898)
+
+-------------------------------------------------------------------
+Fri May 24 11:21:39 UTC 2013 - [email protected]
+
+- Disable debug symbols on PPC64
+
+-------------------------------------------------------------------
+Tue May 21 09:46:02 UTC 2013 - [email protected]
+
+- Update to version 3.3 RC2
+  * Small bugfixes
+
+-------------------------------------------------------------------
+Tue May 14 11:23:07 UTC 2013 - [email protected]
+
+- Enable ARM64 support
+
+-------------------------------------------------------------------
+Thu May  9 09:05:41 UTC 2013 - [email protected]
+
+- Add unreachable-code.patch to fix unreachable code warnings on SLE 
+
+-------------------------------------------------------------------
+Wed May  8 08:56:28 UTC 2013 - [email protected]
+
+- Update to version 3.3 RC1
+    * Added support for AArch64, ARM’s 64-bit architecture.
+    * LLVM now has a new SLP vectorizer.
+    * LLVM and clang now support IBM’s z/Architecture.
+    * The R600 backend was added in this release, it supports
+      AMD GPUs (HD2XXX - HD7XXX).
+    * See http://llvm.org/releases/3.3/docs/ReleaseNotes.html for
+      complete changelog.
+
+- Drop upstream patches:
+    * pr13303.patch
+    * pr14795.patch
+    * pr14831.patch
+    * python-ulimit.patch
+
+-------------------------------------------------------------------
+Wed Jan 16 18:38:01 UTC 2013 - [email protected]
+
+- pr13303.patch: reapply, was temporarily reverted upstream
+
+-------------------------------------------------------------------
+Fri Jan 11 11:56:09 UTC 2013 - [email protected]
+
+- Add pre-generated doc files, remove sphinx dependency 
+
+-------------------------------------------------------------------
+Tue Jan  8 15:16:56 UTC 2013 - [email protected]
+
+- pr14795.patch: Fix incorrect line numbers after -frewrite-includes
+  (PR#14795)
+- pr14831.patch: Do not incorrectly warn about pragmas in -frewrite-includes
+  (PR#14831)
+
+-------------------------------------------------------------------
+Mon Dec 31 09:29:12 UTC 2012 - [email protected]
+
+- disable cross-compile mode in stage2 for armv5/v7
+
+-------------------------------------------------------------------
+Thu Dec 20 14:51:18 UTC 2012 - [email protected]
+
+- Update to final 3.2 release
+  * No code changes since rc3
+
+-------------------------------------------------------------------
++++ 576 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.1:Update/.llvm.3480.new/llvm.changes

New:
----
  CVE-2014-2893.patch
  aarch64-suse-support.patch
  arm-remove-xfails.diff
  arm_suse_support.diff
  assume-opensuse.patch
  baselibs.conf
  clang-disable-ada-extension.patch
  cmake-host-triple.patch
  default-to-i586.patch
  llvm-3.3.tar.bz2
  llvm-config-lib64.patch
  llvm-disable-pretty-stack-trace.patch
  llvm-no-visibility.patch
  llvm-rpmlintrc
  llvm.changes
  llvm.spec
  r189852.diff
  set-revision.patch
  unreachable-code.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ llvm.spec ++++++
#
# spec file for package llvm
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define _revision     183898
%define _release_version 3.3
%define _supported_archs "AArch64;ARM;PowerPC;X86"
%define _experimental_archs "R600"

%ifarch %arm
%define _supported_archs "ARM"
%endif

%ifarch ppc64
%define _supported_archs "PowerPC"
%endif

%ifarch s390x
%define _supported_archs "SystemZ"
%endif

Name:           llvm
Version:        3.3
Release:        0
Summary:        Low Level Virtual Machine
License:        NCSA
Group:          Development/Languages/Other
Url:            http://www.llvm.org
Source0:        %{name}-%{_release_version}.tar.bz2
Source100:      %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE set-revision.patch [email protected] -- Allow us to set 
revision
Patch1:         set-revision.patch
# PATCH-FIX-OPENSUSE assume-opensuse.patch [email protected] -- Always enable 
openSUSE/SUSE features
Patch2:         assume-opensuse.patch
# PATCH-FIX-OPENSUSE clang-disable-ada-extension.patch [email protected] -- 
Don't run gcc for ada files
Patch3:         clang-disable-ada-extension.patch
# PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 
32bit
Patch4:         default-to-i586.patch
Patch5:         llvm-config-lib64.patch
# PATCH-FIX-OPENSUSE arm_suse_support.diff --Enable ARM suse toolchain support
Patch6:         arm_suse_support.diff
# PATCH-FIX-OPENSUSE unreachable-code.patch -- Unreachable code warning 
triggered on SLE
Patch7:         unreachable-code.patch
Patch8:         cmake-host-triple.patch
# PATCH-FIX-OPENSUSE aarch64-suse-support.patch -- Enable AArch64 suse 
toolchain support
Patch9:         aarch64-suse-support.patch
# PATCH-FIX-OPENSUSE llvm-no-visibility.patch -- Disable visibility
Patch10:        llvm-no-visibility.patch
# PATCH-FIX-OPENSUSE llvm-disable-pretty-stack-trace.patch -- 
https://bugs.freedesktop.org/show_bug.cgi?id=60929
Patch11:        llvm-disable-pretty-stack-trace.patch
Patch12:        arm-remove-xfails.diff
Patch13:        r189852.diff
Patch14:        CVE-2014-2893.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf
BuildRequires:  automake

BuildRequires:  cmake

%if 0%{?suse_version} >= 1220
BuildRequires:  binutils-devel >= 2.21.90
%endif
BuildRequires:  bison
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  groff
BuildRequires:  libffi-devel
BuildRequires:  libtool
BuildRequires:  python-base
Requires:       libLLVM = %{version}-%{release}
# llvm does not work on ppc, only ppc64
ExcludeArch:    ppc

%description
LLVM is a compiler infrastructure designed for compile-time,
link-time, runtime, and idle-time optimization of programs from
arbitrary programming languages.

The compiler infrastructure includes mirror sets of programming
tools as well as libraries with equivalent functionality.

%package -n libLLVM
Summary:        Libraries for LLVM
Group:          Development/Libraries/C and C++

%description -n libLLVM
This package contains the shared libraries needed for LLVM.

%package devel
Summary:        Header Files for LLVM
Group:          Development/Languages/Other
Requires:       %{name} = %{version}
Requires:       libffi-devel
Requires:       libstdc++-devel >= 3.4
Obsoletes:      llvm-doc < %{version}
Provides:       llvm-doc = %{version}

%description devel
This package contains library and header files needed to develop
new native programs that use the LLVM infrastructure.

%package doc
Summary:        Documentation for LLVM
Group:          Documentation/HTML
Requires:       %{name} = %{version}

%description doc
Documentation for the LLVM compiler infrastructure.

%package clang
Summary:        CLANG frontend for LLVM
Group:          Development/Languages/Other
Requires:       %{name} = %{version}
Requires:       binutils
Requires:       libclang = %{version}-%{release}
Requires:       libstdc++-devel
Provides:       clang

%description clang
This package contains the clang (C language) frontend for LLVM.

%package -n libclang
Summary:        Library files needed for clang
Group:          Development/Libraries/C and C++

%description -n libclang
This package contains the shared libraries needed for clang.

%package clang-devel
Summary:        CLANG frontend for LLVM (devel package)
Group:          Development/Languages/Other
Requires:       clang = %{version}
Requires:       llvm-devel = %{version}

%description clang-devel
This package contains the clang (C language) frontend for LLVM.
(development files)

%package        vim-plugins
Summary:        Vim plugins for LLVM
Group:          Productivity/Text/Editors
Requires:       vim

%description    vim-plugins
This package contains vim plugins for LLVM like syntax highlighting.

%prep
%setup -q -n %{name}-%{_release_version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if "%{_lib}" == "lib64"
%patch5 -p1
%endif
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%ifarch s390 s390x
%patch10 -p1
%endif
%patch11 -p1
%patch12
%patch13
%patch14 -p1

# We hardcode i586
rm tools/clang/test/Driver/x86_features.c

# lib64 related problems on 64bit
%if "%{_lib}" == "lib64"
rm tools/clang/test/Driver/linux-ld.c
%endif

sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp

%if "%{_lib}" == "lib64"
# Nasty hardcoded path
sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp  \
                           tools/clang/test/Preprocessor/iwithprefix.c
%endif

# Only enable target archs otherwise llvm-config is messed up
%ifnarch %arm ppc64 s390x
sed -i s,"subdirectories = .*","subdirectories = AArch64 ARM PowerPC R600 X86", 
lib/Target/LLVMBuild.txt
%endif

%ifarch %arm
sed -i s,"subdirectories = .*","subdirectories = ARM", lib/Target/LLVMBuild.txt
%endif

%ifarch ppc64
sed -i s,"subdirectories = .*","subdirectories = PowerPC", 
lib/Target/LLVMBuild.txt
%endif

%ifarch s390x
sed -i s,"subdirectories = .*","subdirectories = SystemZ", 
lib/Target/LLVMBuild.txt
%endif

sed -i s,"IntelJITEvents OProfileJIT","", lib/ExecutionEngine/LLVMBuild.txt
echo > utils/unittest/LLVMBuild.txt

%build
TOPLEVEL=$PWD
mkdir stage1 stage2
pushd stage1

# Define host-triple
%ifarch %{ix86}
%define host_triple i586-suse-linux
%endif
%ifarch x86_64
%define host_triple x86_64-suse-linux
%endif
%ifarch armv6hl
%define host_triple armv6hl-suse-linux-gnueabi
%endif
%ifarch armv7hl
%define host_triple armv7hl-suse-linux-gnueabi
%endif
%ifarch aarch64
%define host_triple aarch64-suse-linux
%endif
%ifarch ppc64
%define host_triple powerpc64-suse-linux
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g 
../cmake/modules/AddLLVM.cmake
rm -rf ../projects/compiler-rt
%endif
%ifarch s390x
%define host_triple s390x-suse-linux
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"SystemZ"',g 
../cmake/modules/AddLLVM.cmake
%endif

cmake -G "Unix Makefiles" \
      -DBUILD_SHARED_LIBS=OFF \
      -DCMAKE_BUILD_TYPE=Release \
      -DLLVM_ENABLE_ASSERTIONS=OFF \
      -DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
      -DCMAKE_C_FLAGS="-O0" \
      -DCMAKE_CXX_FLAGS="-O0" \
      -DLLVM_HOST_TRIPLE=%{host_triple} \
      ..

make %{?_smp_mflags} VERBOSE=1 clang

popd
pushd stage2

export CC=$TOPLEVEL/stage1/bin/clang
export CXX=$TOPLEVEL/stage1/bin/clang++

cmake -G "Unix Makefiles" \
%ifnarch ppc64
      -DBUILD_SHARED_LIBS=ON \
%endif
%ifarch %arm ppc64
      -DCMAKE_BUILD_TYPE=Release \
%else
      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
      -DLLVM_HOST_TRIPLE=%{host_triple} \
%endif
      -DCMAKE_INSTALL_PREFIX=%{_prefix} \
%ifarch armv6hl
      -DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s 
-mfpu=vfp" \
      -DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s 
-mfpu=vfp" \
%endif
%ifarch armv7hl
      -DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 
-mfpu=vfpv3-d16" \
      -DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 
-mfpu=vfpv3-d16" \
%endif
%if "%{_lib}" == "lib64"
      -DLLVM_LIBDIR_SUFFIX=64 \
      -DCLANG_RESOURCE_DIR=../%{_lib}/clang/%{_release_version} \
%endif
      -DLLVM_REQUIRES_RTTI=ON \
      -DLLVM_ENABLE_TIMESTAMPS=OFF \
      -DLLVM_ENABLE_ASSERTIONS=OFF \
      -DLLVM_ENABLE_PIC=ON \
%if 0%{?suse_version} >= 1220
      -DLLVM_BINUTILS_INCDIR=/usr/include \
%endif
      -DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
%ifnarch %arm ppc64 s390x
      -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{_experimental_archs} \
%endif
      -DLLVM_BUILD_TESTS=OFF \
      ..

make %{?_smp_mflags} VERBOSE=1

%check
cd stage2
%ifnarch armv7hl armv7l
%if 0%{!?qemu_user_space_build:1}
# we just do not have enough memory with qemu emulation

%if "%{_lib}" == "lib64"
ln -s lib lib64
%endif

# Due to http://llvm.org/bugs/show_bug.cgi?id=15242
for i in crash-narrowfunctiontest metadata remove_arguments_test; do
    rm ../test/BugPoint/$i.ll;
done

%ifarch s390 s390x
for i in TestClassDecl.m TestClassForwardDecl.m c-index-getCursor-test.m; do
    rm ../tools/clang/test/Index/$i;
done
%endif

make check
make clang-test
%endif
%endif

%install
cd stage2
make install DESTDIR=%{buildroot}
cd ..

# Build man/html pages
cd docs
# Docs are prebuilt due to sphinx dependency -- cartman
#make -f Makefile.sphinx html man
rm -rf %{buildroot}/usr/docs

mkdir -p %{buildroot}%{_docdir}/llvm/html
mkdir -p %{buildroot}/usr/share/man/man1
cp -r _build/man/* %{buildroot}/usr/share/man/man1
cp -r _build/html/* %{buildroot}%{_docdir}/llvm/html

cd ../tools/clang/docs
mkdir -p %{buildroot}%{_docdir}/llvm-clang/html
cp -r _build/man/* %{buildroot}/usr/share/man/man1
cp -r _build/html/* %{buildroot}%{_docdir}/llvm-clang/html
cd ../../..

# install scan-build et al
install -d %{buildroot}%{_datadir}/clang
install -d %{buildroot}%{py_sitedir}

pushd tools/clang/tools
for file in scan-build/ccc-analyzer scan-build/scan-build \
                scan-view/scan-view; do
        install $file %{buildroot}%{_bindir}
done
for file in scan-build/scanview.css scan-build/sorttable.js; do
        install -m 644 $file %{buildroot}%{_datadir}/clang/
done
for file in scan-view/Reporter.py scan-view/ScanView.py \
                scan-view/startfile.py; do
        install -m 644 $file %{buildroot}%{py_sitedir}
done
install -d %{buildroot}%{py_sitedir}/Resources/
for file in scan-view/Resources/*; do
        install -m 644 $file %{buildroot}%{py_sitedir}/Resources/
done
popd
pushd %{buildroot}%{_bindir}
ln -s ccc-analyzer c++-analyzer
popd

%if 0%{?suse_version} >= 1220
mkdir -p %{buildroot}%{_libdir}/bfd-plugins
ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
%endif

sed -i 's,RealBin/bin/clang,RealBin/clang,' \
  %{buildroot}%{_bindir}/scan-build

sed -i 's,RealBin/bin/ccc-analyzer,RealBin/ccc-analyzer,' \
  %{buildroot}%{_bindir}/scan-build

sed -i 's,RealBin/bin/ccc-analyzer,RealBin/ccc-analyzer,' \
  %{buildroot}%{_bindir}/scan-build

sed -i 's,$RealBin/sorttable.js,%{_datadir}/clang/sorttable.js,' \
  %{buildroot}%{_bindir}/scan-build

sed -i 's,$RealBin/scanview.css,%{_datadir}/clang/scanview.css,' \
  %{buildroot}%{_bindir}/scan-build

sed -i 's,RealBin/bin,RealBin,' \
  %{buildroot}%{_bindir}/scan-build

install -m 755 -d %{buildroot}%{_datadir}/vim/site/syntax/
install -m 644 utils/vim/*.vim %{buildroot}%{_datadir}/vim/site/syntax/
mv utils/vim/README utils/vim/README.vim

# Stuff we don't want to include
rm %{buildroot}%{_libdir}/BugpointPasses.*
rm %{buildroot}%{_libdir}/LLVMHello.*
rm %{buildroot}%{_libdir}/libgtest*
rm %{buildroot}%{_mandir}/man1/lit.1

# Remove cmake files
rm -rf %{buildroot}/usr/share/llvm/cmake

%fdupes -s %{buildroot}%{_docdir}/%{name}
%fdupes -s %{buildroot}%{_docdir}/%{name}-doc

%post -n libLLVM -p /sbin/ldconfig
%postun -n libLLVM -p /sbin/ldconfig

%post -n libclang -p /sbin/ldconfig
%postun -n libclang -p /sbin/ldconfig

%post clang-devel -p /sbin/ldconfig
%postun clang-devel -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_bindir}/bugpoint
%{_bindir}/llc
%{_bindir}/lli
%{_bindir}/macho-dump
%exclude %{_bindir}/%{name}-config
%{_bindir}/%{name}*
%{_bindir}/opt
%exclude %{_mandir}/man1/%{name}-config.1%{ext_man}
%{_mandir}/man1/bugpoint.1%{ext_man}
%{_mandir}/man1/tblgen.1%{ext_man}
%{_mandir}/man1/llc.1%{ext_man}
%{_mandir}/man1/lli.1%{ext_man}
%{_mandir}/man1/llvm*.1%{ext_man}
%{_mandir}/man1/FileCheck.1%{ext_man}
%{_mandir}/man1/opt.1%{ext_man}

%files -n libLLVM
%defattr(-,root,root,-)
%{_libdir}/libLLVM*

%files clang
%defattr(-,root,root)
%{_bindir}/clang
%{_bindir}/clang-*
%{_bindir}/clang++
%{_bindir}/clang-format
%{_bindir}/ccc-analyzer
%{_bindir}/c++-analyzer
%{_bindir}/scan-build
%{_bindir}/scan-view
%{py_sitedir}/ScanView.py
%{py_sitedir}/Reporter.py
%{py_sitedir}/startfile.py
%{py_sitedir}/Resources
%{_datadir}/clang
%{_mandir}/man1/clang.1%{ext_man}
%{_libdir}/libLTO.*
%{_libdir}/libprofile_rt.*
%if 0%{?suse_version} >= 1220
%{_libdir}/LLVMgold.so
%{_libdir}/bfd-plugins/
%endif
%{_libdir}/clang
%ifnarch %arm aarch64 ppc64 s390 s390x
%{_libdir}/clang/%{_release_version}/lib/linux/
%endif

%files -n libclang
%defattr(-,root,root,-)
%exclude %{_libdir}/libclang.so
%{_libdir}/libclang*.so
%{_libdir}/libclang.so.*
%ifarch ppc64
%{_libdir}/libclang*.a
%endif

%files clang-devel
%defattr(-,root,root)
%{_libdir}/libclang.so
%{_includedir}/clang
%{_includedir}/clang-c
%doc %{_docdir}/llvm-clang

%files devel
%defattr(-,root,root,-)
%{_bindir}/%{name}-config
%doc %{_mandir}/man1/%{name}-config.1%{ext_man}
%{_includedir}/%{name}/
%{_includedir}/%{name}-c/
%doc %{_docdir}/%{name}

%files vim-plugins
%defattr(-,root,root,-)
%doc utils/vim/README.vim
%{_datadir}/vim/

%changelog
++++++ CVE-2014-2893.patch ++++++
Index: llvm-3.3/tools/clang/tools/scan-build/scan-build
===================================================================
--- llvm-3.3.orig/tools/clang/tools/scan-build/scan-build
+++ llvm-3.3/tools/clang/tools/scan-build/scan-build
@@ -195,6 +195,12 @@ sub GetHTMLRunDir {
   else {
     $NewDir = "$Dir/$DateString-$RunNumber";
   }
+
+  # Make sure that the directory does not exist in order to avoid hijack.
+  if (-e $NewDir) {
+      DieDiag("The directory '$NewDir' already exists.\n");
+  }
+
   system 'mkdir','-p',$NewDir;
   return $NewDir;
 }
++++++ aarch64-suse-support.patch ++++++
Index: llvm-3.3/tools/clang/lib/Driver/ToolChains.cpp
===================================================================
--- llvm-3.3.orig/tools/clang/lib/Driver/ToolChains.cpp
+++ llvm-3.3/tools/clang/lib/Driver/ToolChains.cpp
@@ -1073,9 +1073,10 @@ Generic_GCC::GCCInstallationDetector::GC
   // Declare a bunch of static data sets that we'll select between below. These
   // are specifically designed to always refer to string literals to avoid any
   // lifetime or initialization issues.
-  static const char *const AArch64LibDirs[] = { "/lib" };
+  static const char *const AArch64LibDirs[] = { "/lib64", "/lib" };
   static const char *const AArch64Triples[] = {
     "aarch64-none-linux-gnu",
+    "aarch64-suse-linux",
     "aarch64-linux-gnu"
   };
 
++++++ arm-remove-xfails.diff ++++++
Those tests do not fail anymore, and unexpected passes
actually cause make check to fail. ([email protected])

--- test/ExecutionEngine/2003-05-06-LivenessClobber.ll
+++ test/ExecutionEngine/2003-05-06-LivenessClobber.ll
@@ -1,7 +1,6 @@
 ; This testcase should return with an exit code of 1.
 ;
 ; RUN: not %lli %s
-; XFAIL: arm
 
 @test = global i64 0           ; <i64*> [#uses=1]
 
--- test/ExecutionEngine/2003-08-15-AllocaAssertion.ll
+++ test/ExecutionEngine/2003-08-15-AllocaAssertion.ll
@@ -1,5 +1,4 @@
 ; RUN: %lli %s > /dev/null
-; XFAIL: arm
 
 ; This testcase failed to work because two variable sized allocas confused the
 ; local register allocator.
--- test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll
+++ test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll
@@ -1,5 +1,4 @@
 ; RUN: %lli %s > /dev/null
-; XFAIL: arm
 
 ; This testcase exposes a bug in the local register allocator where it runs out
 ; of registers (due to too many overlapping live ranges), but then attempts to
++++++ arm_suse_support.diff ++++++
--- /tools/clang/lib/Driver/ToolChains.cpp.orig 2012-11-22 10:26:49.202107824 
+0100
+++ /tools/clang/lib/Driver/ToolChains.cpp      2012-11-22 12:20:33.662825882 
+0100
@@ -1082,11 +1082,13 @@ Generic_GCC::GCCInstallationDetector::GC
   static const char *const ARMLibDirs[] = { "/lib" };
   static const char *const ARMTriples[] = {
     "arm-linux-gnueabi",
+    "armv5tel-suse-linux-gnueabi",
     "arm-linux-androideabi"
   };
   static const char *const ARMHFTriples[] = {
     "arm-linux-gnueabihf",
+    "armv7hl-suse-linux-gnueabi",
     "armv7hl-redhat-linux-gnueabi"
   };
 
   static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
++++++ assume-opensuse.patch ++++++
--- a/tools/clang/lib/Driver/ToolChains.cpp     (revision 178453)
+++ b/tools/clang/lib/Driver/ToolChains.cpp     (working copy)
@@ -1878,7 +1878,7 @@
 }
 
 static bool IsOpenSuse(enum Distro Distro) {
-  return Distro >= OpenSuse11_3 && Distro <= OpenSuse12_2;
+  return true;
 }
 
 static bool IsDebian(enum Distro Distro) {
++++++ baselibs.conf ++++++
libLLVM
++++++ clang-disable-ada-extension.patch ++++++
Index: llvm/tools/clang/lib/Driver/Types.cpp
===================================================================
--- llvm.orig/tools/clang/lib/Driver/Types.cpp
+++ llvm/tools/clang/lib/Driver/Types.cpp
@@ -158,8 +158,6 @@ types::ID types::lookupTypeForExtension(
            .Case("hh", TY_CXXHeader)
            .Case("ll", TY_LLVM_IR)
            .Case("hpp", TY_CXXHeader)
-           .Case("ads", TY_Ada)
-           .Case("adb", TY_Ada)
            .Case("ast", TY_AST)
            .Case("c++", TY_CXX)
            .Case("C++", TY_CXX)
++++++ cmake-host-triple.patch ++++++
Index: llvm-3.3/cmake/modules/GetHostTriple.cmake
===================================================================
--- llvm-3.3.orig/cmake/modules/GetHostTriple.cmake
+++ llvm-3.3/cmake/modules/GetHostTriple.cmake
@@ -15,15 +15,19 @@ function( get_host_triple var )
       set( value "i686-pc-mingw32" )
     endif()
   else( MSVC )
-    set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess)
-    execute_process(COMMAND sh ${config_guess}
-      RESULT_VARIABLE TT_RV
-      OUTPUT_VARIABLE TT_OUT
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-    if( NOT TT_RV EQUAL 0 )
-      message(FATAL_ERROR "Failed to execute ${config_guess}")
-    endif( NOT TT_RV EQUAL 0 )
-    set( value ${TT_OUT} )
+    if( NOT LLVM_HOST_TRIPLE )
+        set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess)
+        execute_process(COMMAND sh ${config_guess}
+            RESULT_VARIABLE TT_RV
+            OUTPUT_VARIABLE TT_OUT
+            OUTPUT_STRIP_TRAILING_WHITESPACE)
+        if( NOT TT_RV EQUAL 0 )
+            message(FATAL_ERROR "Failed to execute ${config_guess}")
+        endif( NOT TT_RV EQUAL 0 )
+        set( value ${TT_OUT} )
+    else( LLVM_HOST_TRIPLE )
+        set( value ${LLVM_HOST_TRIPLE} )
+    endif( NOT LLVM_HOST_TRIPLE )
   endif( MSVC )
   set( ${var} ${value} PARENT_SCOPE )
   message(STATUS "Target triple: ${value}")
++++++ default-to-i586.patch ++++++
Index: llvm-3.3/tools/clang/lib/Driver/Tools.cpp
===================================================================
--- llvm-3.3.orig/tools/clang/lib/Driver/Tools.cpp
+++ llvm-3.3/tools/clang/lib/Driver/Tools.cpp
@@ -1243,12 +1243,12 @@ static const char *getX86TargetCPU(const
   if (Triple.getOSName().startswith("netbsd"))
     return "i486";
   // All x86 devices running Android have core2 as their common
-  // denominator. This makes a better choice than pentium4.
+  // denominator. This makes a better choice than i586.
   if (Triple.getEnvironment() == llvm::Triple::Android)
     return "core2";
 
-  // Fallback to p4.
-  return "pentium4";
+  // Fallback to i586.
+  return "i586";
 }
 
 void Clang::AddX86TargetArgs(const ArgList &Args,
++++++ llvm-config-lib64.patch ++++++
diff -ur llvm.orig/tools/llvm-config/llvm-config.cpp 
llvm/tools/llvm-config/llvm-config.cpp
--- llvm.orig/tools/llvm-config/llvm-config.cpp 2012-11-12 11:25:40.547628293 
+0100
+++ llvm/tools/llvm-config/llvm-config.cpp      2012-12-02 15:09:31.981279773 
+0100
@@ -231,15 +231,15 @@
     switch (DevelopmentTreeLayout) {
     case MakefileStyle:
       ActiveBinDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/bin";
-      ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib";
+      ActiveLibDir = ActiveObjRoot + "/" + LLVM_BUILDMODE + "/lib64";
       break;
     case CMakeStyle:
       ActiveBinDir = ActiveObjRoot + "/bin";
-      ActiveLibDir = ActiveObjRoot + "/lib";
+      ActiveLibDir = ActiveObjRoot + "/lib64";
       break;
     case CMakeBuildModeStyle:
       ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE;
-      ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE;
+      ActiveLibDir = ActiveObjRoot + "/lib64/" + LLVM_BUILDMODE;
       break;
     }
 
@@ -250,7 +250,7 @@
     ActivePrefix = CurrentExecPrefix;
     ActiveIncludeDir = ActivePrefix + "/include";
     ActiveBinDir = ActivePrefix + "/bin";
-    ActiveLibDir = ActivePrefix + "/lib";
+    ActiveLibDir = ActivePrefix + "/lib64";
     ActiveIncludeOption = "-I" + ActiveIncludeDir;
   }
   ++++++ llvm-disable-pretty-stack-trace.patch ++++++
Index: llvm-3.3/lib/Support/PrettyStackTrace.cpp
===================================================================
--- llvm-3.3.orig/lib/Support/PrettyStackTrace.cpp
+++ llvm-3.3/lib/Support/PrettyStackTrace.cpp
@@ -27,7 +27,7 @@
 using namespace llvm;
 
 namespace llvm {
-  bool DisablePrettyStackTrace = false;
+  bool DisablePrettyStackTrace = true;
 }
 
 // FIXME: This should be thread local when llvm supports threads.
Index: llvm-3.3/tools/clang/tools/driver/driver.cpp
===================================================================
--- llvm-3.3.orig/tools/clang/tools/driver/driver.cpp
+++ llvm-3.3/tools/clang/tools/driver/driver.cpp
@@ -341,6 +341,7 @@ static void ParseProgName(SmallVectorImp
 }
 
 int main(int argc_, const char **argv_) {
+  llvm::DisablePrettyStackTrace = false;
   llvm::sys::PrintStackTraceOnErrorSignal();
   llvm::PrettyStackTraceProgram X(argc_, argv_);
 
++++++ llvm-no-visibility.patch ++++++
Index: llvm-3.3/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm-3.3.orig/cmake/modules/HandleLLVMOptions.cmake
+++ llvm-3.3/cmake/modules/HandleLLVMOptions.cmake
@@ -104,13 +104,6 @@ if( LLVM_ENABLE_PIC )
     # On Windows all code is PIC. MinGW warns if -fPIC is used.
   else()
     add_flag_or_print_warning("-fPIC")
-
-    if( WIN32 OR CYGWIN)
-      # MinGW warns if -fvisibility-inlines-hidden is used.
-    else()
-      check_cxx_compiler_flag("-fvisibility-inlines-hidden" 
SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
-      append_if(SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG 
"-fvisibility-inlines-hidden" CMAKE_CXX_FLAGS)
-    endif()
   endif()
 endif()
 
++++++ llvm-rpmlintrc ++++++
# This line is mandatory to access the configuration functions
from Config import *

# it is a compiler and the package provides llvm-gcc-devel, llvm-gcc-c++-devel
addFilter("devel-file-in-non-devel-package .*/clang/.*/include/.*")
addFilter("devel-file-in-non-devel-package .*/clang/.*/lib/.*")

# PPC64 related hacks, remove these when we can
# build shared libs there.
addFilter("devel-file-in-non-devel-package .*/lib.*/*.a")
addFilter ("libclang.*shlib-policy-name-error")
++++++ r189852.diff ++++++

Don't emit an available_externally vtable pointing to linkonce_odr funcs.

This fixes pr13124.

>From the discussion at
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/022606.html
we know that we cannot make funcions in a weak_odr vtable also weak_odr. They
should remain linkonce_odr.

The side effect is that we cannot emit a available_externally vtable unless we
also emit a copy of the function. This also has an issue: If codegen is going
to output a function, sema has to mark it used. Given llvm.org/pr9114, it looks
like sema cannot be more aggressive at marking functions used because
of vtables.

This leaves us with a few unpleasant options:

* Marking functions in vtables used if possible. This sounds a bit sloppy, so
  we should avoid it.
* Producing available_externally vtables only when all the functions in it are
  already used or weak_odr. This would cover cases like

--------------------
struct foo {
  virtual ~foo();
};
struct bar : public foo {
  virtual void zed();
};
void f() {
  foo *x(new bar);
  delete x;
}
void g(bar *x) {
  x->~bar(); // force the destructor to be used
}
--------------------------

and

----------------------------------
template<typename T>
struct bar {
  virtual ~bar();
};
template<typename T>
bar<T>::~bar() {
}

// make the destructor weak_odr instead of linkonce_odr
extern template class bar<int>;

void f() {
  bar<int> *x(new bar<int>);
  delete x;
}
----------------------------

These look like corner cases, so it is unclear if it is worth it.

* And finally: Just nuke this optimization. That is what this patch implements.


--- tools/clang/lib/CodeGen/CGVTables.cpp
+++ tools/clang/lib/CodeGen/CGVTables.cpp
@@ -734,12 +734,7 @@
     switch (keyFunction->getTemplateSpecializationKind()) {
       case TSK_Undeclared:
       case TSK_ExplicitSpecialization:
-        // When compiling with optimizations turned on, we emit all vtables,
-        // even if the key function is not defined in the current translation
-        // unit. If this is the case, use available_externally linkage.
-        if (!def && CodeGenOpts.OptimizationLevel)
-          return llvm::GlobalVariable::AvailableExternallyLinkage;
-
+        assert(def && "Should not have been asked to emit this");
         if (keyFunction->isInlined())
           return !Context.getLangOpts().AppleKext ?
                    llvm::GlobalVariable::LinkOnceODRLinkage :
@@ -758,9 +753,7 @@
                  llvm::Function::InternalLinkage;
   
       case TSK_ExplicitInstantiationDeclaration:
-        return !Context.getLangOpts().AppleKext ?
-                 llvm::GlobalVariable::AvailableExternallyLinkage :
-                 llvm::Function::InternalLinkage;
+        llvm_unreachable("Should not have been asked to emit this");
     }
   }
 
@@ -776,7 +769,7 @@
     return llvm::GlobalVariable::LinkOnceODRLinkage;
 
   case TSK_ExplicitInstantiationDeclaration:
-    return llvm::GlobalVariable::AvailableExternallyLinkage;
+    llvm_unreachable("Should not have been asked to emit this");
 
   case TSK_ExplicitInstantiationDefinition:
       return llvm::GlobalVariable::WeakODRLinkage;
@@ -875,16 +868,6 @@
 /// we define that v-table?
 static bool shouldEmitVTableAtEndOfTranslationUnit(CodeGenModule &CGM,
                                                    const CXXRecordDecl *RD) {
-  // If we're building with optimization, we always emit v-tables
-  // since that allows for virtual function calls to be devirtualized.
-  // If the v-table is defined strongly elsewhere, this definition
-  // will be emitted available_externally.
-  //
-  // However, we don't want to do this in -fapple-kext mode, because
-  // kext mode does not permit devirtualization.
-  if (CGM.getCodeGenOpts().OptimizationLevel && !CGM.getLangOpts().AppleKext)
-    return true;
-
   return !CGM.getVTables().isVTableExternal(RD);
 }
 
--- tools/clang/test/CodeGenCXX/thunks-available-externally.cpp
+++ tools/clang/test/CodeGenCXX/thunks-available-externally.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -O3 -o - | 
FileCheck %s
+// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm-only -O3
 
 // Check that we don't assert on this case.
 namespace Test1 {
@@ -58,15 +58,6 @@
   b->f();
 }
 
-// CHECK: define void @_ZN5Test21fEv()
-// CHECK: call void @_ZN5Test21C1fEv
-// CHECK: ret void
-// CHECK: define available_externally void @_ZThn16_N5Test21C1fEv
-void f() {
-  C c;
-  f(&c);
-}
-
 }
 
 // Test that we don't assert.
--- tools/clang/test/CodeGenCXX/vtable-available-externally.cpp
+++ tools/clang/test/CodeGenCXX/vtable-available-externally.cpp
@@ -2,18 +2,10 @@
 // RUN: FileCheck --check-prefix=CHECK-TEST1 %s < %t
 // RUN: FileCheck --check-prefix=CHECK-TEST2 %s < %t
 // RUN: FileCheck --check-prefix=CHECK-TEST5 %s < %t
-// RUN: FileCheck --check-prefix=CHECK-TEST7 %s < %t
 
 #include <typeinfo>
 
-// Test1::A's key function (f) is not defined in this translation
-// unit, but in order to devirtualize calls, we emit the v-table with
-// available_externally linkage.
-//
-// There's no real reason to do this to the RTTI, though.
-
-// CHECK-TEST1: @_ZTVN5Test11AE = available_externally
-// CHECK-TEST1: @_ZTIN5Test11AE = external constant i8*
+// CHECK-TEST1: @_ZTVN5Test11AE = external unnamed_addr constant
 namespace Test1 {
 
 struct A {
@@ -160,13 +152,4 @@
   void f6 ();
 };
 
-// CHECK-TEST7: define void @_ZN5Test79check_c28Ev
-// CHECK-TEST7: call void @_ZN5Test73c282f6Ev
-// CHECK-TEST7: ret void
-void check_c28 () {
-  c28 obj;
-  c11 *ptr = &obj;
-  ptr->f6 ();
-}
-
 }
--- tools/clang/test/CodeGenCXX/vtable-linkage.cpp
+++ tools/clang/test/CodeGenCXX/vtable-linkage.cpp
@@ -163,13 +163,13 @@
 // F<int> is an explicit template instantiation declaration without a
 // key function, so its vtable should have external linkage.
 // CHECK-9: @_ZTV1FIiE = external unnamed_addr constant
-// CHECK-9-OPT: @_ZTV1FIiE = available_externally unnamed_addr constant
+// CHECK-9-OPT: @_ZTV1FIiE = external unnamed_addr constant
 
 // E<int> is an explicit template instantiation declaration. It has a
 // key function that is not instantiated, so we should only reference
 // its vtable, not define it.
 // CHECK-10: @_ZTV1EIiE = external unnamed_addr constant
-// CHECK-10-OPT: @_ZTV1EIiE = available_externally unnamed_addr constant
+// CHECK-10-OPT: @_ZTV1EIiE = external unnamed_addr constant
 
 // The anonymous struct for e has no linkage, so the vtable should have
 // internal linkage.
@@ -232,9 +232,8 @@
 // CHECK-I: @_ZTT1IIiE = external unnamed_addr constant
 // CHECK-I-NOT: @_ZTC1IIiE
 //
-// CHECK-I-OPT: @_ZTV1IIiE = available_externally unnamed_addr constant
-// CHECK-I-OPT: @_ZTT1IIiE = available_externally unnamed_addr constant {{.*}} 
@_ZTC1IIiE0_6VBase2
-// CHECK-I-OPT: @_ZTC1IIiE0_6VBase2 = internal unnamed_addr constant
+// CHECK-I-OPT: @_ZTV1IIiE = external unnamed_addr constant
+// CHECK-I-OPT: @_ZTT1IIiE = external unnamed_addr constant
 struct VBase1 { virtual void f(); }; struct VBase2 : virtual VBase1 {};
 template<typename T>
 struct I : VBase2 {};
++++++ set-revision.patch ++++++
Index: llvm/tools/clang/lib/Basic/Version.cpp
===================================================================
--- llvm.orig/tools/clang/lib/Basic/Version.cpp
+++ llvm/tools/clang/lib/Basic/Version.cpp
@@ -66,19 +66,11 @@ std::string getLLVMRepositoryPath() {
 }
 
 std::string getClangRevision() {
-#ifdef SVN_REVISION
   return SVN_REVISION;
-#else
-  return "";
-#endif
 }
 
 std::string getLLVMRevision() {
-#ifdef LLVM_REVISION
   return LLVM_REVISION;
-#else
-  return "";
-#endif
 }
 
 std::string getClangFullRepositoryVersion() {
++++++ unreachable-code.patch ++++++
Index: llvm/utils/TableGen/CodeGenInstruction.cpp
===================================================================
--- llvm.orig/utils/TableGen/CodeGenInstruction.cpp
+++ llvm/utils/TableGen/CodeGenInstruction.cpp
@@ -191,7 +191,7 @@ CGIOperandList::ParseOperandName(const s
       return std::make_pair(OpIdx, i);
 
   // Otherwise, didn't find it!
-  PrintFatalError(TheDef->getName() + ": unknown suboperand name in '" + Op + 
"'");
+  llvm_unreachable(TheDef->getName() + ": unknown suboperand name in '" + Op + 
"'");
 }
 
 static void ParseConstraint(const std::string &CStr, CGIOperandList &Ops) {
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to