package/odb: fix build with gcc 11
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 3 Jun 2021 20:09:01 +0000 (22:09 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sat, 5 Jun 2021 12:57:38 +0000 (14:57 +0200)
Add -std=c++11 to fix the following build failure with gcc 11:

/data/buildroot-autobuilder/instance-0/output-1/host/include/cutl/shared-ptr/base.hxx:34:41: error: ISO C++17 does not allow dynamic exception specifications
   34 | operator new (std::size_t, cutl::share) throw (std::bad_alloc);
      |                                         ^~~~~

Fixes:
 - http://autobuild.buildroot.org/results/9cbb8be7a1d8ac5913fbc5e2a78c4c45b5daf8e2

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/odb/odb.mk

index 11086471e62cb4c75cedd751f17cbe33cf72d71b..85c7ccb8bbc1d18ea4aaad875a9009b9ddc50665 100644 (file)
@@ -11,6 +11,7 @@ ODB_SITE = https://www.codesynthesis.com/download/odb/$(ODB_VERSION_MAJOR)
 ODB_LICENSE = GPL-3.0
 ODB_LICENSE_FILES = LICENSE
 HOST_ODB_DEPENDENCIES = host-libcutl
+HOST_ODB_CONF_ENV = CXXFLAGS="$(HOST_CXXFLAGS) -std=c++11"
 
 # Prevent odb from trying to install the gcc plugin into the hosts
 # gcc plugin directory. Instead, this will install the gcc plugin