This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository grass.
commit e435d03ed2b777522522e8f1946d1583fd0f1b3f Author: Bas Couwenberg <[email protected]> Date: Thu Jun 30 21:47:01 2016 +0200 Add upstream patch to fix FTBFS with GCC 6. --- debian/changelog | 7 ++ debian/patches/series | 1 + ...rs-only-for-C++-versions-older-than-C++11.patch | 107 +++++++++++++++++++++ 3 files changed, 115 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8596b58..8b72058 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grass (7.0.4-3) UNRELEASED; urgency=medium + + * Add upstream patch to fix FTBFS with GCC 6. + (closes: #811886) + + -- Bas Couwenberg <[email protected]> Thu, 30 Jun 2016 21:46:24 +0200 + grass (7.0.4-2) unstable; urgency=medium * Add patches by Alexis Bienvenüe to make the build reproducible. diff --git a/debian/patches/series b/debian/patches/series index 9a5fa37..915f048 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,4 @@ sort-dbmscap.patch sort-obj-files.patch srand48_auto-from-SOURCE_DATE_EPOCH.patch binary-nad-install.patch +use-exception-specifiers-only-for-C++-versions-older-than-C++11.patch diff --git a/debian/patches/use-exception-specifiers-only-for-C++-versions-older-than-C++11.patch b/debian/patches/use-exception-specifiers-only-for-C++-versions-older-than-C++11.patch new file mode 100644 index 0000000..581f18c --- /dev/null +++ b/debian/patches/use-exception-specifiers-only-for-C++-versions-older-than-C++11.patch @@ -0,0 +1,107 @@ +Description: Use exception specifiers only for C++ versions older than C++11. + . + Tested using GCC 5.2.1. + . + No exception specifiers (throw(...)) fail with -std=c++98 -fexceptions. + Omitting noexcept (or throw()) fails with -std=c++11 and -std=c++14. + . + Using cplusplus to get C++ standard version which defines + how the definitions in the standard library look like + and using GRASS_MM_USE_EXCEPTION_SPECIFIER we then use the right ones. + . + This contains old fix for -fexceptions with GCC 4.7 (see #1533, r50130) + and new fix for GCC 6 where -std=gnu++14 is by default (see #2871 + and Debian Bug 811886). + . + Works also with clang++ -std=c++14. +Author: Vaclav Petras <[email protected]> +Origin: https://trac.osgeo.org/grass/changeset/68818 +Bug: https://trac.osgeo.org/grass/ticket/2871 +Bug-Debian: https://bugs.debian.org/811886 + +--- a/include/iostream/mm.h ++++ b/include/iostream/mm.h +@@ -39,6 +39,11 @@ + + #include <sys/types.h> + ++// GCC with C++98 and -fexceptions requires exception ++// specifiers, however with C++11 and newer, using them causes an error. ++#if __cplusplus < 201103L ++#define GRASS_MM_USE_EXCEPTION_SPECIFIER ++#endif /* __cplusplus < 201103L */ + + #define MM_REGISTER_VERSION 2 + +@@ -128,10 +133,17 @@ public: + void print(); + + friend class mm_register_init; +- friend void * operator new(size_t) throw(std::bad_alloc); +- friend void * operator new[](size_t) throw(std::bad_alloc); ++#ifdef GRASS_MM_USE_EXCEPTION_SPECIFIER ++ friend void * operator new(size_t) throw (std::bad_alloc); ++ friend void * operator new[] (size_t) throw (std::bad_alloc); + friend void operator delete(void *) throw(); + friend void operator delete[](void *) throw(); ++#else ++ friend void * operator new(size_t); ++ friend void * operator new[] (size_t); ++ friend void operator delete(void *) noexcept; ++ friend void operator delete[](void *) noexcept; ++#endif /* GRASS_MM_USE_EXCEPTION_SPECIFIER */ + }; + + +--- a/lib/iostream/mm.cpp ++++ b/lib/iostream/mm.cpp +@@ -276,7 +276,11 @@ MM_err MM_register::register_deallocatio + + + /* ************************************************************ */ +-void* operator new[] (size_t sz) throw(std::bad_alloc) { ++#ifdef GRASS_MM_USE_EXCEPTION_SPECIFIER ++void* operator new[] (size_t sz) throw (std::bad_alloc) { ++#else ++void* operator new[] (size_t sz) { ++#endif /* GRASS_MM_USE_EXCEPTION_SPECIFIER */ + void *p; + + MM_DEBUG cout << "new: sz=" << sz << ", register " +@@ -327,7 +331,11 @@ void* operator new[] (size_t sz) throw(s + + + /* ************************************************************ */ +-void* operator new (size_t sz) throw(std::bad_alloc) { ++#ifdef GRASS_MM_USE_EXCEPTION_SPECIFIER ++void* operator new (size_t sz) throw (std::bad_alloc) { ++#else ++void* operator new (size_t sz) { ++#endif /* GRASS_MM_USE_EXCEPTION_SPECIFIER */ + void *p; + + MM_DEBUG cout << "new: sz=" << sz << ", register " +@@ -379,7 +387,11 @@ void* operator new (size_t sz) throw(std + + + /* ---------------------------------------------------------------------- */ ++#ifdef GRASS_MM_USE_EXCEPTION_SPECIFIER + void operator delete (void *ptr) throw() { ++#else ++void operator delete (void *ptr) noexcept { ++#endif /* GRASS_MM_USE_EXCEPTION_SPECIFIER */ + size_t sz; + void *p; + +@@ -419,7 +431,11 @@ void operator delete (void *ptr) throw() + + + /* ---------------------------------------------------------------------- */ ++#ifdef GRASS_MM_USE_EXCEPTION_SPECIFIER + void operator delete[] (void *ptr) throw() { ++#else ++void operator delete[] (void *ptr) noexcept { ++#endif /* GRASS_MM_USE_EXCEPTION_SPECIFIER */ + size_t sz; + void *p; + -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/grass.git _______________________________________________ Pkg-grass-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

