kumquat-buildroot/package/odb/0004-Make-compilable-with-GCC-6-in-C-14-mode.patch
Adam Duskett b2266009be package/odb: new package
ODB is an open-source, cross-platform, and cross-database
object-relational mapping (ORM) system for C++. It allows you to
persist C++ objects to a relational database without having to deal
with tables, columns, or SQL and without manually writing any mapping
code.

ODB supports MySQL, SQLite, PostgreSQL, Oracle, and Microsoft SQL
Server relational databases as well as C++98/03 and C++11 language
standards.  It also comes with optional profiles for Boost and Qt
which allow you to seamlessly use value types, containers, and smart
pointers from these libraries in your persistent C++ classes.

This package is used for auto-generating ODB specific header files
into useable code that can be linked against a seperate libodb and a
specific libodb database library.  As such, it is only needed as a
host program and is not user selectable.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
[Kamel: Fix incorrect odb license]
Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
[Thomas: add patch fixing gcc10 build, add references to upstream
commits]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-07-12 12:44:43 +02:00

49 lines
1.5 KiB
Diff

From 4584b69c45b701c3689d6a974f1ee560a79a243e Mon Sep 17 00:00:00 2001
From: Boris Kolpackov <boris@codesynthesis.com>
Date: Mon, 8 Feb 2016 18:39:21 +0200
Subject: [PATCH] Make compilable with GCC 6 in C++14 mode
[Upstream: 61d13eb53ade9f30a64892a901401bda5e42c335]
Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
---
odb/gcc.hxx | 9 ++++++---
odb/parser.cxx | 2 ++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/odb/gcc.hxx b/odb/gcc.hxx
index 858d685..a22357d 100644
--- a/odb/gcc.hxx
+++ b/odb/gcc.hxx
@@ -7,9 +7,12 @@
#include <odb/gcc-fwd.hxx>
-#if BUILDING_GCC_MAJOR >= 6
-# include <safe-ctype.h> // See gcc-fwd.hxx.
-#endif
+// Actually, let's keep it out. With it included we can compile in C++98
+// but not in C++14 (GCC 6 default).
+//
+// #if BUILDING_GCC_MAJOR >= 6
+// # include <safe-ctype.h> // See gcc-fwd.hxx.
+// #endif
// GCC header includes to get the plugin and parse tree declarations.
// The order is important and doesn't follow any kind of logic.
diff --git a/odb/parser.cxx b/odb/parser.cxx
index feda9d4..a9d22fb 100644
--- a/odb/parser.cxx
+++ b/odb/parser.cxx
@@ -1831,6 +1831,8 @@ create_type (tree t,
// the array type. In other words, we view it as "constant array"
// rather than "array of constant elements".
//
+ using semantics::array; // vs std::array.
+
tree bt (TREE_TYPE (t));
tree bt_mv (TYPE_MAIN_VARIANT (bt));
type& bt_node (emit_type (bt_mv, access::public_, file, line, clmn));
--
2.25.0