Hello community, here is the log from the commit of package llvm for openSUSE:Factory checked in at 2016-09-16 10:59:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/llvm (Old) and /work/SRC/openSUSE:Factory/.llvm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "llvm" Changes: -------- --- /work/SRC/openSUSE:Factory/llvm/lldb.changes 2016-08-28 12:17:35.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.llvm.new/lldb.changes 2016-09-16 10:59:32.000000000 +0200 @@ -1,0 +2,54 @@ +Wed Sep 7 10:01:47 UTC 2016 - tchva...@suse.com + +- Sort out with spec-cleaner + +------------------------------------------------------------------- +Thu Aug 31 20:36:58 UTC 2016 - toddrme2...@gmail.com + +- Update to llvm 3.8.1 + * See http://llvm.org/releases/3.8.1/docs/ReleaseNotes.html and + http://llvm.org/releases/3.8.1/tools/docs/ReleaseNotes.html +- Use versioned libLLVM (to libLLVM3_8) and libclang (to libclang3_8) +- Change versioning of liblldb3_8 to liblldb-3_8 and use a variable + to control the name instead of hard-coding it. +- Use bcond_with and bcond_without to enable/disable build options + instead of hard-coding them. +- Put buildrequires as requires in -devel packages to avoid linker errors + when building packages against the -devel packages. +- Add ffi support (disabled by default). +- Add oprofile support (disabled by default). +- Add valgrind support (disabled by default). +- Link cmake files to the normal cmake file directory to allow autodetection + of cmake interfaces. +- Remove unused lldb components from main spec file. +- Split llvm python bindings into own subpackage. +- Split emacs plugin into own subpackage +- Move additional vim plugins into vim plugins package +- Split libc++, libLTO, LLVMgold, libomp, clang-chekers into own subpackages +- Make python-clang, llvm-vim-plugins, and llvm-emacs-plugins noarch since + they aren't architecture-specific. +- Make packages besides llvm, llvm-clang, and the shared libraries conflict + with other versions. This will be important when multiple LLVM versions + are supported. +- Various spec file cleanups +- Rebase patches: + * arm_suse_support.diff + * assume-opensuse.patch + * clang-resourcedirs.patch + * default-to-i586.patch + * glibc-2.23-libcxx.patch + * glibc-2.24-libcxx.patch + * lldb-add-pthread-dl-libs.patch + * lldb-cmake.patch + * llvm-fix-find-gcc5-install.patch + * llvm-nonvoid-return.patch + * llvm-remove-clang-only-flags.patch + * revert-cmake-soname.patch + * set-revision.patch + +------------------------------------------------------------------- +Wed Aug 31 10:24:31 UTC 2016 - tchva...@suse.com + +- Convert to use %cmake macros + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/llvm/llvm.changes 2016-08-06 20:37:48.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.llvm.new/llvm.changes 2016-09-16 10:59:32.000000000 +0200 @@ -1,0 +2,60 @@ +Wed Sep 7 10:05:32 UTC 2016 - tchva...@suse.com + +- Sort a bit with spec-cleaner +- Remove the latest switch for now, things should be either coinstallable + or not, we don't need to bother around with compilation like this + +------------------------------------------------------------------- +Thu Aug 31 20:36:58 UTC 2016 - toddrme2...@gmail.com + +- Update to llvm 3.8.1 + * See http://llvm.org/releases/3.8.1/docs/ReleaseNotes.html and + http://llvm.org/releases/3.8.1/tools/docs/ReleaseNotes.html +- Use versioned libLLVM (to libLLVM3_8) and libclang (to libclang3_8) +- Change versioning of liblldb3_8 to liblldb-3_8 and use a variable + to control the name instead of hard-coding it. +- Use bcond_with and bcond_without to enable/disable build options + instead of hard-coding them. +- Put buildrequires as requires in -devel packages to avoid linker errors + when building packages against the -devel packages. +- Add ffi support (disabled by default). +- Add oprofile support (disabled by default). +- Add valgrind support (disabled by default). +- Link cmake files to the normal cmake file directory to allow autodetection + of cmake interfaces. +- Remove unused lldb components from main spec file. +- Split llvm python bindings into own subpackage. +- Split emacs plugin into own subpackage +- Move additional vim plugins into vim plugins package +- Split libc++, libLTO, LLVMgold, libomp, clang-chekers into own subpackages +- Make python-clang, llvm-vim-plugins, and llvm-emacs-plugins noarch since + they aren't architecture-specific. +- Make packages besides llvm, llvm-clang, and the shared libraries conflict + with other versions. This will be important when multiple LLVM versions + are supported. +- Various spec file cleanups +- Rebase patches: + * arm_suse_support.diff + * assume-opensuse.patch + * clang-resourcedirs.patch + * default-to-i586.patch + * glibc-2.23-libcxx.patch + * glibc-2.24-libcxx.patch + * lldb-add-pthread-dl-libs.patch + * lldb-cmake.patch + * llvm-fix-find-gcc5-install.patch + * llvm-nonvoid-return.patch + * llvm-remove-clang-only-flags.patch + * revert-cmake-soname.patch + * set-revision.patch + +------------------------------------------------------------------- +Fri Aug 26 10:03:56 UTC 2016 - tchva...@suse.com + +- Start conversion to use cmake macros with now introduced + compatibility for ninja +- Reduce number of threads if we don't have enough memory +- Add patch for the nonvoid returns: + * llvm-nonvoid-return.patch + +------------------------------------------------------------------- Old: ---- cfe-3.8.0.src.tar.xz cfe-docs-3.8.0.src.tar.xz clang-tools-extra-3.8.0.src.tar.xz compiler-rt-3.8.0.src.tar.xz libcxx-3.8.0.src.tar.xz libcxxabi-3.8.0.src.tar.xz lldb-3.8.0.src.tar.xz llvm-3.8.0.src.tar.xz llvm-docs-3.8.0.src.tar.xz openmp-3.8.0.src.tar.xz New: ---- cfe-3.8.1.src.tar.xz cfe-docs-3.8.1.src.tar.xz clang-tools-extra-3.8.1.src.tar.xz compiler-rt-3.8.1.src.tar.xz libcxx-3.8.1.src.tar.xz libcxxabi-3.8.1.src.tar.xz lldb-3.8.1.src.tar.xz llvm-3.8.1.src.tar.xz llvm-docs-3.8.1.src.tar.xz llvm-nonvoid-return.patch openmp-3.8.1.src.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lldb.spec ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:35.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:35.000000000 +0200 @@ -16,9 +16,10 @@ # -%define _revision 262553 +%define _sonum 3_8 +%define _revsn 273405 Name: lldb -Version: 3.8.0 +Version: 3.8.1 Release: 0 Summary: Software debugger built using LLVM libraries License: NCSA @@ -33,18 +34,20 @@ Patch2: lldb-add-pthread-dl-libs.patch BuildRequires: cmake BuildRequires: fdupes -BuildRequires: libedit-devel -BuildRequires: libffi-devel -BuildRequires: libxml2-devel -BuildRequires: llvm-clang-devel = %{version} -BuildRequires: llvm-devel = %{version} +BuildRequires: llvm-gold BuildRequires: ncurses-devel BuildRequires: ninja -BuildRequires: python-devel +BuildRequires: pkgconfig BuildRequires: swig -BuildRequires: zlib-devel -Requires: libLLVM = %{version} -Requires: libclang = %{version} +BuildRequires: cmake(Clang) = %{version} +BuildRequires: cmake(LLVM) = %{version} +BuildRequires: pkgconfig(libedit) +BuildRequires: pkgconfig(libffi) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(python2) +BuildRequires: pkgconfig(zlib) +# Avoid multiple provider errors +Requires: liblldb%{_sonum} = %{version} Requires: python Requires: python-six ExclusiveArch: arm x86_64 @@ -55,23 +58,42 @@ larger LLVM Project, such as the Clang expression parser and LLVM disassembler. -%package -n liblldb3_8 +%package -n liblldb%{_sonum} Summary: LLDB software debugger runtime library Group: System/Libraries +# Avoid multiple provider errors +Requires: libLLVM%{_sonum} = %{version} +Requires: libclang%{_sonum} = %{version} -%description -n liblldb3_8 +%description -n liblldb%{_sonum} This subpackage contains the main LLDB component. %package devel Summary: Development files for LLDB Group: Development/Languages/Other -Requires: libedit-devel -Requires: liblldb3_8 = %{version} -Requires: zlib-devel +Requires: cmake +Requires: liblldb%{_sonum} = %{version} +Requires: ncurses-devel +Requires: swig +Requires: cmake(Clang) = %{version} +Requires: cmake(LLVM) = %{version} +Requires: pkgconfig(libedit) +Requires: pkgconfig(libffi) +Requires: pkgconfig(libxml-2.0) +Requires: pkgconfig(zlib) %description devel This package contains the development files for LLDB. +%package -n python-lldb +Summary: Python bindings for liblldb +Group: Development/Languages/Python +Requires: liblldb%{_sonum} = %{version} +Requires: python + +%description -n python-lldb +This package contains the Python bindings to clang (C language) frontend for LLVM. + %prep %setup -q -n %{name}-%{version}.src %patch0 -p1 @@ -79,42 +101,35 @@ %patch2 -p1 # Set LLDB revision -sed -i s,LLDB_REVISION,\"%{_revision}\",g source/lldb.cpp #" +sed -i s,LLDB_REVISION,\"%{_revsn}\",g source/lldb.cpp #" %build -mkdir build -pushd build - -cmake -DCMAKE_C_COMPILER=clang \ +%define __builder ninja +%cmake \ + -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DCMAKE_BUILD_TYPE=Release \ - %if "%{_lib}" == "lib64" +%if "%{_lib}" == "lib64" -DLLVM_LIBDIR_SUFFIX=64 \ - %endif +%endif -DLLVM_RUNTIME_OUTPUT_INTDIR=$PWD/bin \ -DLLVM_LIBRARY_OUTPUT_INTDIR=$PWD/%{_lib} \ -DPYTHON_VERSION_MAJOR=%{py_major} \ - -DPYTHON_VERSION_MINOR=%{py_minor} \ - -G "Ninja" \ - .. - -ninja + -DPYTHON_VERSION_MINOR=%{py_minor} +%make_jobs %install -pushd build -DESTDIR=%{buildroot} ninja install +%cmake_install # Python: fix binary libraries location. -rm %{buildroot}%{py_sitedir}/lldb/_lldb.so +rm %{buildroot}%{python_sitearch}/lldb/_lldb.so liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) ln -vsf "../../../${liblldb}" %{buildroot}%{python_sitearch}/lldb/_lldb.so ln -vsf "../../${liblldb}" %{buildroot}%{python_sitearch}/_lldb.so # Remove bundled six.py. -rm -f %{buildroot}%{py_sitedir}/six.* +rm -f %{buildroot}%{python_sitearch}/six.* # Remove static libraries. rm %{buildroot}%{_libdir}/liblldb*.a @@ -122,23 +137,41 @@ # Fix duplicated files. %fdupes %{_includedir}/%{name}/Host/ -%post -n liblldb3_8 -p /sbin/ldconfig -%postun -n liblldb3_8 -p /sbin/ldconfig +mkdir -p %{buildroot}%{_libdir}/cmake/lldb/ +cp cmake/modules/*.cmake %{buildroot}%{_libdir}/cmake/lldb/ + +# Make consistent with the rest of the executables +mv %{buildroot}%{_bindir}/lldb-argdumper %{buildroot}%{_bindir}/lldb-argdumper-%{version} +ln -s %{_bindir}/lldb-argdumper-%{version} %{buildroot}%{_bindir}/lldb-argdumper + +%post -n liblldb%{_sonum} -p /sbin/ldconfig +%postun -n liblldb%{_sonum} -p /sbin/ldconfig %files %defattr(-,root,root,-) -%{_bindir}/lldb* -%{py_sitedir}/_lldb.so -%{py_sitedir}/lldb -%{py_sitedir}/readline.so +%{_bindir}/lldb +%{_bindir}/lldb-argdumper +%{_bindir}/lldb-mi +%{_bindir}/lldb-server +%{_bindir}/lldb-%{version} +%{_bindir}/lldb-argdumper-%{version} +%{_bindir}/lldb-mi-%{version} +%{_bindir}/lldb-server-%{version} + +%files -n python-lldb +%defattr(-,root,root) +%{python_sitearch}/_lldb.so +%{python_sitearch}/lldb/ +%{python_sitearch}/readline.so -%files -n liblldb3_8 +%files -n liblldb%{_sonum} %defattr(-,root,root) %{_libdir}/liblldb.so.* %files devel %defattr(-,root,root,-) -%{_includedir}/lldb +%{_libdir}/cmake/lldb/ +%{_includedir}/lldb/ %{_libdir}/liblldb.so %changelog ++++++ llvm.spec ++++++ ++++ 911 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/llvm/llvm.spec ++++ and /work/SRC/openSUSE:Factory/.llvm.new/llvm.spec ++++++ _constraints ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:35.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:35.000000000 +0200 @@ -1,6 +1,9 @@ <?xml version="1.0"?> <constraints> <hardware> + <disk> + <size unit="G">20</size> + </disk> <memory> <size unit="M">4000</size> </memory> ++++++ arm_suse_support.diff ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:35.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:35.000000000 +0200 @@ -1,7 +1,7 @@ -Index: cfe-3.8.0.src/lib/Driver/ToolChains.cpp +Index: cfe-3.8.1.src/lib/Driver/ToolChains.cpp =================================================================== ---- cfe-3.8.0.src/lib/Driver/ToolChains.cpp.orig -+++ cfe-3.8.0.src/lib/Driver/ToolChains.cpp +--- cfe-3.8.1.src/lib/Driver/ToolChains.cpp.orig ++++ cfe-3.8.1.src/lib/Driver/ToolChains.cpp @@ -1418,7 +1418,7 @@ bool Generic_GCC::GCCInstallationDetecto static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; static const char *const AArch64Triples[] = { ++++++ assume-opensuse.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:35.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:35.000000000 +0200 @@ -1,7 +1,7 @@ -Index: cfe-3.8.0.src/lib/Driver/ToolChains.cpp +Index: cfe-3.8.1.src/lib/Driver/ToolChains.cpp =================================================================== ---- cfe-3.8.0.src/lib/Driver/ToolChains.cpp.orig -+++ cfe-3.8.0.src/lib/Driver/ToolChains.cpp +--- cfe-3.8.1.src/lib/Driver/ToolChains.cpp.orig ++++ cfe-3.8.1.src/lib/Driver/ToolChains.cpp @@ -3422,6 +3422,7 @@ static bool IsUbuntu(enum Distro Distro) } ++++++ baselibs.conf ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:35.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:35.000000000 +0200 @@ -1,3 +1,4 @@ -libLLVM -libclang - +libLLVM3_8 +libclang3_8 +llvm-devel +clang-devel ++++++ cfe-3.8.0.src.tar.xz -> cfe-3.8.1.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm/cfe-3.8.0.src.tar.xz /work/SRC/openSUSE:Factory/.llvm.new/cfe-3.8.1.src.tar.xz differ: char 25, line 1 ++++++ cfe-docs-3.8.0.src.tar.xz -> cfe-docs-3.8.1.src.tar.xz ++++++ ++++ 7815 lines of diff (skipped) ++++++ clang-resourcedirs.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:36.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:36.000000000 +0200 @@ -1,7 +1,7 @@ -Index: cfe-3.8.0.src/lib/Driver/Driver.cpp +Index: cfe-3.8.1.src/lib/Driver/Driver.cpp =================================================================== ---- cfe-3.8.0.src/lib/Driver/Driver.cpp -+++ cfe-3.8.0.src/lib/Driver/Driver.cpp +--- cfe-3.8.1.src/lib/Driver/Driver.cpp ++++ cfe-3.8.1.src/lib/Driver/Driver.cpp @@ -64,7 +64,7 @@ Driver::Driver(StringRef ClangExecutable // Compute the path to the resource directory. ++++++ clang-tools-extra-3.8.0.src.tar.xz -> clang-tools-extra-3.8.1.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-tools-extra-3.8.0.src/test/Unit/lit.site.cfg.in new/clang-tools-extra-3.8.1.src/test/Unit/lit.site.cfg.in --- old/clang-tools-extra-3.8.0.src/test/Unit/lit.site.cfg.in 2014-08-13 14:54:50.000000000 +0200 +++ new/clang-tools-extra-3.8.1.src/test/Unit/lit.site.cfg.in 2016-06-01 02:27:34.000000000 +0200 @@ -6,10 +6,4 @@ config.shlibdir = "@SHLIBDIR@" config.target_triple = "@TARGET_TRIPLE@" -# Make sure any custom vars defined above that are required in lit.local.cfg -# files are made available. -def on_clone(parent, clone, path): - clone.extra_tools_src_dir = parent.extra_tools_src_dir - -config.on_clone = on_clone lit_config.load_config(config, "@CLANG_TOOLS_SOURCE_DIR@/test/Unit/lit.cfg") ++++++ compiler-rt-3.8.0.src.tar.xz -> compiler-rt-3.8.1.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/cmake/config-ix.cmake new/compiler-rt-3.8.1.src/cmake/config-ix.cmake --- old/compiler-rt-3.8.0.src/cmake/config-ix.cmake 2016-02-03 18:13:25.000000000 +0100 +++ new/compiler-rt-3.8.1.src/cmake/config-ix.cmake 2016-05-25 07:49:40.000000000 +0200 @@ -293,8 +293,8 @@ set(ALL_TSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64}) set(ALL_UBSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${PPC64}) -set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64}) -set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64}) +set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${MIPS32} ${MIPS64}) +set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64}) if(APPLE) include(CompilerRTDarwinUtils) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/asan/asan_stack.h new/compiler-rt-3.8.1.src/lib/asan/asan_stack.h --- old/compiler-rt-3.8.0.src/lib/asan/asan_stack.h 2015-10-01 02:22:21.000000000 +0200 +++ new/compiler-rt-3.8.1.src/lib/asan/asan_stack.h 2016-05-25 07:57:29.000000000 +0200 @@ -48,7 +48,10 @@ uptr stack_top = t->stack_top(); uptr stack_bottom = t->stack_bottom(); ScopedUnwinding unwind_scope(t); - stack->Unwind(max_depth, pc, bp, context, stack_top, stack_bottom, fast); + if (!SANITIZER_MIPS || IsValidFrame(bp, stack_top, stack_bottom)) { + stack->Unwind(max_depth, pc, bp, context, stack_top, stack_bottom, + fast); + } } else if (!t && !fast) { /* If GetCurrentThread() has failed, try to do slow unwind anyways. */ stack->Unwind(max_depth, pc, bp, context, 0, 0, false); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/lsan/lsan.h new/compiler-rt-3.8.1.src/lib/lsan/lsan.h --- old/compiler-rt-3.8.0.src/lib/lsan/lsan.h 2014-10-26 04:35:14.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/lsan/lsan.h 2016-05-25 07:57:29.000000000 +0200 @@ -24,8 +24,11 @@ stack_top = t->stack_end(); \ stack_bottom = t->stack_begin(); \ } \ - stack.Unwind(max_size, StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), \ - /* context */ 0, stack_top, stack_bottom, fast); \ + if (!SANITIZER_MIPS || \ + IsValidFrame(GET_CURRENT_FRAME(), stack_top, stack_bottom)) { \ + stack.Unwind(max_size, StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), \ + /* context */ 0, stack_top, stack_bottom, fast); \ + } \ } #define GET_STACK_TRACE_FATAL \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/msan/msan.cc new/compiler-rt-3.8.1.src/lib/msan/msan.cc --- old/compiler-rt-3.8.0.src/lib/msan/msan.cc 2015-12-14 15:15:32.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/msan/msan.cc 2016-05-23 09:04:33.000000000 +0200 @@ -462,13 +462,8 @@ } unsigned char *s = (unsigned char*)MEM_TO_SHADOW(x); - for (uptr i = 0; i < size; i++) { -#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - Printf("%x%x ", s[i] & 0xf, s[i] >> 4); -#else + for (uptr i = 0; i < size; i++) Printf("%x%x ", s[i] >> 4, s[i] & 0xf); -#endif - } Printf("\n"); } @@ -580,13 +575,13 @@ } u16 __sanitizer_unaligned_load16(const uu16 *p) { - __msan_retval_tls[0] = *(uu16 *)MEM_TO_SHADOW((uptr)p); + *(uu16 *)&__msan_retval_tls[0] = *(uu16 *)MEM_TO_SHADOW((uptr)p); if (__msan_get_track_origins()) __msan_retval_origin_tls = GetOriginIfPoisoned((uptr)p, sizeof(*p)); return *p; } u32 __sanitizer_unaligned_load32(const uu32 *p) { - __msan_retval_tls[0] = *(uu32 *)MEM_TO_SHADOW((uptr)p); + *(uu32 *)&__msan_retval_tls[0] = *(uu32 *)MEM_TO_SHADOW((uptr)p); if (__msan_get_track_origins()) __msan_retval_origin_tls = GetOriginIfPoisoned((uptr)p, sizeof(*p)); return *p; @@ -598,7 +593,7 @@ return *p; } void __sanitizer_unaligned_store16(uu16 *p, u16 x) { - u16 s = __msan_param_tls[1]; + u16 s = *(uu16 *)&__msan_param_tls[1]; *(uu16 *)MEM_TO_SHADOW((uptr)p) = s; if (s && __msan_get_track_origins()) if (uu32 o = __msan_param_origin_tls[2]) @@ -606,7 +601,7 @@ *p = x; } void __sanitizer_unaligned_store32(uu32 *p, u32 x) { - u32 s = __msan_param_tls[1]; + u32 s = *(uu32 *)&__msan_param_tls[1]; *(uu32 *)MEM_TO_SHADOW((uptr)p) = s; if (s && __msan_get_track_origins()) if (uu32 o = __msan_param_origin_tls[2]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/msan/msan_interceptors.cc new/compiler-rt-3.8.1.src/lib/msan/msan_interceptors.cc --- old/compiler-rt-3.8.0.src/lib/msan/msan_interceptors.cc 2016-02-17 20:05:23.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/msan/msan_interceptors.cc 2016-05-24 13:11:57.000000000 +0200 @@ -1628,7 +1628,11 @@ INTERCEPT_FUNCTION(getrusage); INTERCEPT_FUNCTION(sigaction); INTERCEPT_FUNCTION(signal); +#if defined(__mips__) + INTERCEPT_FUNCTION_VER(pthread_create, "GLIBC_2.2"); +#else INTERCEPT_FUNCTION(pthread_create); +#endif INTERCEPT_FUNCTION(pthread_key_create); INTERCEPT_FUNCTION(pthread_join); INTERCEPT_FUNCTION(tzset); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/msan/msan_report.cc new/compiler-rt-3.8.1.src/lib/msan/msan_report.cc --- old/compiler-rt-3.8.0.src/lib/msan/msan_report.cc 2015-03-31 20:16:42.000000000 +0200 +++ new/compiler-rt-3.8.1.src/lib/msan/msan_report.cc 2016-05-23 09:04:33.000000000 +0200 @@ -221,11 +221,7 @@ } else { unsigned char v = *(unsigned char *)s; if (v) last_quad_poisoned = true; -#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - Printf("%x%x", v & 0xf, v >> 4); -#else Printf("%x%x", v >> 4, v & 0xf); -#endif } // Group end. if (pos % 4 == 3 && with_origins) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/msan/tests/msan_test.cc new/compiler-rt-3.8.1.src/lib/msan/tests/msan_test.cc --- old/compiler-rt-3.8.0.src/lib/msan/tests/msan_test.cc 2015-11-24 21:28:48.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/msan/tests/msan_test.cc 2016-05-23 09:03:45.000000000 +0200 @@ -1117,8 +1117,8 @@ struct hostent he; struct hostent *result; int err; - int res = gethostbyname_r("localhost", &he, buf, sizeof(buf), &result, &err); - ASSERT_EQ(ERANGE, res); + gethostbyname_r("localhost", &he, buf, sizeof(buf), &result, &err); + ASSERT_EQ(ERANGE, errno); EXPECT_NOT_POISONED(err); } @@ -1214,17 +1214,21 @@ } TEST(MemorySanitizer, shmat) { - void *p = mmap(NULL, 4096, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - ASSERT_NE(MAP_FAILED, p); + const int kShmSize = 4096; + void *mapping_start = mmap(NULL, kShmSize + SHMLBA, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + ASSERT_NE(MAP_FAILED, mapping_start); + + void *p = (void *)(((unsigned long)mapping_start + SHMLBA - 1) / SHMLBA * SHMLBA); + // p is now SHMLBA-aligned; ((char *)p)[10] = *GetPoisoned<U1>(); - ((char *)p)[4095] = *GetPoisoned<U1>(); + ((char *)p)[kShmSize - 1] = *GetPoisoned<U1>(); - int res = munmap(p, 4096); + int res = munmap(mapping_start, kShmSize + SHMLBA); ASSERT_EQ(0, res); - int id = shmget(IPC_PRIVATE, 4096, 0644 | IPC_CREAT); + int id = shmget(IPC_PRIVATE, kShmSize, 0644 | IPC_CREAT); ASSERT_GT(id, -1); void *q = shmat(id, p, 0); @@ -1232,7 +1236,7 @@ EXPECT_NOT_POISONED(((char *)q)[0]); EXPECT_NOT_POISONED(((char *)q)[10]); - EXPECT_NOT_POISONED(((char *)q)[4095]); + EXPECT_NOT_POISONED(((char *)q)[kShmSize - 1]); res = shmdt(q); ASSERT_EQ(0, res); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_linux.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_linux.cc --- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_linux.cc 2015-12-15 01:33:45.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_linux.cc 2016-06-01 10:17:03.000000000 +0200 @@ -241,7 +241,15 @@ return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path, (uptr)buf, AT_SYMLINK_NOFOLLOW); #elif SANITIZER_LINUX_USES_64BIT_SYSCALLS +# if SANITIZER_MIPS64 + // For mips64, lstat syscall fills buffer in the format of kernel_stat + struct kernel_stat kbuf; + int res = internal_syscall(SYSCALL(lstat), path, &kbuf); + kernel_stat_to_stat(&kbuf, (struct stat *)buf); + return res; +# else return internal_syscall(SYSCALL(lstat), (uptr)path, (uptr)buf); +# endif #else struct stat64 buf64; int res = internal_syscall(SYSCALL(lstat64), path, &buf64); @@ -252,7 +260,15 @@ uptr internal_fstat(fd_t fd, void *buf) { #if SANITIZER_FREEBSD || SANITIZER_LINUX_USES_64BIT_SYSCALLS +# if SANITIZER_MIPS64 + // For mips64, fstat syscall fills buffer in the format of kernel_stat + struct kernel_stat kbuf; + int res = internal_syscall(SYSCALL(fstat), fd, &kbuf); + kernel_stat_to_stat(&kbuf, (struct stat *)buf); + return res; +# else return internal_syscall(SYSCALL(fstat), fd, (uptr)buf); +# endif #else struct stat64 buf64; int res = internal_syscall(SYSCALL(fstat64), fd, &buf64); @@ -586,7 +602,9 @@ // rt_sigaction, so we need to do the same (we'll need to reimplement the // restorers; for x86_64 the restorer address can be obtained from // oldact->sa_restorer upon a call to sigaction(xxx, NULL, oldact). +#if !SANITIZER_ANDROID || !SANITIZER_MIPS32 k_act.sa_restorer = u_act->sa_restorer; +#endif } uptr result = internal_syscall(SYSCALL(rt_sigaction), (uptr)signum, @@ -600,7 +618,9 @@ internal_memcpy(&u_oldact->sa_mask, &k_oldact.sa_mask, sizeof(__sanitizer_kernel_sigset_t)); u_oldact->sa_flags = k_oldact.sa_flags; +#if !SANITIZER_ANDROID || !SANITIZER_MIPS32 u_oldact->sa_restorer = k_oldact.sa_restorer; +#endif } return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_linux_libcdep.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_linux_libcdep.cc --- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_linux_libcdep.cc 2016-02-18 20:23:11.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_linux_libcdep.cc 2016-06-01 10:17:03.000000000 +0200 @@ -158,7 +158,6 @@ #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO static uptr g_tls_size; -#endif #ifdef __i386__ # define DL_INTERNAL_FUNCTION __attribute__((regparm(3), stdcall)) @@ -166,26 +165,7 @@ # define DL_INTERNAL_FUNCTION #endif -#if defined(__mips__) || defined(__powerpc64__) -// TlsPreTcbSize includes size of struct pthread_descr and size of tcb -// head structure. It lies before the static tls blocks. -static uptr TlsPreTcbSize() { -# if defined(__mips__) - const uptr kTcbHead = 16; // sizeof (tcbhead_t) -# elif defined(__powerpc64__) - const uptr kTcbHead = 88; // sizeof (tcbhead_t) -# endif - const uptr kTlsAlign = 16; - const uptr kTlsPreTcbSize = - (ThreadDescriptorSize() + kTcbHead + kTlsAlign - 1) & ~(kTlsAlign - 1); - InitTlsSize(); - g_tls_size = (g_tls_size + kTlsPreTcbSize + kTlsAlign -1) & ~(kTlsAlign - 1); - return kTlsPreTcbSize; -} -#endif - void InitTlsSize() { -#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO // all current supported platforms have 16 bytes stack alignment const size_t kStackAlign = 16; typedef void (*get_tls_func)(size_t*, size_t*) DL_INTERNAL_FUNCTION; @@ -201,8 +181,10 @@ if (tls_align < kStackAlign) tls_align = kStackAlign; g_tls_size = RoundUpTo(tls_size, tls_align); -#endif // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO } +#else +void InitTlsSize() { } +#endif // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) \ || defined(__aarch64__) || defined(__powerpc64__)) \ @@ -278,6 +260,24 @@ return kThreadSelfOffset; } +#if defined(__mips__) || defined(__powerpc64__) +// TlsPreTcbSize includes size of struct pthread_descr and size of tcb +// head structure. It lies before the static tls blocks. +static uptr TlsPreTcbSize() { +# if defined(__mips__) + const uptr kTcbHead = 16; // sizeof (tcbhead_t) +# elif defined(__powerpc64__) + const uptr kTcbHead = 88; // sizeof (tcbhead_t) +# endif + const uptr kTlsAlign = 16; + const uptr kTlsPreTcbSize = + (ThreadDescriptorSize() + kTcbHead + kTlsAlign - 1) & ~(kTlsAlign - 1); + InitTlsSize(); + g_tls_size = (g_tls_size + kTlsPreTcbSize + kTlsAlign -1) & ~(kTlsAlign - 1); + return kTlsPreTcbSize; +} +#endif + uptr ThreadSelf() { uptr descr_addr; # if defined(__i386__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform.h new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform.h --- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform.h 2015-11-30 20:43:03.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform.h 2016-05-22 16:17:10.000000000 +0200 @@ -81,6 +81,21 @@ # define SANITIZER_X32 0 #endif +#if defined(__mips__) +# define SANITIZER_MIPS 1 +# if defined(__mips64) +# define SANITIZER_MIPS32 0 +# define SANITIZER_MIPS64 1 +# else +# define SANITIZER_MIPS32 1 +# define SANITIZER_MIPS64 0 +# endif +#else +# define SANITIZER_MIPS 0 +# define SANITIZER_MIPS32 0 +# define SANITIZER_MIPS64 0 +#endif + // By default we allow to use SizeClassAllocator64 on 64-bit platform. // But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64 // does not work well and we need to fallback to SizeClassAllocator32. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc --- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2015-11-30 10:19:22.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 2016-06-01 10:17:03.000000000 +0200 @@ -1056,7 +1056,7 @@ // preprocessor macros. CHECK_STRUCT_SIZE_AND_OFFSET(sigaction, sa_mask); CHECK_STRUCT_SIZE_AND_OFFSET(sigaction, sa_flags); -#if SANITIZER_LINUX +#if SANITIZER_LINUX && (!SANITIZER_ANDROID || !SANITIZER_MIPS32) CHECK_STRUCT_SIZE_AND_OFFSET(sigaction, sa_restorer); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform_limits_posix.h new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.h --- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_platform_limits_posix.h 2015-10-26 19:15:14.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.h 2016-06-01 10:17:03.000000000 +0200 @@ -77,11 +77,9 @@ const unsigned struct_kernel_stat_sz = 144; const unsigned struct_kernel_stat64_sz = 104; #elif defined(__mips__) - #if SANITIZER_WORDSIZE == 64 - const unsigned struct_kernel_stat_sz = 216; - #else - const unsigned struct_kernel_stat_sz = 144; - #endif + const unsigned struct_kernel_stat_sz = + SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) : + FIRST_32_SECOND_64(144, 216); const unsigned struct_kernel_stat64_sz = 104; #endif struct __sanitizer_perf_event_attr { @@ -516,7 +514,11 @@ }; #if SANITIZER_ANDROID +# if SANITIZER_MIPS + typedef unsigned long __sanitizer_sigset_t[16/sizeof(unsigned long)]; +# else typedef unsigned long __sanitizer_sigset_t; +# endif #elif SANITIZER_MAC typedef unsigned __sanitizer_sigset_t; #elif SANITIZER_LINUX @@ -542,6 +544,15 @@ __sanitizer_sigset_t sa_mask; void (*sa_restorer)(); }; +#elif SANITIZER_ANDROID && SANITIZER_MIPS32 // check this before WORDSIZE == 32 + struct __sanitizer_sigaction { + unsigned sa_flags; + union { + void (*sigaction)(int sig, void *siginfo, void *uctx); + void (*handler)(int sig); + }; + __sanitizer_sigset_t sa_mask; + }; #elif SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 32) struct __sanitizer_sigaction { union { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stacktrace.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stacktrace.cc --- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stacktrace.cc 2015-12-01 21:58:44.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stacktrace.cc 2016-05-25 07:57:29.000000000 +0200 @@ -40,11 +40,6 @@ top_frame_bp = 0; } -// Check if given pointer points into allocated stack area. -static inline bool IsValidFrame(uptr frame, uptr stack_top, uptr stack_bottom) { - return frame > stack_bottom && frame < stack_top - 2 * sizeof (uhwptr); -} - // In GCC on ARM bp points to saved lr, not fp, so we should check the next // cell in stack to be a saved frame pointer. GetCanonicFrame returns the // pointer to saved frame pointer in any case. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stacktrace.h new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stacktrace.h --- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stacktrace.h 2015-12-04 18:50:03.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stacktrace.h 2016-05-25 07:57:29.000000000 +0200 @@ -110,6 +110,11 @@ void operator=(const BufferedStackTrace &); }; +// Check if given pointer points into allocated stack area. +static inline bool IsValidFrame(uptr frame, uptr stack_top, uptr stack_bottom) { + return frame > stack_bottom && frame < stack_top - 2 * sizeof (uhwptr); +} + } // namespace __sanitizer // Use this macro if you want to print stack trace with the caller diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc --- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2015-12-08 22:54:39.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2016-06-01 10:17:03.000000000 +0200 @@ -38,6 +38,9 @@ # include <asm/ptrace.h> # endif # include <sys/user.h> // for user_regs_struct +# if SANITIZER_ANDROID && SANITIZER_MIPS +# include <asm/reg.h> // for mips SP register in sys/user.h +# endif #endif #include <sys/wait.h> // for signal-related stuff @@ -467,7 +470,11 @@ #elif defined(__mips__) typedef struct user regs_struct; -#define REG_SP regs[EF_REG29] +# if SANITIZER_ANDROID +# define REG_SP regs[EF_R29] +# else +# define REG_SP regs[EF_REG29] +# endif #elif defined(__aarch64__) typedef struct user_pt_regs regs_struct; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_tls_get_addr.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_tls_get_addr.cc --- old/compiler-rt-3.8.0.src/lib/sanitizer_common/sanitizer_tls_get_addr.cc 2015-11-11 16:37:47.000000000 +0100 +++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/sanitizer_tls_get_addr.cc 2016-05-23 10:21:21.000000000 +0200 @@ -78,7 +78,7 @@ DTLS_Deallocate(dtls.dtv, s); } -#if defined(__powerpc64__) +#if defined(__powerpc64__) || defined(__mips__) // This is glibc's TLS_DTV_OFFSET: // "Dynamic thread vector pointers point 0x8000 past the start of each // TLS block." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc new/compiler-rt-3.8.1.src/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc --- old/compiler-rt-3.8.0.src/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc 2014-06-10 15:54:15.000000000 +0200 +++ new/compiler-rt-3.8.1.src/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc 2016-05-22 16:18:22.000000000 +0200 @@ -78,7 +78,8 @@ // Test decoding KVM ioctl numbers. TEST(SanitizerIoctl, KVM_GET_MP_STATE) { ioctl_desc desc; - bool res = ioctl_decode(0x8004ae98U, &desc); + unsigned int desc_value = SANITIZER_MIPS ? 0x4004ae98U : 0x8004ae98U; + bool res = ioctl_decode(desc_value, &desc); EXPECT_TRUE(res); EXPECT_EQ(ioctl_desc::WRITE, desc.type); EXPECT_EQ(4U, desc.size); @@ -86,7 +87,8 @@ TEST(SanitizerIoctl, KVM_GET_LAPIC) { ioctl_desc desc; - bool res = ioctl_decode(0x8400ae8eU, &desc); + unsigned int desc_value = SANITIZER_MIPS ? 0x4400ae8eU : 0x8400ae8eU; + bool res = ioctl_decode(desc_value, &desc); EXPECT_TRUE(res); EXPECT_EQ(ioctl_desc::WRITE, desc.type); EXPECT_EQ(1024U, desc.size); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/test/dfsan/custom.cc new/compiler-rt-3.8.1.src/test/dfsan/custom.cc --- old/compiler-rt-3.8.0.src/test/dfsan/custom.cc 2015-07-31 12:50:29.000000000 +0200 +++ new/compiler-rt-3.8.1.src/test/dfsan/custom.cc 2016-05-23 10:24:51.000000000 +0200 @@ -536,7 +536,7 @@ int ret4 = inet_pton(AF_INET, addr4, &in4); assert(ret4 == 1); ASSERT_READ_LABEL(&in4, sizeof(in4), i_label); - assert(in4.s_addr == 0x0100007f); + assert(in4.s_addr == htonl(0x7f000001)); char addr6[] = "::1"; dfsan_set_label(j_label, addr6 + 3, 1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/test/lsan/TestCases/use_registers.cc new/compiler-rt-3.8.1.src/test/lsan/TestCases/use_registers.cc --- old/compiler-rt-3.8.0.src/test/lsan/TestCases/use_registers.cc 2014-07-21 15:01:06.000000000 +0200 +++ new/compiler-rt-3.8.1.src/test/lsan/TestCases/use_registers.cc 2016-05-22 16:14:59.000000000 +0200 @@ -27,6 +27,11 @@ : : "r" (p) ); +#elif defined(__mips__) + asm ( "move $16, %0" + : + : "r" (p) + ); #else #error "Test is not supported on this architecture." #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/test/msan/Linux/process_vm_readv.cc new/compiler-rt-3.8.1.src/test/msan/Linux/process_vm_readv.cc --- old/compiler-rt-3.8.0.src/test/msan/Linux/process_vm_readv.cc 2015-10-27 01:11:28.000000000 +0100 +++ new/compiler-rt-3.8.1.src/test/msan/Linux/process_vm_readv.cc 2016-05-23 09:02:26.000000000 +0200 @@ -9,26 +9,31 @@ #include <sys/types.h> #include <sys/uio.h> #include <unistd.h> +#include <errno.h> typedef ssize_t (*process_vm_readwritev_fn)(pid_t, const iovec *, unsigned long, const iovec *, unsigned long, unsigned long); -int main(void) { - // This requires glibc 2.15. - process_vm_readwritev_fn libc_process_vm_readv = - (process_vm_readwritev_fn)dlsym(RTLD_NEXT, "process_vm_readv"); - if (!libc_process_vm_readv) { // Exit with success, emulating the expected output. +int exit_dummy() +{ #ifdef POSITIVE - printf("process_vm_readv not found!\n"); + printf("process_vm_readv not found or not implemented!\n"); printf( "WARNING: MemorySanitizer: use-of-uninitialized-value (not really)\n"); return 1; #else return 0; #endif - } +} + +int main(void) { + // This requires glibc 2.15. + process_vm_readwritev_fn libc_process_vm_readv = + (process_vm_readwritev_fn)dlsym(RTLD_NEXT, "process_vm_readv"); + if (!libc_process_vm_readv) + return exit_dummy(); process_vm_readwritev_fn process_vm_readv = (process_vm_readwritev_fn)dlsym(RTLD_DEFAULT, "process_vm_readv"); @@ -44,6 +49,9 @@ __msan_poison(&b, sizeof(b)); ssize_t res = process_vm_readv(getpid(), iov_b, 2, iov_a, 2, 0); + if (errno == ENOSYS) // Function not implemented + return exit_dummy(); + assert(res == 30); __msan_check_mem_is_initialized(b + 10, 10); __msan_check_mem_is_initialized(b + 30, 20); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/test/msan/dlerror.cc new/compiler-rt-3.8.1.src/test/msan/dlerror.cc --- old/compiler-rt-3.8.0.src/test/msan/dlerror.cc 2015-09-16 17:12:25.000000000 +0200 +++ new/compiler-rt-3.8.1.src/test/msan/dlerror.cc 2016-05-23 09:00:54.000000000 +0200 @@ -1,8 +1,9 @@ // RUN: %clangxx_msan -O0 %s -o %t && %run %t // -// AArch64 shows fails with uninitialized bytes in __interceptor_strcmp from +// AArch64, MIPS64 shows fails with uninitialized bytes in __interceptor_strcmp from // dlfcn/dlerror.c:107 (glibc). // XFAIL: aarch64 +// XFAIL: mips64 #include <assert.h> #include <dlfcn.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/test/msan/dtls_test.c new/compiler-rt-3.8.1.src/test/msan/dtls_test.c --- old/compiler-rt-3.8.0.src/test/msan/dtls_test.c 2015-03-02 20:34:27.000000000 +0100 +++ new/compiler-rt-3.8.1.src/test/msan/dtls_test.c 2016-05-23 10:19:53.000000000 +0200 @@ -4,7 +4,7 @@ Regression test for a bug in msan/glibc integration, see https://sourceware.org/bugzilla/show_bug.cgi?id=16291 - and https://code.google.com/p/memory-sanitizer/issues/detail?id=44 + and https://github.com/google/sanitizers/issues/547 */ #ifndef BUILD_SO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/test/msan/msan_print_shadow3.cc new/compiler-rt-3.8.1.src/test/msan/msan_print_shadow3.cc --- old/compiler-rt-3.8.0.src/test/msan/msan_print_shadow3.cc 2015-03-02 20:34:27.000000000 +0100 +++ new/compiler-rt-3.8.1.src/test/msan/msan_print_shadow3.cc 2016-05-23 09:04:33.000000000 +0200 @@ -6,7 +6,7 @@ int main(void) { unsigned long long x = 0; // For 8-byte alignment. - uint32_t x_s = 0x12345678U; + char x_s[4] = {0x87, 0x65, 0x43, 0x21}; __msan_partial_poison(&x, &x_s, sizeof(x_s)); __msan_print_shadow(&x, sizeof(x_s)); return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-3.8.0.src/test/msan/param_tls_limit.cc new/compiler-rt-3.8.1.src/test/msan/param_tls_limit.cc --- old/compiler-rt-3.8.0.src/test/msan/param_tls_limit.cc 2015-09-16 17:12:25.000000000 +0200 +++ new/compiler-rt-3.8.1.src/test/msan/param_tls_limit.cc 2016-05-23 10:19:11.000000000 +0200 @@ -20,6 +20,17 @@ // In case of no overflow, it is still poisoned. #define NO_OVERFLOW(x) assert(__msan_test_shadow(&x, sizeof(x)) == 0) +#if defined(__x86_64__) +// In x86_64, if argument is partially outside tls, it is considered completly +// unpoisoned +#define PARTIAL_OVERFLOW(x) OVERFLOW(x) +#else +// In other archs, bigger arguments are splitted in multiple IR arguments, so +// they are considered poisoned till tls limit. Checking last byte of such arg: +#define PARTIAL_OVERFLOW(x) assert(__msan_test_shadow((char *)(&(x) + 1) - 1, 1) == -1) +#endif + + template<int N> struct S { char x[N]; @@ -34,17 +45,17 @@ } void f801(S<801> s) { - OVERFLOW(s); + PARTIAL_OVERFLOW(s); } void f1000(S<1000> s) { - OVERFLOW(s); + PARTIAL_OVERFLOW(s); } void f_many(int a, double b, S<800> s, int c, double d) { NO_OVERFLOW(a); NO_OVERFLOW(b); - OVERFLOW(s); + PARTIAL_OVERFLOW(s); OVERFLOW(c); OVERFLOW(d); } @@ -54,7 +65,7 @@ void f_many2(int a, S<800 - 8 - 2> s, int c, double d) { NO_OVERFLOW(a); NO_OVERFLOW(s); - OVERFLOW(c); + PARTIAL_OVERFLOW(c); OVERFLOW(d); } ++++++ default-to-i586.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:37.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:37.000000000 +0200 @@ -1,7 +1,7 @@ -Index: cfe-3.8.0.src/lib/Driver/Tools.cpp +Index: cfe-3.8.1.src/lib/Driver/Tools.cpp =================================================================== ---- cfe-3.8.0.src/lib/Driver/Tools.cpp.orig -+++ cfe-3.8.0.src/lib/Driver/Tools.cpp +--- cfe-3.8.1.src/lib/Driver/Tools.cpp.orig ++++ cfe-3.8.1.src/lib/Driver/Tools.cpp @@ -1680,8 +1680,8 @@ static const char *getX86TargetCPU(const case llvm::Triple::Bitrig: return "i686"; ++++++ glibc-2.23-libcxx.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:37.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:37.000000000 +0200 @@ -1,7 +1,7 @@ -Index: libcxx-3.8.0.src/test/std/numerics/c.math/cmath_isinf.pass.cpp +Index: libcxx-3.8.1.src/test/std/numerics/c.math/cmath_isinf.pass.cpp =================================================================== ---- libcxx-3.8.0.src.orig/test/std/numerics/c.math/cmath_isinf.pass.cpp -+++ libcxx-3.8.0.src/test/std/numerics/c.math/cmath_isinf.pass.cpp +--- libcxx-3.8.1.src.orig/test/std/numerics/c.math/cmath_isinf.pass.cpp ++++ libcxx-3.8.1.src/test/std/numerics/c.math/cmath_isinf.pass.cpp @@ -11,8 +11,6 @@ // isinf @@ -18,10 +18,10 @@ -} \ No newline at end of file +} -Index: libcxx-3.8.0.src/test/std/numerics/c.math/cmath_isnan.pass.cpp +Index: libcxx-3.8.1.src/test/std/numerics/c.math/cmath_isnan.pass.cpp =================================================================== ---- libcxx-3.8.0.src.orig/test/std/numerics/c.math/cmath_isnan.pass.cpp -+++ libcxx-3.8.0.src/test/std/numerics/c.math/cmath_isnan.pass.cpp +--- libcxx-3.8.1.src.orig/test/std/numerics/c.math/cmath_isnan.pass.cpp ++++ libcxx-3.8.1.src/test/std/numerics/c.math/cmath_isnan.pass.cpp @@ -11,8 +11,6 @@ // isnan @@ -31,10 +31,10 @@ #include <cmath> #include <type_traits> #include <cassert> -Index: libcxx-3.8.0.src/test/std/depr/depr.c.headers/math_h_isinf.pass.cpp +Index: libcxx-3.8.1.src/test/std/depr/depr.c.headers/math_h_isinf.pass.cpp =================================================================== ---- libcxx-3.8.0.src.orig/test/std/depr/depr.c.headers/math_h_isinf.pass.cpp -+++ libcxx-3.8.0.src/test/std/depr/depr.c.headers/math_h_isinf.pass.cpp +--- libcxx-3.8.1.src.orig/test/std/depr/depr.c.headers/math_h_isinf.pass.cpp ++++ libcxx-3.8.1.src/test/std/depr/depr.c.headers/math_h_isinf.pass.cpp @@ -11,8 +11,6 @@ // isinf @@ -44,10 +44,10 @@ #include <math.h> #include <type_traits> #include <cassert> -Index: libcxx-3.8.0.src/test/std/depr/depr.c.headers/math_h_isnan.pass.cpp +Index: libcxx-3.8.1.src/test/std/depr/depr.c.headers/math_h_isnan.pass.cpp =================================================================== ---- libcxx-3.8.0.src.orig/test/std/depr/depr.c.headers/math_h_isnan.pass.cpp -+++ libcxx-3.8.0.src/test/std/depr/depr.c.headers/math_h_isnan.pass.cpp +--- libcxx-3.8.1.src.orig/test/std/depr/depr.c.headers/math_h_isnan.pass.cpp ++++ libcxx-3.8.1.src/test/std/depr/depr.c.headers/math_h_isnan.pass.cpp @@ -11,8 +11,6 @@ // isnan ++++++ glibc-2.24-libcxx.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:37.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:37.000000000 +0200 @@ -1,7 +1,7 @@ -Index: libcxx-3.8.0.src/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp +Index: libcxx-3.8.1.src/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp =================================================================== ---- libcxx-3.8.0.src/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp.orig -+++ libcxx-3.8.0.src/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp +--- libcxx-3.8.1.src/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp.orig ++++ libcxx-3.8.1.src/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp @@ -113,7 +113,7 @@ int main() { ++++++ libcxx-3.8.0.src.tar.xz -> libcxx-3.8.1.src.tar.xz ++++++ ++++++ libcxxabi-3.8.0.src.tar.xz -> libcxxabi-3.8.1.src.tar.xz ++++++ ++++++ lldb-3.8.0.src.tar.xz -> lldb-3.8.1.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm/lldb-3.8.0.src.tar.xz /work/SRC/openSUSE:Factory/.llvm.new/lldb-3.8.1.src.tar.xz differ: char 25, line 1 ++++++ lldb-add-pthread-dl-libs.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:39.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:39.000000000 +0200 @@ -1,7 +1,7 @@ -Index: lldb-3.8.0.src/cmake/modules/LLDBConfig.cmake +Index: lldb-3.8.1.src/cmake/modules/LLDBConfig.cmake =================================================================== ---- lldb-3.8.0.src.orig/cmake/modules/LLDBConfig.cmake -+++ lldb-3.8.0.src/cmake/modules/LLDBConfig.cmake +--- lldb-3.8.1.src.orig/cmake/modules/LLDBConfig.cmake ++++ lldb-3.8.1.src/cmake/modules/LLDBConfig.cmake @@ -323,13 +323,9 @@ else() endif() ++++++ lldb-cmake.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:39.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:39.000000000 +0200 @@ -1,7 +1,7 @@ -Index: lldb-3.8.0.src/source/lldb.cpp +Index: lldb-3.8.1.src/source/lldb.cpp =================================================================== ---- lldb-3.8.0.src.orig/source/lldb.cpp -+++ lldb-3.8.0.src/source/lldb.cpp +--- lldb-3.8.1.src.orig/source/lldb.cpp ++++ lldb-3.8.1.src/source/lldb.cpp @@ -21,11 +21,7 @@ extern "C" const unsigned char liblldb_c static const char * GetLLDBRevision() @@ -14,10 +14,10 @@ } static const char * -Index: lldb-3.8.0.src/source/Core/IOHandler.cpp +Index: lldb-3.8.1.src/source/Core/IOHandler.cpp =================================================================== ---- lldb-3.8.0.src.orig/source/Core/IOHandler.cpp -+++ lldb-3.8.0.src/source/Core/IOHandler.cpp +--- lldb-3.8.1.src.orig/source/Core/IOHandler.cpp ++++ lldb-3.8.1.src/source/Core/IOHandler.cpp @@ -9,8 +9,8 @@ // C Includes ++++++ llvm-3.8.0.src.tar.xz -> llvm-3.8.1.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm/llvm-3.8.0.src.tar.xz /work/SRC/openSUSE:Factory/.llvm.new/llvm-3.8.1.src.tar.xz differ: char 25, line 1 ++++++ llvm-docs-3.8.0.src.tar.xz -> llvm-docs-3.8.1.src.tar.xz ++++++ ++++ 24762 lines of diff (skipped) ++++++ llvm-fix-find-gcc5-install.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:40.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:40.000000000 +0200 @@ -1,7 +1,7 @@ -Index: cfe-3.8.0.src/lib/Driver/ToolChains.cpp +Index: cfe-3.8.1.src/lib/Driver/ToolChains.cpp =================================================================== ---- cfe-3.8.0.src/lib/Driver/ToolChains.cpp -+++ cfe-3.8.0.src/lib/Driver/ToolChains.cpp +--- cfe-3.8.1.src/lib/Driver/ToolChains.cpp ++++ cfe-3.8.1.src/lib/Driver/ToolChains.cpp @@ -1091,7 +1091,8 @@ Generic_GCC::GCCVersion Linux::GCCVersio if (First.first.getAsInteger(10, GoodVersion.Major) || GoodVersion.Major < 0) return BadVersion; ++++++ llvm-nonvoid-return.patch ++++++ Index: llvm-3.8.1.src/openmp-3.8.1.src/runtime/src/kmp_dispatch.cpp =================================================================== --- llvm-3.8.1.src.orig/openmp-3.8.1.src/runtime/src/kmp_dispatch.cpp +++ llvm-3.8.1.src/openmp-3.8.1.src/runtime/src/kmp_dispatch.cpp @@ -254,7 +254,7 @@ test_then_inc< kmp_int64 >( volatile kmp // compare_and_swap template (general template should NOT be used) template< typename T > static __forceinline kmp_int32 -compare_and_swap( volatile T *p, T c, T s ) { KMP_ASSERT(0); }; +compare_and_swap( volatile T *p, T c, T s ); template<> __forceinline kmp_int32 ++++++ llvm-remove-clang-only-flags.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:40.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:40.000000000 +0200 @@ -1,7 +1,7 @@ -Index: llvm-3.8.0.src/cmake/modules/HandleLLVMOptions.cmake +Index: llvm-3.8.1.src/cmake/modules/HandleLLVMOptions.cmake =================================================================== ---- llvm-3.8.0.src.orig/cmake/modules/HandleLLVMOptions.cmake -+++ llvm-3.8.0.src/cmake/modules/HandleLLVMOptions.cmake +--- llvm-3.8.1.src.orig/cmake/modules/HandleLLVMOptions.cmake ++++ llvm-3.8.1.src/cmake/modules/HandleLLVMOptions.cmake @@ -417,7 +417,6 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE append_if(LLVM_ENABLE_PEDANTIC "-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) ++++++ llvm-rpmlintrc ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:40.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:40.000000000 +0200 @@ -7,4 +7,3 @@ addFilter("devel-file-in-non-devel-package .*/lib.*/*.a") addFilter("devel-file-in-non-devel-package .*/lib.*/*.so") -addFilter("llvm-clang.*shlib-policy-name-error") ++++++ openmp-3.8.0.src.tar.xz -> openmp-3.8.1.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/CMakeLists.txt new/openmp-3.8.1.src/runtime/CMakeLists.txt --- old/openmp-3.8.0.src/runtime/CMakeLists.txt 2015-12-18 17:19:35.000000000 +0100 +++ new/openmp-3.8.1.src/runtime/CMakeLists.txt 2016-06-02 22:32:40.000000000 +0200 @@ -192,8 +192,9 @@ set(MINSIZEREL_BUILD TRUE) endif() -# Include itt notify interface? Right now, always. -set(LIBOMP_USE_ITT_NOTIFY TRUE) +# Include itt notify interface? +set(LIBOMP_USE_ITT_NOTIFY TRUE CACHE BOOL + "Enable ITT notify?") # normal, profile, stubs library. set(NORMAL_LIBRARY FALSE) @@ -326,6 +327,7 @@ libomp_say("Build -- ${LIBOMP_BUILD}") libomp_say("Use Stats-gathering -- ${LIBOMP_STATS}") libomp_say("Use Debugger-support -- ${LIBOMP_USE_DEBUGGER}") + libomp_say("Use ITT notify -- ${LIBOMP_USE_ITT_NOTIFY}") libomp_say("Use OMPT-support -- ${LIBOMP_OMPT_SUPPORT}") if(${LIBOMP_OMPT_SUPPORT}) libomp_say("Use OMPT-blame -- ${LIBOMP_OMPT_BLAME}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/src/CMakeLists.txt new/openmp-3.8.1.src/runtime/src/CMakeLists.txt --- old/openmp-3.8.0.src/runtime/src/CMakeLists.txt 2015-11-30 21:02:59.000000000 +0100 +++ new/openmp-3.8.1.src/runtime/src/CMakeLists.txt 2016-06-02 22:19:12.000000000 +0200 @@ -144,7 +144,11 @@ ) # Get the library's location within the build tree for the unit tester -get_target_property(LIBOMP_LIBRARY_DIR omp LIBRARY_OUTPUT_DIRECTORY) +if(NOT WIN32) + get_target_property(LIBOMP_LIBRARY_DIR omp LIBRARY_OUTPUT_DIRECTORY) +else() + get_target_property(LIBOMP_LIBRARY_DIR omp RUNTIME_OUTPUT_DIRECTORY) +endif() if(NOT LIBOMP_LIBRARY_DIR) set(LIBOMP_LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(LIBOMP_LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) @@ -181,10 +185,11 @@ add_dependencies(omp libomp-needed-windows-files) # z_Windows_NT-586_asm.asm requires definitions to be sent via command line # It only needs the architecutre macro and OMPT_SUPPORT=0|1 - libomp_append(LIBOMP_MASM_DEFINITIONS "_M_IA32" IF_TRUE IA32) - libomp_append(LIBOMP_MASM_DEFINITIONS "_M_AMD64" IF_TRUE INTEL64) - libomp_append(LIBOMP_MASM_DEFINITIONS "OMPT_SUPPORT" IF_TRUE_1_0 LIBOMP_OMPT_SUPPORT) - set_source_files_properties(z_Windows_NT-586_asm.asm PROPERTIES COMPILE_DEFINITIONS "${LIBOMP_MASM_DEFINITIONS}") + libomp_append(LIBOMP_MASM_DEFINITIONS "-D_M_IA32" IF_TRUE IA32) + libomp_append(LIBOMP_MASM_DEFINITIONS "-D_M_AMD64" IF_TRUE INTEL64) + libomp_append(LIBOMP_MASM_DEFINITIONS "-DOMPT_SUPPORT" IF_TRUE_1_0 LIBOMP_OMPT_SUPPORT) + libomp_list_to_string("${LIBOMP_MASM_DEFINITIONS}" LIBOMP_MASM_DEFINITIONS) + set_property(SOURCE z_Windows_NT-586_asm.asm APPEND_STRING PROPERTY COMPILE_FLAGS " ${LIBOMP_MASM_DEFINITIONS}") set_source_files_properties(thirdparty/ittnotify/ittnotify_static.c PROPERTIES COMPILE_DEFINITIONS "UNICODE") # Create Windows import library diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/src/kmp_atomic.h new/openmp-3.8.1.src/runtime/src/kmp_atomic.h --- old/openmp-3.8.0.src/runtime/src/kmp_atomic.h 2015-09-21 20:11:22.000000000 +0200 +++ new/openmp-3.8.1.src/runtime/src/kmp_atomic.h 2016-04-27 22:42:43.000000000 +0200 @@ -35,6 +35,13 @@ #if defined( __cplusplus ) && ( KMP_OS_WINDOWS ) // create shortcuts for c99 complex types + // Visual Studio cannot have function parameters that have the + // align __declspec attribute, so we must remove it. (Compiler Error C2719) + #if KMP_COMPILER_MSVC + # undef KMP_DO_ALIGN + # define KMP_DO_ALIGN(alignment) /* Nothing */ + #endif + #if (_MSC_VER < 1600) && defined(_DEBUG) // Workaround for the problem of _DebugHeapTag unresolved external. // This problem prevented to use our static debug library for C tests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/src/kmp_config.h.cmake new/openmp-3.8.1.src/runtime/src/kmp_config.h.cmake --- old/openmp-3.8.0.src/runtime/src/kmp_config.h.cmake 2016-01-05 00:20:26.000000000 +0100 +++ new/openmp-3.8.1.src/runtime/src/kmp_config.h.cmake 2016-06-02 22:32:40.000000000 +0200 @@ -85,7 +85,7 @@ #define KMP_ADJUST_BLOCKTIME 1 #define BUILD_PARALLEL_ORDERED 1 #define KMP_ASM_INTRINS 1 -#define USE_ITT_BUILD 1 +#define USE_ITT_BUILD LIBOMP_USE_ITT_NOTIFY #define INTEL_ITTNOTIFY_PREFIX __kmp_itt_ #if ! KMP_MIC # define USE_LOAD_BALANCE 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/src/kmp_csupport.c new/openmp-3.8.1.src/runtime/src/kmp_csupport.c --- old/openmp-3.8.0.src/runtime/src/kmp_csupport.c 2015-12-23 03:34:03.000000000 +0100 +++ new/openmp-3.8.1.src/runtime/src/kmp_csupport.c 2016-06-02 22:32:40.000000000 +0200 @@ -511,7 +511,7 @@ // we need to wait for the proxy tasks before finishing the thread if ( task_team != NULL && task_team->tt.tt_found_proxy_tasks ) - __kmp_task_team_wait(this_thr, serial_team, NULL ); // is an ITT object needed here? + __kmp_task_team_wait(this_thr, serial_team USE_ITT_BUILD_ARG(NULL) ); // is an ITT object needed here? #endif KMP_MB(); @@ -654,8 +654,10 @@ if ( ! __kmp_cpuinfo.sse2 ) { // CPU cannot execute SSE2 instructions. } else { - #if KMP_COMPILER_ICC || KMP_COMPILER_MSVC + #if KMP_COMPILER_ICC _mm_mfence(); + #elif KMP_COMPILER_MSVC + MemoryBarrier(); #else __sync_synchronize(); #endif // KMP_COMPILER_ICC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/src/kmp_runtime.c new/openmp-3.8.1.src/runtime/src/kmp_runtime.c --- old/openmp-3.8.0.src/runtime/src/kmp_runtime.c 2016-01-11 21:37:39.000000000 +0100 +++ new/openmp-3.8.1.src/runtime/src/kmp_runtime.c 2016-06-02 22:32:40.000000000 +0200 @@ -3804,7 +3804,9 @@ /* prepare the master thread for get_gtid() */ __kmp_gtid_set_specific( gtid ); +#if USE_ITT_BUILD __kmp_itt_thread_name( gtid ); +#endif /* USE_ITT_BUILD */ #ifdef KMP_TDATA_GTID __kmp_gtid = gtid; @@ -3972,7 +3974,7 @@ // the runtime is shutting down so we won't report any events thread->th.ompt_thread_info.state = ompt_state_undefined; #endif - __kmp_task_team_wait(thread, team, NULL ); + __kmp_task_team_wait(thread, team USE_ITT_BUILD_ARG(NULL)); } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/src/z_Linux_asm.s new/openmp-3.8.1.src/runtime/src/z_Linux_asm.s --- old/openmp-3.8.0.src/runtime/src/z_Linux_asm.s 2015-08-28 20:42:10.000000000 +0200 +++ new/openmp-3.8.1.src/runtime/src/z_Linux_asm.s 2016-06-02 22:33:53.000000000 +0200 @@ -1414,6 +1414,227 @@ // ----------------------------------------------------------------------- #endif /* KMP_ARCH_X86_64 */ +#if KMP_ARCH_PPC64 + +//------------------------------------------------------------------------ +// +// typedef void (*microtask_t)( int *gtid, int *tid, ... ); +// +// int +// __kmp_invoke_microtask( void (*pkfn) (int gtid, int tid, ...), +// int gtid, int tid, +// int argc, void *p_argv[] ) { +// (*pkfn)( & gtid, & tid, argv[0], ... ); +// return 1; +// } +// +// parameters: +// r3: pkfn +// r4: gtid +// r5: tid +// r6: argc +// r7: p_argv +// r8: &exit_frame +// +// return: r3 (always 1/TRUE) +// + .text +# if KMP_ARCH_PPC64_LE + .abiversion 2 +# endif + .globl __kmp_invoke_microtask + +# if KMP_ARCH_PPC64_LE + .p2align 4 +# else + .p2align 2 +# endif + + .type __kmp_invoke_microtask,@function + +# if KMP_ARCH_PPC64_LE +__kmp_invoke_microtask: +.Lfunc_begin0: +.Lfunc_gep0: + addis 2, 12, .TOC.-.Lfunc_gep0@ha + addi 2, 2, .TOC.-.Lfunc_gep0@l +.Lfunc_lep0: + .localentry __kmp_invoke_microtask, .Lfunc_lep0-.Lfunc_gep0 +# else + .section .opd,"aw",@progbits +__kmp_invoke_microtask: + .p2align 3 + .quad .Lfunc_begin0 + .quad .TOC.@tocbase + .quad 0 + .text +.Lfunc_begin0: +# endif + +// -- Begin __kmp_invoke_microtask +// mark_begin; + +// We need to allocate a stack frame large enough to hold all of the parameters +// on the stack for the microtask plus what this function needs. That's 48 +// bytes under the ELFv1 ABI (32 bytes under ELFv2), plus 8*(2 + argc) for the +// parameters to the microtask, plus 8 bytes to store the values of r4 and r5, +// and 8 bytes to store r31. With OMP-T support, we need an additional 8 bytes +// to save r30 to hold a copy of r8. + + .cfi_startproc + mflr 0 + std 31, -8(1) + std 0, 16(1) + +// This is unusual because normally we'd set r31 equal to r1 after the stack +// frame is established. In this case, however, we need to dynamically compute +// the stack frame size, and so we keep a direct copy of r1 to access our +// register save areas and restore the r1 value before returning. + mr 31, 1 + .cfi_def_cfa_register r31 + .cfi_offset r31, -8 + .cfi_offset lr, 16 + +// Compute the size necessary for the local stack frame. +# if KMP_ARCH_PPC64_LE + li 12, 72 +# else + li 12, 88 +# endif + sldi 0, 6, 3 + add 12, 0, 12 + neg 12, 12 + +// We need to make sure that the stack frame stays aligned (to 16 bytes, except +// under the BG/Q CNK, where it must be to 32 bytes). +# if KMP_OS_CNK + li 0, -32 +# else + li 0, -16 +# endif + and 12, 0, 12 + +// Establish the local stack frame. + stdux 1, 1, 12 + +# if OMPT_SUPPORT + .cfi_offset r30, -16 + std 30, -16(31) + std 1, 0(8) + mr 30, 8 +# endif + +// Store gtid and tid to the stack because they're passed by reference to the microtask. + stw 4, -20(31) + stw 5, -24(31) + + mr 12, 6 + mr 4, 7 + + cmpwi 0, 12, 1 + blt 0, .Lcall + + ld 5, 0(4) + + cmpwi 0, 12, 2 + blt 0, .Lcall + + ld 6, 8(4) + + cmpwi 0, 12, 3 + blt 0, .Lcall + + ld 7, 16(4) + + cmpwi 0, 12, 4 + blt 0, .Lcall + + ld 8, 24(4) + + cmpwi 0, 12, 5 + blt 0, .Lcall + + ld 9, 32(4) + + cmpwi 0, 12, 6 + blt 0, .Lcall + + ld 10, 40(4) + + cmpwi 0, 12, 7 + blt 0, .Lcall + +// There are more than 6 microtask parameters, so we need to store the +// remainder to the stack. + addi 12, 12, -6 + mtctr 12 + +// These are set to 8 bytes before the first desired store address (we're using +// pre-increment loads and stores in the loop below). The parameter save area +// for the microtask begins 48 + 8*8 == 112 bytes above r1 for ELFv1 and +// 32 + 8*8 == 96 bytes above r1 for ELFv2. + addi 4, 4, 40 +# if KMP_ARCH_PPC64_LE + addi 12, 1, 88 +# else + addi 12, 1, 104 +# endif + +.Lnext: + ldu 0, 8(4) + stdu 0, 8(12) + bdnz .Lnext + +.Lcall: +# if KMP_ARCH_PPC64_LE + std 2, 24(1) + mr 12, 3 +#else + std 2, 40(1) +// For ELFv1, we need to load the actual function address from the function descriptor. + ld 12, 0(3) + ld 2, 8(3) + ld 11, 16(3) +#endif + + addi 3, 31, -20 + addi 4, 31, -24 + + mtctr 12 + bctrl +# if KMP_ARCH_PPC64_LE + ld 2, 24(1) +# else + ld 2, 40(1) +# endif + +# if OMPT_SUPPORT + li 3, 0 + std 3, 0(30) +# endif + + li 3, 1 + +# if OMPT_SUPPORT + ld 30, -16(31) +# endif + + mr 1, 31 + ld 0, 16(1) + ld 31, -8(1) + mtlr 0 + blr + + .long 0 + .quad 0 +.Lfunc_end0: + .size __kmp_invoke_microtask, .Lfunc_end0-.Lfunc_begin0 + .cfi_endproc + +// -- End __kmp_invoke_microtask + +#endif /* KMP_ARCH_PPC64 */ + #if KMP_ARCH_ARM .data .comm .gomp_critical_user_,32,8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/src/z_Linux_util.c new/openmp-3.8.1.src/runtime/src/z_Linux_util.c --- old/openmp-3.8.0.src/runtime/src/z_Linux_util.c 2015-12-19 00:20:36.000000000 +0100 +++ new/openmp-3.8.1.src/runtime/src/z_Linux_util.c 2016-06-02 22:28:43.000000000 +0200 @@ -2615,7 +2615,7 @@ #endif // USE_LOAD_BALANCE -#if !(KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_MIC) +#if !(KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_MIC || KMP_ARCH_PPC64) // we really only need the case with 1 argument, because CLANG always build // a struct of pointers to shared variables referenced in the outlined function diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/test/CMakeLists.txt new/openmp-3.8.1.src/runtime/test/CMakeLists.txt --- old/openmp-3.8.0.src/runtime/test/CMakeLists.txt 2015-11-30 21:02:59.000000000 +0100 +++ new/openmp-3.8.1.src/runtime/test/CMakeLists.txt 2016-06-02 22:19:12.000000000 +0200 @@ -1,6 +1,7 @@ # CMakeLists.txt file for unit testing OpenMP Library include(FindPythonInterp) include(CheckTypeSize) +include(CheckLibraryExists) if(NOT PYTHONINTERP_FOUND) libomp_warning_say("Could not find Python.") @@ -8,6 +9,9 @@ return() endif() +# Some tests use math functions +check_library_exists(m sqrt "" LIBOMP_HAVE_LIBM) + macro(pythonize_bool var) if (${var}) set(${var} True) @@ -17,6 +21,7 @@ endmacro() pythonize_bool(LIBOMP_USE_HWLOC) +pythonize_bool(LIBOMP_HAVE_LIBM) set(LIBOMP_TEST_CFLAGS "" CACHE STRING "Extra compiler flags to send to the test compiler") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/test/lit.cfg new/openmp-3.8.1.src/runtime/test/lit.cfg --- old/openmp-3.8.0.src/runtime/test/lit.cfg 2016-01-19 20:30:01.000000000 +0100 +++ new/openmp-3.8.1.src/runtime/test/lit.cfg 2016-06-02 22:19:12.000000000 +0200 @@ -47,6 +47,11 @@ " -L " + config.library_dir + \ " " + config.test_extra_cflags +# extra libraries +libs = "" +if config.has_libm: + libs += " -lm" + # Setup environment to find dynamic library at runtime append_dynamic_library_path(config.library_dir) if config.using_hwloc: @@ -70,7 +75,10 @@ # substitutions config.substitutions.append(("%libomp-compile-and-run", \ - "%clang %cflags %s -o %t -lm && %t")) + "%libomp-compile && %libomp-run")) +config.substitutions.append(("%libomp-compile", \ + "%clang %cflags %s -o %t" + libs)) +config.substitutions.append(("%libomp-run", "%t")) config.substitutions.append(("%clang", config.test_compiler)) config.substitutions.append(("%openmp_flag", config.test_openmp_flag)) config.substitutions.append(("%cflags", config.test_cflags)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/test/lit.site.cfg.in new/openmp-3.8.1.src/runtime/test/lit.site.cfg.in --- old/openmp-3.8.0.src/runtime/test/lit.site.cfg.in 2015-11-30 21:02:59.000000000 +0100 +++ new/openmp-3.8.1.src/runtime/test/lit.site.cfg.in 2016-06-02 22:19:12.000000000 +0200 @@ -9,6 +9,7 @@ config.operating_system = "@CMAKE_SYSTEM_NAME@" config.hwloc_library_dir = "@LIBOMP_HWLOC_LIBRARY_DIR@" config.using_hwloc = @LIBOMP_USE_HWLOC@ +config.has_libm = @LIBOMP_HAVE_LIBM@ # Let the main config do the real work. lit_config.load_config(config, "@LIBOMP_BASE_DIR@/test/lit.cfg") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-3.8.0.src/runtime/test/omp_testsuite.h new/openmp-3.8.1.src/runtime/test/omp_testsuite.h --- old/openmp-3.8.0.src/runtime/test/omp_testsuite.h 2015-11-02 14:43:32.000000000 +0100 +++ new/openmp-3.8.1.src/runtime/test/omp_testsuite.h 2016-06-02 22:19:12.000000000 +0200 @@ -4,6 +4,7 @@ #define OMP_TESTSUITE_H #include <stdio.h> +#include <stdlib.h> #include <omp.h> /* General */ @@ -19,4 +20,60 @@ #define NUM_TASKS 25 #define MAX_TASKS_PER_THREAD 5 +#ifdef _WIN32 +// Windows versions of pthread_create() and pthread_join() +# include <windows.h> +typedef HANDLE pthread_t; + +// encapsulates the information about a pthread-callable function +struct thread_func_info_t { + void* (*start_routine)(void*); + void* arg; +}; + +// call the void* start_routine(void*); +static DWORD __thread_func_wrapper(LPVOID lpParameter) { + struct thread_func_info_t* function_information; + function_information = (struct thread_func_info_t*)lpParameter; + function_information->start_routine(function_information->arg); + free(function_information); + return 0; +} + +// attr is ignored +static int pthread_create(pthread_t *thread, void *attr, + void *(*start_routine) (void *), void *arg) { + pthread_t pthread; + struct thread_func_info_t* info; + info = (struct thread_func_info_t*)malloc(sizeof(struct thread_func_info_t)); + info->start_routine = start_routine; + info->arg = arg; + pthread = CreateThread(NULL, 0, __thread_func_wrapper, info, 0, NULL); + if (pthread == NULL) { + fprintf(stderr, "CreateThread() failed: Error #%u.\n", GetLastError()); + exit(1); + } + *thread = pthread; + return 0; +} +// retval is ignored for now +static int pthread_join(pthread_t thread, void **retval) { + int rc; + rc = WaitForSingleObject(thread, INFINITE); + if (rc == WAIT_FAILED) { + fprintf(stderr, "WaitForSingleObject() failed: Error #%u.\n", + GetLastError()); + exit(1); + } + rc = CloseHandle(thread); + if (rc == 0) { + fprintf(stderr, "CloseHandle() failed: Error #%u.\n", GetLastError()); + exit(1); + } + return 0; +} +#else +# include <pthread.h> +#endif + #endif ++++++ revert-cmake-soname.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:41.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:41.000000000 +0200 @@ -1,7 +1,7 @@ -Index: llvm-3.8.0.src/cmake/modules/AddLLVM.cmake +Index: llvm-3.8.1.src/cmake/modules/AddLLVM.cmake =================================================================== ---- llvm-3.8.0.src.orig/cmake/modules/AddLLVM.cmake -+++ llvm-3.8.0.src/cmake/modules/AddLLVM.cmake +--- llvm-3.8.1.src.orig/cmake/modules/AddLLVM.cmake ++++ llvm-3.8.1.src/cmake/modules/AddLLVM.cmake @@ -326,12 +326,10 @@ endfunction(set_windows_version_resource # Same semantics as target_link_libraries(). # ADDITIONAL_HEADERS @@ -95,10 +95,10 @@ function(llvm_install_symlink name dest) cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN}) foreach(path ${CMAKE_MODULE_PATH}) -Index: llvm-3.8.0.src/tools/llvm-shlib/CMakeLists.txt +Index: llvm-3.8.1.src/tools/llvm-shlib/CMakeLists.txt =================================================================== ---- llvm-3.8.0.src.orig/tools/llvm-shlib/CMakeLists.txt -+++ llvm-3.8.0.src/tools/llvm-shlib/CMakeLists.txt +--- llvm-3.8.1.src.orig/tools/llvm-shlib/CMakeLists.txt ++++ llvm-3.8.1.src/tools/llvm-shlib/CMakeLists.txt @@ -38,7 +38,7 @@ if(LLVM_DYLIB_EXPORTED_SYMBOL_FILE) add_custom_target(libLLVMExports DEPENDS ${LLVM_EXPORTED_SYMBOL_FILE}) endif() ++++++ set-revision.patch ++++++ --- /var/tmp/diff_new_pack.19DKHl/_old 2016-09-16 10:59:41.000000000 +0200 +++ /var/tmp/diff_new_pack.19DKHl/_new 2016-09-16 10:59:41.000000000 +0200 @@ -1,7 +1,7 @@ -Index: cfe-3.8.0.src/lib/Basic/Version.cpp +Index: cfe-3.8.1.src/lib/Basic/Version.cpp =================================================================== ---- cfe-3.8.0.src/lib/Basic/Version.cpp.orig -+++ cfe-3.8.0.src/lib/Basic/Version.cpp +--- cfe-3.8.1.src/lib/Basic/Version.cpp.orig ++++ cfe-3.8.1.src/lib/Basic/Version.cpp @@ -72,19 +72,11 @@ std::string getLLVMRepositoryPath() { }