[Libreoffice-commits] .: 2 commits - boost/boost_1_44_0-clang-warnings.patch compilerplugins/Makefile-clang.mk config_host.mk.in configure.ac

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 22 07:26:28 PDT 2012


 boost/boost_1_44_0-clang-warnings.patch |  224 ++++++++++++++++++++++++++++++++
 compilerplugins/Makefile-clang.mk       |    2 
 config_host.mk.in                       |    1 
 configure.ac                            |    3 
 4 files changed, 228 insertions(+), 2 deletions(-)

New commits:
commit 9cabab002b1180650236f3d1f5fd32dfdd4bf79a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Oct 22 16:18:35 2012 +0200

    CLANGPLUGIN_CPPFLAGS for building plugin for Clang in nonstandard location
    
    (i.e., configure with CLANGPLUGIN_CPPFLAGS=-I.../clang-installation/include
    -I.../clang-build/tools/clang/include)
    
    Change-Id: Ic6d2973629103f71c32f44ebba2ac70d137d18e7

diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 818015f..9b24df0 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -56,7 +56,7 @@ CLANGOBJS=
 define clangbuildsrc
 $(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp
 	@echo [build CXX] $(subst $(SRCDIR)/,,$(2))
-	$(CXX) $(CLANGCXXFLAGS) $(CLANGDEFS) $(CLANGINCLUDES) -DSRCDIR=$(SRCDIR) $(2) -fPIC -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
+	$(CXX) $(CLANGPLUGIN_CPPFLAGS) $(CLANGCXXFLAGS) $(CLANGDEFS) $(CLANGINCLUDES) -DSRCDIR=$(SRCDIR) $(2) -fPIC -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
 
 -include $(CLANGOUTDIR)/$(1).d
 
diff --git a/config_host.mk.in b/config_host.mk.in
index 91acee5..e867c57 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -59,6 +59,7 @@ ifneq ($(strip @CFLAGS@),)
 export CFLAGS=@CFLAGS@
 endif
 export CHECK_PARALLELISM=@CHECK_PARALLELISM@
+export CLANGPLUGIN_CPPFLAGS=@CLANGPLUGIN_CPPFLAGS@
 export CLASSPATH=@CLASSPATH@
 export CLUCENE_CFLAGS=@CLUCENE_CFLAGS@
 export CLUCENE_LIBS=@CLUCENE_LIBS@
diff --git a/configure.ac b/configure.ac
index c493a74..7b39f3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5102,7 +5102,7 @@ if test "$COM_GCC_IS_CLANG" = "TRUE"; then
     if test "$compiler_plugins" != "no"; then
         AC_LANG_PUSH([C++])
         save_CPPFLAGS=$CPPFLAGS
-        CPPFLAGS="$CPPFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
+        CPPFLAGS="$CPPFLAGS $CLANGPLUGIN_CPPFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
         AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
             [COMPILER_PLUGINS=TRUE],
             [
@@ -5122,6 +5122,7 @@ else
     fi
 fi
 AC_SUBST(COMPILER_PLUGINS)
+AC_SUBST(CLANGPLUGIN_CPPFLAGS)
 
 dnl ===================================================================
 dnl Set the MinGW sys-root
commit d72f3d53e05223a97efed6103fbcbfca5244c246
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Oct 22 16:17:28 2012 +0200

    Work around some more Clang boost warnings
    
    Change-Id: I819a36fb922b6fe96e9989ad438bed15875bf1b6

diff --git a/boost/boost_1_44_0-clang-warnings.patch b/boost/boost_1_44_0-clang-warnings.patch
index c0c2206..c1b4f0a 100644
--- a/boost/boost_1_44_0-clang-warnings.patch
+++ b/boost/boost_1_44_0-clang-warnings.patch
@@ -9,6 +9,27 @@
              {
                  typedef BOOST_STRING_TYPENAME 
                      range_const_iterator<InputT>::type input_iterator_type; 
+--- misc/boost_1_44_0/boost/concept_check.hpp
++++ misc/build/boost_1_44_0/boost/concept_check.hpp
+@@ -136,7 +136,18 @@ namespace boost
+   {
+     BOOST_CONCEPT_USAGE(Assignable) {
+ #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
++#if defined __clang__
++#if __clang_major__ == 3 && __clang_minor__ >= 2 || __clang_major__ > 3
++#pragma clang diagnostic push
++#pragma clang diagnostic ignored "-Wself-assign-field"
++#endif
++#endif
+       a = a;             // require assignment operator
++#if defined __clang__
++#if __clang_major__ == 3 && __clang_minor__ >= 2 || __clang_major__ > 3
++#pragma clang diagnostic pop
++#endif
++#endif
+ #endif
+       const_constraints(a);
+     }
 --- misc/boost_1_44_0/boost/date_time/dst_rules.hpp	2008-02-27 21:00:24.000000000 +0100
 +++ misc/build/boost_1_44_0/boost/date_time/dst_rules.hpp	2012-06-06 23:11:03.000000000 +0200
 @@ -371,7 +371,7 @@
@@ -48,6 +69,209 @@
      {
        m_period_separator;
        m_period_start_delimeter;
+--- misc/boost_1_44_0/boost/multi_array/multi_array_ref.hpp
++++ misc/build/boost_1_44_0/boost/multi_array/multi_array_ref.hpp
+@@ -86,24 +86,24 @@ public:
+       num_elements_(other.num_elements_)  {  }
+ 
+   template <typename ExtentList>
+-  explicit const_multi_array_ref(TPtr base, const ExtentList& extents) :
++  explicit const_multi_array_ref(TPtr base, const ExtentList& extentlist) :
+     base_(base), storage_(c_storage_order()) {
+     boost::function_requires<
+       detail::multi_array::CollectionConcept<ExtentList> >();
+ 
+     index_base_list_.assign(0);
+-    init_multi_array_ref(extents.begin());
++    init_multi_array_ref(extentlist.begin());
+   }
+   
+   template <typename ExtentList>
+-  explicit const_multi_array_ref(TPtr base, const ExtentList& extents,
++  explicit const_multi_array_ref(TPtr base, const ExtentList& extentlist,
+                        const general_storage_order<NumDims>& so) : 
+     base_(base), storage_(so) {
+     boost::function_requires<
+       detail::multi_array::CollectionConcept<ExtentList> >();
+ 
+     index_base_list_.assign(0);
+-    init_multi_array_ref(extents.begin());
++    init_multi_array_ref(extentlist.begin());
+   }
+   
+   explicit const_multi_array_ref(TPtr base,
+@@ -161,14 +161,14 @@ public:
+   }
+ 
+   template <typename SizeList>
+-  void reshape(const SizeList& extents) {
++  void reshape(const SizeList& extentlist) {
+     boost::function_requires<
+       detail::multi_array::CollectionConcept<SizeList> >();
+     BOOST_ASSERT(num_elements_ ==
+-                 std::accumulate(extents.begin(),extents.end(),
++                 std::accumulate(extentlist.begin(),extentlist.end(),
+                                  size_type(1),std::multiplies<size_type>()));
+ 
+-    std::copy(extents.begin(),extents.end(),extent_list_.begin());
++    std::copy(extentlist.begin(),extentlist.end(),extent_list_.begin());
+     this->compute_strides(stride_list_,extent_list_,storage_);
+ 
+     origin_offset_ =
+@@ -208,11 +208,11 @@ public:
+   }
+ 
+   template <typename IndexList>
+-  const element& operator()(IndexList indices) const {
++  const element& operator()(IndexList indexlist) const {
+     boost::function_requires<
+       detail::multi_array::CollectionConcept<IndexList> >();
+     return super_type::access_element(boost::type<const element&>(),
+-                                      indices,origin(),
++                                      indexlist,origin(),
+                                       shape(),strides(),index_bases());
+   }
+ 
+@@ -231,12 +231,12 @@ public:
+ #endif // BOOST_MSVC
+   typename const_array_view<NDims>::type 
+   operator[](const detail::multi_array::
+-             index_gen<NumDims,NDims>& indices)
++             index_gen<NumDims,NDims>& indexlist)
+     const {
+     typedef typename const_array_view<NDims>::type return_type;
+     return
+       super_type::generate_array_view(boost::type<return_type>(),
+-                                      indices,
++                                      indexlist,
+                                       shape(),
+                                       strides(),
+                                       index_bases(),
+@@ -328,10 +328,10 @@ public:
+   const_multi_array_ref(TPtr base,
+                         const storage_order_type& so,
+                         const index * index_bases_,
+-                        const size_type* extents) :
++                        const size_type* extentlist) :
+     base_(base), storage_(so), origin_offset_(0), directional_offset_(0)
+  {
+-   // If index_bases_ or extents is null, then initialize the corresponding
++   // If index_bases_ or extentlist is null, then initialize the corresponding
+    // private data to zeroed lists.
+    if(index_bases_) {
+      boost::detail::multi_array::
+@@ -339,8 +339,8 @@ public:
+    } else {
+      std::fill_n(index_base_list_.begin(),NumDims,0);
+    }
+-   if(extents) {
+-     init_multi_array_ref(extents);
++   if(extentlist) {
++     init_multi_array_ref(extentlist);
+    } else {
+      boost::array<index,NumDims> extent_list;
+      extent_list.assign(0);
+@@ -374,12 +374,12 @@ private:
+               boost::mem_fun_ref(&extent_range::start));
+ 
+     // calculate the extents
+-    extent_list extents;
++    extent_list extentlist;
+     std::transform(ranges.ranges_.begin(),ranges.ranges_.end(),
+-              extents.begin(),
++              extentlist.begin(),
+               boost::mem_fun_ref(&extent_range::size));
+ 
+-    init_multi_array_ref(extents.begin());
++    init_multi_array_ref(extentlist.begin());
+   }
+ 
+ 
+@@ -445,16 +445,16 @@ public:
+   };
+ 
+   template <class ExtentList>
+-  explicit multi_array_ref(T* base, const ExtentList& extents) :
+-    super_type(base,extents) {
++  explicit multi_array_ref(T* base, const ExtentList& extentlist) :
++    super_type(base,extentlist) {
+     boost::function_requires<
+       detail::multi_array::CollectionConcept<ExtentList> >();
+   }
+ 
+   template <class ExtentList>
+-  explicit multi_array_ref(T* base, const ExtentList& extents,
++  explicit multi_array_ref(T* base, const ExtentList& extentlist,
+                            const general_storage_order<NumDims>& so) :
+-    super_type(base,extents,so) {
++    super_type(base,extentlist,so) {
+     boost::function_requires<
+       detail::multi_array::CollectionConcept<ExtentList> >();
+   }
+@@ -509,11 +509,11 @@ public:
+   element* data() { return super_type::base_; }
+ 
+   template <class IndexList>
+-  element& operator()(const IndexList& indices) {
++  element& operator()(const IndexList& indexlist) {
+     boost::function_requires<
+       detail::multi_array::CollectionConcept<IndexList> >();
+     return super_type::access_element(boost::type<element&>(),
+-                                      indices,origin(),
++                                      indexlist,origin(),
+                                       this->shape(),this->strides(),
+                                       this->index_bases());
+   }
+@@ -535,11 +535,11 @@ public:
+ #endif // BOOST_MSVC
+   typename array_view<NDims>::type 
+   operator[](const detail::multi_array::
+-             index_gen<NumDims,NDims>& indices) {
++             index_gen<NumDims,NDims>& indexlist) {
+     typedef typename array_view<NDims>::type return_type;
+     return
+       super_type::generate_array_view(boost::type<return_type>(),
+-                                      indices,
++                                      indexlist,
+                                       this->shape(),
+                                       this->strides(),
+                                       this->index_bases(),
+@@ -576,10 +576,10 @@ public:
+   const element* data() const { return super_type::data(); }
+ 
+   template <class IndexList>
+-  const element& operator()(const IndexList& indices) const {
++  const element& operator()(const IndexList& indexlist) const {
+     boost::function_requires<
+       detail::multi_array::CollectionConcept<IndexList> >();
+-    return super_type::operator()(indices);
++    return super_type::operator()(indexlist);
+   }
+ 
+   const_reference operator[](index idx) const {
+@@ -597,9 +597,9 @@ public:
+ #endif // BOOST_MSVC
+   typename const_array_view<NDims>::type 
+   operator[](const detail::multi_array::
+-             index_gen<NumDims,NDims>& indices)
++             index_gen<NumDims,NDims>& indexlist)
+     const {
+-    return super_type::operator[](indices);
++    return super_type::operator[](indexlist);
+   }
+   
+   const_iterator begin() const {
+@@ -623,8 +623,8 @@ protected:
+   explicit multi_array_ref(T* base,
+                            const storage_order_type& so,
+                            const index* index_bases_,
+-                           const size_type* extents) :
+-    super_type(base,so,index_bases_,extents) { }
++                           const size_type* extentlist) :
++    super_type(base,so,index_bases_,extentlist) { }
+ 
+ };
+ 
 --- misc/boost_1_44_0/boost/token_functions.hpp	2010-06-12 14:06:28.000000000 +0200
 +++ misc/build/boost_1_44_0/boost/token_functions.hpp	2012-06-06 23:12:27.000000000 +0200
 @@ -285,7 +285,7 @@


More information about the Libreoffice-commits mailing list