[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT/SQLITE 1/1] Add sqlite extension



This patch adds a config option that enables
the sqlite extensions that may be used by Python.
We also add the sqlite.h to the global headers in
order to be available to Python.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx>
---
 0001-Fix.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 Config.uk      |  4 ++++
 Makefile.uk    |  7 ++++++-
 3 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 0001-Fix.patch

diff --git a/0001-Fix.patch b/0001-Fix.patch
new file mode 100644
index 0000000..fb87899
--- /dev/null
+++ b/0001-Fix.patch
@@ -0,0 +1,48 @@
+From b05afc39ea86652a89723609ff70401eb4556b76 Mon Sep 17 00:00:00 2001
+From: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxx>
+Date: Tue, 1 Dec 2020 11:51:32 +0000
+Subject: [PATCH 1/1] Fix
+
+---
+ Config.uk   | 4 ++++
+ Makefile.uk | 8 +++++++-
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/Config.uk b/Config.uk
+index b32df59..b883326 100644
+--- a/Config.uk
++++ b/Config.uk
+@@ -10,4 +10,8 @@ if LIBSQLITE
+ config LIBSQLITE_MAIN_FUNCTION
+     bool "Provide main function"
+     default y
++
++config LIBSQLITE_ENABLE_EXTERNSIONS
++    bool "Enable mysql extensions"
++    default y
+ endif
+diff --git a/Makefile.uk b/Makefile.uk
+index f8287b7..59dfb13 100644
+--- a/Makefile.uk
++++ b/Makefile.uk
+@@ -60,10 +60,16 @@ LIBSQLITE_SRC = $(LIBSQLITE_ORIGIN)/$(LIBSQLITE_BASENAME)
+ LIBSQLITE_CINCLUDES-y += -I$(LIBSQLITE_BASE)/include
+ LIBSQLITE_CINCLUDES += -I$(LIBSQLITE_SRC)
+ 
++CINCLUDES-$(CONFIG_LIBSQLITE) += $(LIBSQLITE_CINCLUDES)
++
+ 
################################################################################
+ # Global flags
+ 
################################################################################
+-LIBSQLITE_FLAGS = -D_HAVE_SQLITE_CONFIG_H -DSQLITE_OMIT_LOAD_EXTENSION
++libsqlite_flags = -d_have_sqlite_config_h 
++ifneq ($(CONFIG_LIBSQLITE_ENABLE_EXTERNSIONS),y)
++libsqlite_flags = -DSQLITE_OMIT_LOAD_EXTENSION
++endif
++
+ 
+ # Suppress some warnings to make the build process look neater
+ LIBSQLITE_SUPPRESS_FLAGS-y += -Wno-unused-parameter -Wno-unused-variable      
        \
+-- 
+2.11.0
+
diff --git a/Config.uk b/Config.uk
index b32df59..b883326 100644
--- a/Config.uk
+++ b/Config.uk
@@ -10,4 +10,8 @@ if LIBSQLITE
 config LIBSQLITE_MAIN_FUNCTION
     bool "Provide main function"
     default y
+
+config LIBSQLITE_ENABLE_EXTERNSIONS
+    bool "Enable mysql extensions"
+    default y
 endif
diff --git a/Makefile.uk b/Makefile.uk
index f8287b7..036683a 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -60,10 +60,15 @@ LIBSQLITE_SRC = $(LIBSQLITE_ORIGIN)/$(LIBSQLITE_BASENAME)
 LIBSQLITE_CINCLUDES-y += -I$(LIBSQLITE_BASE)/include
 LIBSQLITE_CINCLUDES += -I$(LIBSQLITE_SRC)
 
+CINCLUDES-$(CONFIG_LIBSQLITE)  += $(LIBSQLITE_CINCLUDES)
+
 
################################################################################
 # Global flags
 
################################################################################
-LIBSQLITE_FLAGS = -D_HAVE_SQLITE_CONFIG_H -DSQLITE_OMIT_LOAD_EXTENSION
+LIBSQLITE_FLAGS += -D_HAVE_SQLITE_CONFIG_H
+ifneq ($(CONFIG_LIBSQLITE_ENABLE_EXTERNSIONS),y)
+LIBSQLITE_FLAGS += -DSQLITE_OMIT_LOAD_EXTENSION
+endif
 
 # Suppress some warnings to make the build process look neater
 LIBSQLITE_SUPPRESS_FLAGS-y += -Wno-unused-parameter -Wno-unused-variable       
        \
-- 
2.27.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.