Hello community,

here is the log from the commit of package llvm5 for openSUSE:Factory checked 
in at 2018-01-07 17:22:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/llvm5 (Old)
 and      /work/SRC/openSUSE:Factory/.llvm5.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "llvm5"

Sun Jan  7 17:22:06 2018 rev:3 rq:561808 version:5.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/llvm5/llvm5.changes      2017-12-31 
00:43:58.202472010 +0100
+++ /work/SRC/openSUSE:Factory/.llvm5.new/llvm5.changes 2018-01-07 
17:22:17.626686459 +0100
@@ -1,0 +2,15 @@
+Fri Jan  5 08:55:59 UTC 2018 - [email protected]
+
+- Delete intermediate files during build to reduce total disk usage
+  (bnc#1074625)
+
+-------------------------------------------------------------------
+Thu Jan  4 10:28:07 UTC 2018 - [email protected]
+
+- Update to llvm 5.0.1
+  * This release contains bug-fixes for the LLVM 5.0.0 release.
+  * This release is API and ABI compatible with 5.0.0.
+- llvm-do-not-install-static-libraries.patch
+  * Updated.
+
+-------------------------------------------------------------------

Old:
----
  cfe-5.0.0.src.tar.xz
  cfe-docs-5.0.0.src.tar.xz
  clang-tools-extra-5.0.0.src.tar.xz
  compiler-rt-5.0.0.src.tar.xz
  libcxx-5.0.0.src.tar.xz
  libcxxabi-5.0.0.src.tar.xz
  lld-5.0.0.src.tar.xz
  lldb-5.0.0.src.tar.xz
  llvm-5.0.0.src.tar.xz
  llvm-docs-5.0.0.src.tar.xz
  openmp-5.0.0.src.tar.xz

New:
----
  cfe-5.0.1.src.tar.xz
  cfe-docs-5.0.1.src.tar.xz
  clang-tools-extra-5.0.1.src.tar.xz
  compiler-rt-5.0.1.src.tar.xz
  libcxx-5.0.1.src.tar.xz
  libcxxabi-5.0.1.src.tar.xz
  lld-5.0.1.src.tar.xz
  lldb-5.0.1.src.tar.xz
  llvm-5.0.1.src.tar.xz
  llvm-docs-5.0.1.src.tar.xz
  openmp-5.0.1.src.tar.xz

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

Other differences:
------------------
++++++ llvm5.spec ++++++
--- /var/tmp/diff_new_pack.OermVO/_old  2018-01-07 17:22:20.354558596 +0100
+++ /var/tmp/diff_new_pack.OermVO/_new  2018-01-07 17:22:20.358558409 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package llvm5
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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
@@ -16,7 +16,7 @@
 #
 
 
-%define _relver 5.0.0
+%define _relver 5.0.1
 %define _minor  5.0
 %define _sonum  5
 # Integer version used by update-alternatives
@@ -55,7 +55,7 @@
 %bcond_without pyclang
 
 Name:           llvm5
-Version:        5.0.0
+Version:        5.0.1
 Release:        0
 Summary:        Low Level Virtual Machine
 License:        NCSA
@@ -651,6 +651,16 @@
 ninja -v -j $ninjaproc clang
 cd ..
 
+# Remove files that won't be needed anymore.
+# This reduces the total amount of disk space used during build. (bnc#1074625)
+find ./stage1 -name '*.o' -delete
+find ./stage1 -name '*.a' \
+  -and -not -name 'libclang*.a' \
+  -and -not -name 'libFuzzer.a' \
+  -and -not -name 'libc++.a' \
+  -and -not -name 'libc++experimental.a' \
+  -delete
+
 %define __builddir build
 export PATH=${PWD}/stage1/bin:$PATH
 export CC=${PWD}/stage1/bin/clang
@@ -710,14 +720,14 @@
 
 # Docs are prebuilt due to sphinx dependency
 #
-# pushd llvm-5.0.0.src/docs
+# pushd llvm-5.0.1.src/docs
 # make -f Makefile.sphinx man html
 # popd
-# pushd cfe-5.0.0.src/docs
+# pushd cfe-5.0.1.src/docs
 # make -f Makefile.sphinx man html
 # popd
-# tar cvJf llvm-docs-5.0.0.src.tar.xz llvm-5.0.0.src/docs/_build/{man,html}
-# tar cvJf cfe-docs-5.0.0.src.tar.xz cfe-5.0.0.src/docs/_build/{man,html}
+# tar cvJf llvm-docs-5.0.1.src.tar.xz llvm-5.0.1.src/docs/_build/{man,html}
+# tar cvJf cfe-docs-5.0.1.src.tar.xz cfe-5.0.1.src/docs/_build/{man,html}
 
 # Build man/html pages
 pushd docs
@@ -904,7 +914,7 @@
 # UTF-8.
 export LANG=C.UTF-8
 
-cd build
+pushd build
 %ifnarch armv6hl armv7hl armv7l
 %if !0%{?qemu_user_space_build:1}
 # we just do not have enough memory with qemu emulation
@@ -920,6 +930,13 @@
 
 %endif
 %endif
+popd
+
+# Remove files that won't be needed anymore.
+# This reduces the total amount of disk space used during build. (bnc#1074625)
+# This is meant to happen after build, install and check, but before
+# extracting debuginfos or creating the final RPMs.
+rm -rf ./stage1 ./build
 
 %post -n libLLVM%{_sonum} -p /sbin/ldconfig
 %postun -n libLLVM%{_sonum} -p /sbin/ldconfig

++++++ cfe-5.0.0.src.tar.xz -> cfe-5.0.1.src.tar.xz ++++++
/work/SRC/openSUSE:Factory/llvm5/cfe-5.0.0.src.tar.xz 
/work/SRC/openSUSE:Factory/.llvm5.new/cfe-5.0.1.src.tar.xz differ: char 25, 
line 1

++++++ cfe-docs-5.0.0.src.tar.xz -> cfe-docs-5.0.1.src.tar.xz ++++++
++++ 39950 lines of diff (skipped)

++++++ clang-tools-extra-5.0.0.src.tar.xz -> clang-tools-extra-5.0.1.src.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/clang-tools-extra-5.0.0.src/clangd/tool/CMakeLists.txt 
new/clang-tools-extra-5.0.1.src/clangd/tool/CMakeLists.txt
--- old/clang-tools-extra-5.0.0.src/clangd/tool/CMakeLists.txt  2017-07-11 
02:18:07.000000000 +0200
+++ new/clang-tools-extra-5.0.1.src/clangd/tool/CMakeLists.txt  2017-12-05 
23:28:17.000000000 +0100
@@ -6,6 +6,10 @@
 
 install(TARGETS clangd RUNTIME DESTINATION bin)
 
+set(LLVM_LINK_COMPONENTS
+  support
+  )
+
 target_link_libraries(clangd
   clangBasic
   clangDaemon
@@ -14,5 +18,4 @@
   clangSema
   clangTooling
   clangToolingCore
-  LLVMSupport
   )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clang-tools-extra-5.0.0.src/test/Unit/lit.cfg 
new/clang-tools-extra-5.0.1.src/test/Unit/lit.cfg
--- old/clang-tools-extra-5.0.0.src/test/Unit/lit.cfg   2014-08-13 
14:54:50.000000000 +0200
+++ new/clang-tools-extra-5.0.1.src/test/Unit/lit.cfg   2017-10-09 
20:00:04.000000000 +0200
@@ -41,14 +41,17 @@
     shlibpath_var = 'PATH'
 
 # Point the dynamic loader at dynamic libraries in 'lib'.
+shlibdir = getattr(config, 'shlibdir', None)
+if not shlibdir:
+    lit_config.fatal('No shlibdir set!')
 llvm_libs_dir = getattr(config, 'llvm_libs_dir', None)
 if not llvm_libs_dir:
     lit_config.fatal('No LLVM libs dir set!')
-shlibpath = os.path.pathsep.join((llvm_libs_dir,
+shlibpath = os.path.pathsep.join((shlibdir, llvm_libs_dir,
                                  config.environment.get(shlibpath_var,'')))
 
 # Win32 seeks DLLs along %PATH%.
-if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir):
-    shlibpath = os.path.pathsep.join((config.shlibdir, shlibpath))
+if sys.platform in ['win32', 'cygwin'] and os.path.isdir(shlibdir):
+    shlibpath = os.path.pathsep.join((shlibdir, shlibpath))
 
 config.environment[shlibpath_var] = shlibpath
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clang-tools-extra-5.0.0.src/test/lit.cfg 
new/clang-tools-extra-5.0.1.src/test/lit.cfg
--- old/clang-tools-extra-5.0.0.src/test/lit.cfg        2016-05-31 
14:12:19.000000000 +0200
+++ new/clang-tools-extra-5.0.1.src/test/lit.cfg        2017-10-09 
20:00:04.000000000 +0200
@@ -99,10 +99,13 @@
             clang_tools_dir, llvm_tools_dir, config.environment['PATH']))
     config.environment['PATH'] = path
 
+    clang_libs_dir = getattr(config, 'clang_libs_dir', None)
+    if not clang_libs_dir:
+        lit_config.fatal('No Clang libs dir set!')
     llvm_libs_dir = getattr(config, 'llvm_libs_dir', None)
     if not llvm_libs_dir:
         lit_config.fatal('No LLVM libs dir set!')
-    path = os.path.pathsep.join((llvm_libs_dir,
+    path = os.path.pathsep.join((clang_libs_dir, llvm_libs_dir,
                                  config.environment.get('LD_LIBRARY_PATH','')))
     config.environment['LD_LIBRARY_PATH'] = path
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/clang-tools-extra-5.0.0.src/test/lit.site.cfg.in 
new/clang-tools-extra-5.0.1.src/test/lit.site.cfg.in
--- old/clang-tools-extra-5.0.0.src/test/lit.site.cfg.in        2016-04-16 
09:01:42.000000000 +0200
+++ new/clang-tools-extra-5.0.1.src/test/lit.site.cfg.in        2017-10-09 
20:00:04.000000000 +0200
@@ -7,6 +7,7 @@
 config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
 config.clang_tools_binary_dir = "@CLANG_TOOLS_BINARY_DIR@"
 config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
+config.clang_libs_dir = "@SHLIBDIR@"
 config.python_executable = "@PYTHON_EXECUTABLE@"
 config.target_triple = "@TARGET_TRIPLE@"
 

++++++ compiler-rt-5.0.0.src.tar.xz -> compiler-rt-5.0.1.src.tar.xz ++++++

++++++ libcxx-5.0.0.src.tar.xz -> libcxx-5.0.1.src.tar.xz ++++++
++++ 2796 lines of diff (skipped)

++++++ libcxxabi-5.0.0.src.tar.xz -> libcxxabi-5.0.1.src.tar.xz ++++++

++++++ lld-5.0.0.src.tar.xz -> lld-5.0.1.src.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lld-5.0.0.src/ELF/SyntheticSections.cpp 
new/lld-5.0.1.src/ELF/SyntheticSections.cpp
--- old/lld-5.0.0.src/ELF/SyntheticSections.cpp 2017-07-18 13:59:19.000000000 
+0200
+++ new/lld-5.0.1.src/ELF/SyntheticSections.cpp 2017-10-04 01:44:23.000000000 
+0200
@@ -427,10 +427,11 @@
         &Sec->template getFile<ELFT>()->getRelocTargetSym(Rels[FirstRelI]);
 
   // Search for an existing CIE by CIE contents/relocation target pair.
-  CieRecord *Cie = &CieMap[{Piece.data(), Personality}];
+  CieRecord *&Cie = CieMap[{Piece.data(), Personality}];
 
   // If not found, create a new one.
-  if (Cie->Piece == nullptr) {
+  if (!Cie) {
+    Cie = make<CieRecord>();
     Cie->Piece = &Piece;
     Cies.push_back(Cie);
   }
@@ -522,9 +523,14 @@
 static void writeCieFde(uint8_t *Buf, ArrayRef<uint8_t> D) {
   memcpy(Buf, D.data(), D.size());
 
+  size_t Aligned = alignTo(D.size(), sizeof(typename ELFT::uint));
+
+  // Zero-clear trailing padding if it exists.
+  memset(Buf + D.size(), 0, Aligned - D.size());
+
   // Fix the size field. -4 since size does not include the size field itself.
   const endianness E = ELFT::TargetEndianness;
-  write32<E>(Buf, alignTo(D.size(), sizeof(typename ELFT::uint)) - 4);
+  write32<E>(Buf, Aligned - 4);
 }
 
 template <class ELFT> void EhFrameSection<ELFT>::finalizeContents() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lld-5.0.0.src/ELF/SyntheticSections.h 
new/lld-5.0.1.src/ELF/SyntheticSections.h
--- old/lld-5.0.0.src/ELF/SyntheticSections.h   2017-07-13 01:56:53.000000000 
+0200
+++ new/lld-5.0.1.src/ELF/SyntheticSections.h   2017-10-04 01:42:47.000000000 
+0200
@@ -103,7 +103,8 @@
   std::vector<CieRecord *> Cies;
 
   // CIE records are uniquified by their contents and personality functions.
-  llvm::DenseMap<std::pair<ArrayRef<uint8_t>, SymbolBody *>, CieRecord> CieMap;
+  llvm::DenseMap<std::pair<ArrayRef<uint8_t>, SymbolBody *>, CieRecord *>
+      CieMap;
 };
 
 class GotSection : public SyntheticSection {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lld-5.0.0.src/lib/ReaderWriter/MachO/ArchHandler.h 
new/lld-5.0.1.src/lib/ReaderWriter/MachO/ArchHandler.h
--- old/lld-5.0.0.src/lib/ReaderWriter/MachO/ArchHandler.h      2016-03-30 
22:15:06.000000000 +0200
+++ new/lld-5.0.1.src/lib/ReaderWriter/MachO/ArchHandler.h      2017-12-05 
21:25:50.000000000 +0100
@@ -112,6 +112,10 @@
   /// info in final executables.
   virtual bool isLazyPointer(const Reference &);
 
+  /// Reference from an __stub_helper entry to the required offset of the
+  /// lazy bind commands.
+  virtual Reference::KindValue lazyImmediateLocationKind() = 0;
+
   /// Returns true if the specified relocation is paired to the next 
relocation.
   virtual bool isPairedReloc(const normalized::Relocation &) = 0;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lld-5.0.0.src/lib/ReaderWriter/MachO/ArchHandler_arm.cpp 
new/lld-5.0.1.src/lib/ReaderWriter/MachO/ArchHandler_arm.cpp
--- old/lld-5.0.0.src/lib/ReaderWriter/MachO/ArchHandler_arm.cpp        
2016-11-11 23:28:19.000000000 +0100
+++ new/lld-5.0.1.src/lib/ReaderWriter/MachO/ArchHandler_arm.cpp        
2017-12-05 21:25:50.000000000 +0100
@@ -67,6 +67,10 @@
     return invalid;
   }
 
+  Reference::KindValue lazyImmediateLocationKind() override {
+    return lazyImmediateLocation;
+  }
+
   Reference::KindValue pointerKind() override {
     return invalid;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lld-5.0.0.src/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp 
new/lld-5.0.1.src/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp
--- old/lld-5.0.0.src/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp      
2017-04-15 03:42:55.000000000 +0200
+++ new/lld-5.0.1.src/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp      
2017-12-05 21:25:50.000000000 +0100
@@ -127,6 +127,10 @@
     return pointer64;
   }
 
+  Reference::KindValue lazyImmediateLocationKind() override {
+    return lazyImmediateLocation;
+  }
+
   uint32_t dwarfCompactUnwindType() override {
     return 0x03000000;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lld-5.0.0.src/lib/ReaderWriter/MachO/ArchHandler_x86.cpp 
new/lld-5.0.1.src/lib/ReaderWriter/MachO/ArchHandler_x86.cpp
--- old/lld-5.0.0.src/lib/ReaderWriter/MachO/ArchHandler_x86.cpp        
2017-04-15 03:50:51.000000000 +0200
+++ new/lld-5.0.1.src/lib/ReaderWriter/MachO/ArchHandler_x86.cpp        
2017-12-05 21:25:50.000000000 +0100
@@ -70,6 +70,10 @@
     return delta32;
   }
 
+  Reference::KindValue lazyImmediateLocationKind() override {
+    return lazyImmediateLocation;
+  }
+
   Reference::KindValue unwindRefToEhFrameKind() override {
     return invalid;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lld-5.0.0.src/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp 
new/lld-5.0.1.src/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp
--- old/lld-5.0.0.src/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp     
2016-11-11 23:28:19.000000000 +0100
+++ new/lld-5.0.1.src/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp     
2017-12-05 21:25:50.000000000 +0100
@@ -116,6 +116,10 @@
     return unwindFDEToFunction;
   }
 
+  Reference::KindValue lazyImmediateLocationKind() override {
+    return lazyImmediateLocation;
+  }
+
   Reference::KindValue unwindRefToEhFrameKind() override {
     return unwindInfoToEhFrame;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lld-5.0.0.src/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp 
new/lld-5.0.1.src/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
--- old/lld-5.0.0.src/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp   
2017-06-10 10:06:17.000000000 +0200
+++ new/lld-5.0.1.src/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp   
2017-12-05 21:25:50.000000000 +0100
@@ -172,6 +172,8 @@
                                    SymbolScope &symbolScope);
   void         appendSection(SectionInfo *si, NormalizedFile &file);
   uint32_t     sectionIndexForAtom(const Atom *atom);
+  void fixLazyReferenceImm(const DefinedAtom *atom, uint32_t offset,
+                           NormalizedFile &file);
 
   typedef llvm::DenseMap<const Atom*, uint32_t> AtomToIndex;
   struct AtomAndIndex { const Atom *atom; uint32_t index; SymbolScope scope; };
@@ -1423,6 +1425,8 @@
 
   uint8_t segmentIndex;
   uint64_t segmentStartAddr;
+  uint32_t offsetInBindInfo = 0;
+
   for (SectionInfo *sect : _sectionInfos) {
     segIndexForSection(sect, segmentIndex, segmentStartAddr);
     for (const AtomInfo &info : sect->atomsAndOffsets) {
@@ -1467,6 +1471,59 @@
           bind.symbolName = targ->name();
           bind.addend = ref->addend();
           nFile.lazyBindingInfo.push_back(bind);
+
+          // Now that we know the segmentOffset and the ordinal attribute,
+          // we can fix the helper's code
+
+          fixLazyReferenceImm(atom, offsetInBindInfo, nFile);
+
+          // 5 bytes for opcodes + variable sizes (target name + \0 and offset
+          // encode's size)
+          offsetInBindInfo +=
+              6 + targ->name().size() + llvm::getULEB128Size(bind.segOffset);
+          if (bind.ordinal > BIND_IMMEDIATE_MASK)
+            offsetInBindInfo += llvm::getULEB128Size(bind.ordinal);
+        }
+      }
+    }
+  }
+}
+
+void Util::fixLazyReferenceImm(const DefinedAtom *atom, uint32_t offset,
+                               NormalizedFile &file) {
+  for (const auto &ref : *atom) {
+    const DefinedAtom *da = dyn_cast<DefinedAtom>(ref->target());
+    if (da == nullptr)
+      return;
+
+    const Reference *helperRef = nullptr;
+    for (const Reference *hr : *da) {
+      if (hr->kindValue() == _archHandler.lazyImmediateLocationKind()) {
+        helperRef = hr;
+        break;
+      }
+    }
+    if (helperRef == nullptr)
+      continue;
+
+    // TODO: maybe get the fixed atom content from _archHandler ?
+    for (SectionInfo *sectInfo : _sectionInfos) {
+      for (const AtomInfo &atomInfo : sectInfo->atomsAndOffsets) {
+        if (atomInfo.atom == helperRef->target()) {
+          auto sectionContent =
+              file.sections[sectInfo->normalizedSectionIndex].content;
+          uint8_t *rawb =
+              file.ownedAllocations.Allocate<uint8_t>(sectionContent.size());
+          llvm::MutableArrayRef<uint8_t> newContent{rawb,
+                                                    sectionContent.size()};
+          std::copy(sectionContent.begin(), sectionContent.end(),
+                    newContent.begin());
+          llvm::support::ulittle32_t *loc =
+              reinterpret_cast<llvm::support::ulittle32_t *>(
+                  &newContent[atomInfo.offsetInSection +
+                              helperRef->offsetInAtom()]);
+          *loc = offset;
+          file.sections[sectInfo->normalizedSectionIndex].content = newContent;
         }
       }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lld-5.0.0.src/test/ELF/eh-frame-padding-no-rosegment.s 
new/lld-5.0.1.src/test/ELF/eh-frame-padding-no-rosegment.s
--- old/lld-5.0.0.src/test/ELF/eh-frame-padding-no-rosegment.s  1970-01-01 
01:00:00.000000000 +0100
+++ new/lld-5.0.1.src/test/ELF/eh-frame-padding-no-rosegment.s  2017-10-04 
01:44:23.000000000 +0200
@@ -0,0 +1,64 @@
+// REQUIRES: x86
+
+.cfi_startproc
+.cfi_personality 0x1b, bar
+.cfi_endproc
+
+.global bar
+.hidden bar
+bar:
+
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+
+// Check the size of the CIE (0x18 + 4) and FDE (0x10 + 4)
+// RUN: llvm-readobj -s -section-data %t.o | FileCheck --check-prefix=OBJ %s
+
+// OBJ:      Name: .eh_frame
+// OBJ-NEXT: Type:
+// OBJ-NEXT: Flags [
+// OBJ-NEXT:   SHF_ALLOC
+// OBJ-NEXT: ]
+// OBJ-NEXT: Address:
+// OBJ-NEXT: Offset:
+// OBJ-NEXT: Size:
+// OBJ-NEXT: Link:
+// OBJ-NEXT: Info:
+// OBJ-NEXT: AddressAlignment:
+// OBJ-NEXT: EntrySize:
+// OBJ-NEXT: SectionData (
+// OBJ-NEXT:   0000: 18000000 00000000 017A5052 00017810
+// OBJ-NEXT:   0010: 061B0000 00001B0C 07089001 10000000
+// OBJ-NEXT:   0020: 20000000 00000000 00000000 00000000
+// OBJ-NEXT: )
+
+// RUN: ld.lld %t.o -no-rosegment -o %t -shared
+
+// Check that .eh_frame is in the same segment as .text
+// RUN: llvm-readobj -l --elf-output-style=GNU %t | FileCheck 
--check-prefix=PHDR %s
+
+// PHDR: Segment Sections
+// PHDR: .text
+// PHDR-SAME: .eh_frame
+
+// Check that the CIE and FDE are padded with 0x00 and not 0xCC when the
+// .eh_frame section is placed in the executable segment
+// RUN: llvm-readobj -s -section-data %t | FileCheck %s
+
+// CHECK:      Name: .eh_frame
+// CHECK-NEXT: Type:
+// CHECK-NEXT: Flags
+// CHECK-NEXT:   SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address:
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size:
+// CHECK-NEXT: Link:
+// CHECK-NEXT: Info:
+// CHECK-NEXT: AddressAlignment:
+// CHECK-NEXT: EntrySize:
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT:   0000: 1C000000 00000000 017A5052 00017810
+// CHECK-NEXT:   0010: 061BBEFF FFFF1B0C 07089001 00000000
+// CHECK-NEXT:   0020: 14000000 24000000 A8FFFFFF 00000000
+// CHECK-NEXT:   0030: 00000000 00000000
+// CHECK-NEXT: )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lld-5.0.0.src/test/mach-o/lazy-bind-x86_64.yaml 
new/lld-5.0.1.src/test/mach-o/lazy-bind-x86_64.yaml
--- old/lld-5.0.0.src/test/mach-o/lazy-bind-x86_64.yaml 2016-08-11 
20:08:59.000000000 +0200
+++ new/lld-5.0.1.src/test/mach-o/lazy-bind-x86_64.yaml 2017-12-05 
21:25:50.000000000 +0100
@@ -80,8 +80,8 @@
 
 # CHECK-HELPERS:Disassembly of section __TEXT,__stub_helper:
 # CHECK-HELPERS:       68 00 00 00 00            pushq $0
-# CHECK-HELPERS:       68 10 00 00 00            pushq $16
-# CHECK-HELPERS:       68 20 00 00 00            pushq $32
+# CHECK-HELPERS:       68 0b 00 00 00            pushq $11
+# CHECK-HELPERS:       68 16 00 00 00            pushq $22
 
 # Make sure the stub helper is correctly aligned
 # CHECK-DYLIBS:   sectname __stub_helper

++++++ lldb-5.0.0.src.tar.xz -> lldb-5.0.1.src.tar.xz ++++++
/work/SRC/openSUSE:Factory/llvm5/lldb-5.0.0.src.tar.xz 
/work/SRC/openSUSE:Factory/.llvm5.new/lldb-5.0.1.src.tar.xz differ: char 25, 
line 1

++++++ llvm-5.0.0.src.tar.xz -> llvm-5.0.1.src.tar.xz ++++++
/work/SRC/openSUSE:Factory/llvm5/llvm-5.0.0.src.tar.xz 
/work/SRC/openSUSE:Factory/.llvm5.new/llvm-5.0.1.src.tar.xz differ: char 25, 
line 1

++++++ llvm-do-not-install-static-libraries.patch ++++++
--- /var/tmp/diff_new_pack.OermVO/_old  2018-01-07 17:22:25.050338493 +0100
+++ /var/tmp/diff_new_pack.OermVO/_new  2018-01-07 17:22:25.050338493 +0100
@@ -2,10 +2,10 @@
 want after installation. By not copying them in the first place we reduce the
 disk usage during installation.
 
-Index: llvm-5.0.0.src/cmake/modules/AddLLVM.cmake
+Index: llvm-5.0.1.src/cmake/modules/AddLLVM.cmake
 ===================================================================
---- llvm-5.0.0.src.orig/cmake/modules/AddLLVM.cmake
-+++ llvm-5.0.0.src/cmake/modules/AddLLVM.cmake
+--- llvm-5.0.1.src.orig/cmake/modules/AddLLVM.cmake
++++ llvm-5.0.1.src/cmake/modules/AddLLVM.cmake
 @@ -595,10 +595,18 @@ macro(add_llvm_library name)
          set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
        endif()
@@ -29,10 +29,10 @@
  
        if (NOT CMAKE_CONFIGURATION_TYPES)
          add_custom_target(install-${name}
-Index: llvm-5.0.0.src/lld-5.0.0.src/cmake/modules/AddLLD.cmake
+Index: llvm-5.0.1.src/lld-5.0.1.src/cmake/modules/AddLLD.cmake
 ===================================================================
---- llvm-5.0.0.src.orig/lld-5.0.0.src/cmake/modules/AddLLD.cmake
-+++ llvm-5.0.0.src/lld-5.0.0.src/cmake/modules/AddLLD.cmake
+--- llvm-5.0.1.src.orig/lld-5.0.1.src/cmake/modules/AddLLD.cmake
++++ llvm-5.0.1.src/lld-5.0.1.src/cmake/modules/AddLLD.cmake
 @@ -17,13 +17,6 @@ macro(add_lld_library name)
        set_property(GLOBAL PROPERTY LLD_HAS_EXPORTS True)
      endif()
@@ -47,10 +47,10 @@
      if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
        add_custom_target(install-${name}
          DEPENDS ${name}
-Index: llvm-5.0.0.src/lldb-5.0.0.src/cmake/modules/AddLLDB.cmake
+Index: llvm-5.0.1.src/lldb-5.0.1.src/cmake/modules/AddLLDB.cmake
 ===================================================================
---- llvm-5.0.0.src.orig/lldb-5.0.0.src/cmake/modules/AddLLDB.cmake
-+++ llvm-5.0.0.src/lldb-5.0.0.src/cmake/modules/AddLLDB.cmake
+--- llvm-5.0.1.src.orig/lldb-5.0.1.src/cmake/modules/AddLLDB.cmake
++++ llvm-5.0.1.src/lldb-5.0.1.src/cmake/modules/AddLLDB.cmake
 @@ -88,7 +88,8 @@ function(add_lldb_library name)
          install(TARGETS ${name}
            COMPONENT ${name}

++++++ llvm-docs-5.0.0.src.tar.xz -> llvm-docs-5.0.1.src.tar.xz ++++++
++++ 68431 lines of diff (skipped)

++++++ openmp-5.0.0.src.tar.xz -> openmp-5.0.1.src.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openmp-5.0.0.src/runtime/src/kmp_csupport.cpp 
new/openmp-5.0.1.src/runtime/src/kmp_csupport.cpp
--- old/openmp-5.0.0.src/runtime/src/kmp_csupport.cpp   2017-07-17 
11:03:14.000000000 +0200
+++ new/openmp-5.0.1.src/runtime/src/kmp_csupport.cpp   2017-11-27 
18:34:55.000000000 +0100
@@ -3095,23 +3095,35 @@
     __kmp_wait_yield_4((volatile kmp_uint32 *)&sh_buf->doacross_buf_idx, idx,
                        __kmp_eq_4, NULL);
   }
+#if KMP_32_BIT_ARCH
   // Check if we are the first thread. After the CAS the first thread gets 0,
   // others get 1 if initialization is in progress, allocated pointer 
otherwise.
+  // Treat pointer as volatile integer (value 0 or 1) until memory is 
allocated.
+  flags = (kmp_uint32 *)KMP_COMPARE_AND_STORE_RET32(
+      (volatile kmp_int32 *)&sh_buf->doacross_flags, NULL, 1);
+#else
   flags = (kmp_uint32 *)KMP_COMPARE_AND_STORE_RET64(
-      (kmp_int64 *)&sh_buf->doacross_flags, NULL, (kmp_int64)1);
+      (volatile kmp_int64 *)&sh_buf->doacross_flags, NULL, 1LL);
+#endif
   if (flags == NULL) {
     // we are the first thread, allocate the array of flags
-    kmp_int64 size =
-        trace_count / 8 + 8; // in bytes, use single bit per iteration
-    sh_buf->doacross_flags = (kmp_uint32 *)__kmp_thread_calloc(th, size, 1);
-  } else if ((kmp_int64)flags == 1) {
+    size_t size = trace_count / 8 + 8; // in bytes, use single bit per 
iteration
+    flags = (kmp_uint32 *)__kmp_thread_calloc(th, size, 1);
+    KMP_MB();
+    sh_buf->doacross_flags = flags;
+  } else if (flags == (kmp_uint32 *)1) {
+#if KMP_32_BIT_ARCH
     // initialization is still in progress, need to wait
-    while ((volatile kmp_int64)sh_buf->doacross_flags == 1) {
+    while (*(volatile kmp_int32 *)&sh_buf->doacross_flags == 1)
+#else
+    while (*(volatile kmp_int64 *)&sh_buf->doacross_flags == 1LL)
+#endif
       KMP_YIELD(TRUE);
-    }
+    KMP_MB();
+  } else {
+    KMP_MB();
   }
-  KMP_DEBUG_ASSERT((kmp_int64)sh_buf->doacross_flags >
-                   1); // check value of pointer
+  KMP_DEBUG_ASSERT(sh_buf->doacross_flags > (kmp_uint32 *)1); // check ptr 
value
   pr_buf->th_doacross_flags =
       sh_buf->doacross_flags; // save private copy in order to not
   // touch shared buffer on each iteration
@@ -3205,6 +3217,7 @@
   while ((flag & pr_buf->th_doacross_flags[iter_number]) == 0) {
     KMP_YIELD(TRUE);
   }
+  KMP_MB();
   KA_TRACE(20,
            ("__kmpc_doacross_wait() exit: T#%d wait for iter %lld completed\n",
             gtid, (iter_number << 5) + shft));
@@ -3257,6 +3270,7 @@
   shft = iter_number % 32; // use 32-bit granularity
   iter_number >>= 5; // divided by 32
   flag = 1 << shft;
+  KMP_MB();
   if ((flag & pr_buf->th_doacross_flags[iter_number]) == 0)
     KMP_TEST_THEN_OR32(&pr_buf->th_doacross_flags[iter_number], flag);
   KA_TRACE(20, ("__kmpc_doacross_post() exit: T#%d iter %lld posted\n", gtid,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openmp-5.0.0.src/runtime/src/kmp_lock.cpp 
new/openmp-5.0.1.src/runtime/src/kmp_lock.cpp
--- old/openmp-5.0.0.src/runtime/src/kmp_lock.cpp       2017-07-17 
11:03:14.000000000 +0200
+++ new/openmp-5.0.1.src/runtime/src/kmp_lock.cpp       2017-11-14 
20:21:30.000000000 +0100
@@ -3061,11 +3061,12 @@
     if (idx == __kmp_i_lock_table.size) {
       // Double up the space for block pointers
       int row = __kmp_i_lock_table.size / KMP_I_LOCK_CHUNK;
-      kmp_indirect_lock_t **old_table = __kmp_i_lock_table.table;
-      __kmp_i_lock_table.table = (kmp_indirect_lock_t **)__kmp_allocate(
+      kmp_indirect_lock_t **new_table = (kmp_indirect_lock_t **)__kmp_allocate(
           2 * row * sizeof(kmp_indirect_lock_t *));
-      KMP_MEMCPY(__kmp_i_lock_table.table, old_table,
+      KMP_MEMCPY(new_table, __kmp_i_lock_table.table,
                  row * sizeof(kmp_indirect_lock_t *));
+      kmp_indirect_lock_t **old_table = __kmp_i_lock_table.table;
+      __kmp_i_lock_table.table = new_table;
       __kmp_free(old_table);
       // Allocate new objects in the new blocks
       for (int i = row; i < 2 * row; ++i)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openmp-5.0.0.src/runtime/src/kmp_str.cpp 
new/openmp-5.0.1.src/runtime/src/kmp_str.cpp
--- old/openmp-5.0.0.src/runtime/src/kmp_str.cpp        2017-07-03 
13:24:08.000000000 +0200
+++ new/openmp-5.0.1.src/runtime/src/kmp_str.cpp        2017-11-14 
20:16:52.000000000 +0100
@@ -168,7 +168,7 @@
 
 #if !KMP_OS_WINDOWS
       va_list _args;
-      __va_copy(_args, args); // Make copy of args.
+      va_copy(_args, args); // Make copy of args.
 #define args _args // Substitute args with its copy, _args.
 #endif // KMP_OS_WINDOWS
       rc = KMP_VSNPRINTF(buffer->str + buffer->used, free, format, args);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openmp-5.0.0.src/runtime/src/kmp_tasking.cpp 
new/openmp-5.0.1.src/runtime/src/kmp_tasking.cpp
--- old/openmp-5.0.0.src/runtime/src/kmp_tasking.cpp    2017-07-18 
20:50:13.000000000 +0200
+++ new/openmp-5.0.1.src/runtime/src/kmp_tasking.cpp    2017-11-14 
20:11:04.000000000 +0100
@@ -2504,14 +2504,13 @@
 // Deallocates a task deque for a particular thread. Happens at library
 // deallocation so don't need to reset all thread data fields.
 static void __kmp_free_task_deque(kmp_thread_data_t *thread_data) {
-  __kmp_acquire_bootstrap_lock(&thread_data->td.td_deque_lock);
-
   if (thread_data->td.td_deque != NULL) {
+    __kmp_acquire_bootstrap_lock(&thread_data->td.td_deque_lock);
     TCW_4(thread_data->td.td_deque_ntasks, 0);
     __kmp_free(thread_data->td.td_deque);
     thread_data->td.td_deque = NULL;
+    __kmp_release_bootstrap_lock(&thread_data->td.td_deque_lock);
   }
-  __kmp_release_bootstrap_lock(&thread_data->td.td_deque_lock);
 
 #ifdef BUILD_TIED_TASK_STACK
   // GEH: Figure out what to do here for td_susp_tied_tasks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openmp-5.0.0.src/runtime/src/kmp_threadprivate.cpp 
new/openmp-5.0.1.src/runtime/src/kmp_threadprivate.cpp
--- old/openmp-5.0.0.src/runtime/src/kmp_threadprivate.cpp      2017-05-12 
20:01:32.000000000 +0200
+++ new/openmp-5.0.1.src/runtime/src/kmp_threadprivate.cpp      2017-11-14 
20:19:10.000000000 +0100
@@ -228,6 +228,13 @@
   struct private_common *tn;
   struct shared_common *d_tn;
 
+  if (!TCR_4(__kmp_init_gtid)) {
+    // This is possible when one of multiple roots initiates early library
+    // termination in a sequential region while other teams are active, and its
+    // child threads are about to end.
+    return;
+  }
+
   KC_TRACE(10, ("__kmp_common_destroy_gtid: T#%d called\n", gtid));
   if ((__kmp_foreign_tp) ? (!KMP_INITIAL_GTID(gtid)) : (!KMP_UBER_GTID(gtid))) 
{
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openmp-5.0.0.src/runtime/test/lock/omp_init_lock.c 
new/openmp-5.0.1.src/runtime/test/lock/omp_init_lock.c
--- old/openmp-5.0.0.src/runtime/test/lock/omp_init_lock.c      1970-01-01 
01:00:00.000000000 +0100
+++ new/openmp-5.0.1.src/runtime/test/lock/omp_init_lock.c      2017-11-14 
20:21:30.000000000 +0100
@@ -0,0 +1,42 @@
+// RUN: %libomp-compile-and-run
+#include "omp_testsuite.h"
+#include <stdio.h>
+
+// This should be slightly less than KMP_I_LOCK_CHUNK, which is 1024
+#define LOCKS_PER_ITER 1000
+#define ITERATIONS (REPETITIONS + 1)
+
+// This tests concurrently using locks on one thread while initializing new
+// ones on another thread.  This exercises the global lock pool.
+int test_omp_init_lock() {
+  int i;
+  omp_lock_t lcks[ITERATIONS * LOCKS_PER_ITER];
+#pragma omp parallel for schedule(static) num_threads(NUM_TASKS)
+  for (i = 0; i < ITERATIONS; i++) {
+    int j;
+    omp_lock_t *my_lcks = &lcks[i * LOCKS_PER_ITER];
+    for (j = 0; j < LOCKS_PER_ITER; j++) {
+      omp_init_lock(&my_lcks[j]);
+    }
+    for (j = 0; j < LOCKS_PER_ITER * 100; j++) {
+      omp_set_lock(&my_lcks[j % LOCKS_PER_ITER]);
+      omp_unset_lock(&my_lcks[j % LOCKS_PER_ITER]);
+    }
+  }
+  // Wait until all repititions are done.  The test is exercising growth of
+  // the global lock pool, which does not shrink when no locks are allocated.
+  {
+    int j;
+    for (j = 0; j < ITERATIONS * LOCKS_PER_ITER; j++) {
+      omp_destroy_lock(&lcks[j]);
+    }
+  }
+
+  return 0;
+}
+
+int main() {
+  // No use repeating this test, since it's exercising a private global pool
+  // which is not reset between test iterations.
+  return test_omp_init_lock();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openmp-5.0.0.src/runtime/test/tasking/omp_taskloop_grainsize.c 
new/openmp-5.0.1.src/runtime/test/tasking/omp_taskloop_grainsize.c
--- old/openmp-5.0.0.src/runtime/test/tasking/omp_taskloop_grainsize.c  
2017-07-18 22:16:25.000000000 +0200
+++ new/openmp-5.0.1.src/runtime/test/tasking/omp_taskloop_grainsize.c  
2017-10-10 21:57:45.000000000 +0200
@@ -17,7 +17,8 @@
 
 int test_omp_taskloop_grainsize()
 {
-  int i, grainsize, count, tmp_count, result, num_off;
+  int result = 0;
+  int i, grainsize, count, tmp_count, num_off;
   int *tmp, *tids, *tidsArray;
 
   tidsArray = (int *)malloc(sizeof(int) * CFDMAX_SIZE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openmp-5.0.0.src/runtime/test/worksharing/for/kmp_doacross_check.c 
new/openmp-5.0.1.src/runtime/test/worksharing/for/kmp_doacross_check.c
--- old/openmp-5.0.0.src/runtime/test/worksharing/for/kmp_doacross_check.c      
2016-03-02 23:43:14.000000000 +0100
+++ new/openmp-5.0.1.src/runtime/test/worksharing/for/kmp_doacross_check.c      
2017-11-27 18:34:55.000000000 +0100
@@ -24,7 +24,7 @@
   dims.lo = 1;
   dims.up = N-1;
   dims.st = 1;
-  #pragma omp parallel
+  #pragma omp parallel num_threads(4)
   {
     int i, gtid;
     long long vec;


Reply via email to