Hello community,

here is the log from the commit of package llvm7 for openSUSE:Factory checked 
in at 2018-12-18 14:58:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/llvm7 (Old)
 and      /work/SRC/openSUSE:Factory/.llvm7.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "llvm7"

Tue Dec 18 14:58:41 2018 rev:5 rq:658848 version:7.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/llvm7/llvm7.changes      2018-12-12 
17:29:34.730793749 +0100
+++ /work/SRC/openSUSE:Factory/.llvm7.new.28833/llvm7.changes   2018-12-18 
15:00:05.110098245 +0100
@@ -1,0 +2,14 @@
+Fri Dec 14 23:08:04 UTC 2018 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- Remove ppc from Exclude field in spec file
+- Allow use of Gold linker to be conditional
+- Disable Gold linker on ppc
+- Add patch to fix SUSE GNU triplet on ppc
+  * clang-fix-powerpc-triplet.patch
+- Add patch from upstream to fix ABI issue on ppc
+  * llvm-D51108.patch
+- Limit list of enabled targets on ppc
+  * PowerPC;AMDGPU;BPF;NVPTX
+- Ignore testsuite failures on ppc
+
+-------------------------------------------------------------------

New:
----
  clang-fix-powerpc-triplet.patch
  llvm-D51108.patch

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

Other differences:
------------------
++++++ llvm7.spec ++++++
--- /var/tmp/diff_new_pack.URTVUv/_old  2018-12-18 15:00:07.102095251 +0100
+++ /var/tmp/diff_new_pack.URTVUv/_new  2018-12-18 15:00:07.106095245 +0100
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -33,6 +33,11 @@
 %else
 %bcond_with openmp
 %endif
+%ifarch ppc64 ppc64le %{ix86} x86_64
+%bcond_without gold
+%else
+%bcond_with gold
+%endif
 
 %ifarch x86_64
 %bcond_without lldb
@@ -101,8 +106,12 @@
 Patch23:        llvm-unittests-Don-t-install-TestPlugin.so.patch
 Patch24:        opt-viewer-Find-style-css-in-usr-share.patch
 Patch25:        llvm-drop-llvm-optional-clang-specific-optimization.patch
+Patch26:        clang-fix-powerpc-triplet.patch
+Patch27:        llvm-D51108.patch
 BuildRequires:  binutils-devel >= 2.21.90
+%if %{with gold}
 BuildRequires:  binutils-gold
+%endif
 BuildRequires:  cmake
 BuildRequires:  fdupes
 BuildRequires:  groff
@@ -120,8 +129,8 @@
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# llvm does not work on ppc or s390
-ExcludeArch:    ppc s390
+# llvm does not work on s390
+ExcludeArch:    s390
 BuildRequires:  gcc
 BuildRequires:  gcc-c++
 %if %{with ffi}
@@ -160,7 +169,9 @@
 Requires:       libstdc++-devel
 Requires:       libtool
 Requires:       llvm%{_sonum}-LTO-devel
+%if %{with gold}
 Requires:       llvm%{_sonum}-gold
+%endif
 Requires:       llvm%{_sonum}-polly-devel
 Requires:       ncurses-devel
 Requires:       pkgconfig
@@ -191,7 +202,9 @@
 Recommends:     clang%{_sonum}-checker
 Recommends:     libc++-devel
 Recommends:     libomp%{_sonum}-devel
+%if %{with gold}
 Recommends:     llvm-gold-devel
+%endif
 Recommends:     scan-build
 Recommends:     scan-view
 %if %{with cxx}
@@ -284,6 +297,7 @@
 This package contains the link-time optimizer for LLVM.
 (development files)
 
+%if %{with gold}
 %package gold
 Summary:        Gold linker plugin for LLVM
 # Avoid multiple provider errors
@@ -295,6 +309,7 @@
 
 %description gold
 This package contains the Gold linker plugin for LLVM.
+%endif
 
 %package -n libomp%{_sonum}-devel
 Summary:        MPI plugin for LLVM
@@ -524,6 +539,7 @@
 %patch23 -p1
 %patch24 -p1
 %patch25 -p1
+%patch27 -p1
 
 pushd cfe-%{_relver}.src
 %patch1 -p1
@@ -533,6 +549,7 @@
 %patch6 -p1
 %patch8 -p1
 %patch16 -p2
+%patch26 -p1
 popd
 
 %if %{with lldb}
@@ -616,7 +633,7 @@
 # TODO: Document why those.
 TARGETS_TO_BUILD="host;ARM;AMDGPU;BPF;NVPTX"
 %endif
-%ifarch ppc64 ppc64le
+%ifarch ppc ppc64 ppc64le
 # TODO: Document why those.
 TARGETS_TO_BUILD="host;AMDGPU;BPF;NVPTX"
 %endif
@@ -665,7 +682,9 @@
     -DLLVM_INCLUDE_TESTS:BOOL=OFF \
     -DLLVM_ENABLE_ASSERTIONS=OFF \
     -DLLVM_TARGETS_TO_BUILD=Native \
+%if %{with gold}
     -DLLVM_USE_LINKER=gold \
+%endif
     -DCLANG_ENABLE_ARCMT:BOOL=OFF \
     -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF \
     -DCOMPILER_RT_BUILD_SANITIZERS:BOOL=OFF \
@@ -718,7 +737,9 @@
     -DLLVM_ENABLE_PIC=ON \
     -DLLVM_BINUTILS_INCDIR=%{_includedir} \
     -DLLVM_TARGETS_TO_BUILD=${TARGETS_TO_BUILD} \
+%if %{with gold}
     -DLLVM_USE_LINKER=gold \
+%endif
 %if "%{_lib}" == "lib64"
     -DLLVM_LIBDIR_SUFFIX=64 \
 %endif
@@ -786,7 +807,9 @@
 
 # Note that bfd-plugins is always in /usr/lib/bfd-plugins, no matter what 
_libdir is.
 mkdir -p %{buildroot}/usr/lib/bfd-plugins
+%if %{with gold}
 ln -s %{_libdir}/LLVMgold.so %{buildroot}/usr/lib/bfd-plugins/
+%endif
 
 install -m 755 -d %{buildroot}%{_datadir}/vim/site/
 for i in ftdetect ftplugin indent syntax; do
@@ -940,7 +963,7 @@
 %if !0%{?qemu_user_space_build:1}
 # we just do not have enough memory with qemu emulation
 
-%ifarch ppc64 ppc64le
+%ifarch ppc ppc64 ppc64le
 ninja -v %{?_smp_mflags} check || { echo "Ignore PowerPC failures 
https://bugs.llvm.org/show_bug.cgi?id=35871";; }
 %else
 ninja -v %{?_smp_mflags} check
@@ -977,8 +1000,10 @@
 %postun -n liblldb%{_sonum} -p /sbin/ldconfig
 %endif
 
+%if %{with gold}
 %post gold -p /sbin/ldconfig
 %postun gold -p /sbin/ldconfig
+%endif
 %post devel -p /sbin/ldconfig
 %postun devel -p /sbin/ldconfig
 %post LTO-devel -p /sbin/ldconfig
@@ -1536,12 +1561,16 @@
 %defattr(-,root,root)
 %{_libdir}/libLTO.so.*
 
+%if %{with gold}
 %files gold
 %defattr(-,root,root)
 %{_libdir}/LLVMgold.so
 # Note that bfd-plugins is always in /usr/lib/bfd-plugins, no matter what 
_libdir is.
 %dir /usr/lib/bfd-plugins/
 /usr/lib/bfd-plugins/LLVMgold.so
+%else
+%exclude %{_libdir}/LLVMgold.so
+%endif
 
 %if %{with openmp}
 %files -n libomp%{_sonum}-devel

++++++ clang-fix-powerpc-triplet.patch ++++++
diff -Nru cfe-7.0.0.src.orig/lib/Driver/ToolChains/Gnu.cpp 
cfe-7.0.0.src/lib/Driver/ToolChains/Gnu.cpp
--- cfe-7.0.0.src.orig/lib/Driver/ToolChains/Gnu.cpp    2018-07-31 
16:21:46.000000000 +0200
+++ cfe-7.0.0.src/lib/Driver/ToolChains/Gnu.cpp 2018-12-05 15:55:34.106427845 
+0100
@@ -1865,7 +1865,7 @@
   static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
   static const char *const PPCTriples[] = {
       "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",
-      "powerpc-suse-linux", "powerpc-montavista-linuxspe"};
+      "powerpc64-suse-linux", "powerpc-montavista-linuxspe"};
   static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};
   static const char *const PPC64Triples[] = {
       "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu",
++++++ llvm-D51108.patch ++++++
diff -Nru llvm-7.0.0.src.orig/lib/Target/PowerPC/PPCISelLowering.cpp 
llvm-7.0.0.src/lib/Target/PowerPC/PPCISelLowering.cpp
--- llvm-7.0.0.src.orig/lib/Target/PowerPC/PPCISelLowering.cpp  2018-08-16 
12:13:29.000000000 +0200
+++ llvm-7.0.0.src/lib/Target/PowerPC/PPCISelLowering.cpp       2018-12-06 
12:15:09.583899783 +0100
@@ -3480,9 +3480,14 @@
       // Argument stored in memory.
       assert(VA.isMemLoc());
 
+      // Get the extended size of the argument type in stack
       unsigned ArgSize = VA.getLocVT().getStoreSize();
-      int FI = MFI.CreateFixedObject(ArgSize, VA.getLocMemOffset(),
-                                     isImmutable);
+      // Get the actual size of the argument type
+      unsigned ObjSize = VA.getValVT().getStoreSize();
+      unsigned ArgOffset = VA.getLocMemOffset();
+      // Stack objects in PPC32 are right justified.
+      ArgOffset += ArgSize - ObjSize;
+      int FI = MFI.CreateFixedObject(ArgSize, ArgOffset, isImmutable);
 
       // Create load nodes to retrieve arguments from the stack.
       SDValue FIN = DAG.getFrameIndex(FI, PtrVT);
@@ -5437,10 +5442,15 @@
       Arg = PtrOff;
     }
 
-    if (VA.isRegLoc()) {
-      if (Arg.getValueType() == MVT::i1)
-        Arg = DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::i32, Arg);
+    // When useCRBits() is true, there can be i1 arguments.
+    // It is because getRegisterType(MVT::i1) => MVT::i1,
+    // and for other integer types getRegisterType() => MVT::i32.
+    // Extend i1 and ensure callee will get i32.
+    if (Arg.getValueType() == MVT::i1)
+      Arg = DAG.getNode(Flags.isSExt() ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND,
+                        dl, MVT::i32, Arg);
 
+    if (VA.isRegLoc()) {
       seenFloatArg |= VA.getLocVT().isFloatingPoint();
       // Put argument in a physical register.
       RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg));
diff -Nru 
llvm-7.0.0.src.orig/test/CodeGen/PowerPC/ppc32-i1-stack-arguments-abi-bug.ll 
llvm-7.0.0.src/test/CodeGen/PowerPC/ppc32-i1-stack-arguments-abi-bug.ll
--- 
llvm-7.0.0.src.orig/test/CodeGen/PowerPC/ppc32-i1-stack-arguments-abi-bug.ll    
    1970-01-01 01:00:00.000000000 +0100
+++ llvm-7.0.0.src/test/CodeGen/PowerPC/ppc32-i1-stack-arguments-abi-bug.ll     
2018-12-06 12:15:09.583899783 +0100
@@ -0,0 +1,24 @@
+; RUN: llc -verify-machineinstrs < %s -mcpu=ppc32 -mattr=+crbits | FileCheck %s
+target triple = "powerpc-unknown-linux-gnu"
+
+define void @check_callee(
+  i32, i32, i32, i32,
+  i32, i32, i32, i32,
+  i1 zeroext %s1
+) {
+  call void @check_caller(
+    i32 9, i32 9, i32 9, i32 9,
+    i32 9, i32 9, i32 9, i32 9,
+    i1 zeroext %s1)
+  ret void
+}
+
+; CHECK-LABEL: @check_callee
+; CHECK: lbz {{[0-9]+}}, 27(1)
+; CHECK: stw {{[0-9]+}}, 8(1)
+
+declare void @check_caller(
+  i32, i32, i32, i32,
+  i32, i32, i32, i32,
+  i1 zeroext
+)

Reply via email to