Hi,

Cross-compiling SQLite from source on Linux using sqlite-autoconf-3110100, the 
--disable-static-shell option no longer works, a static-linked-sqlite3 binary 
is created.

The regression appears to have occurred here:
http://www.sqlite.org/src/fdiff?v1=1c16576507759608&v2=29e2a6e8d0c5e327&sbs=0

This patch makes --disable-static-shell work again.
========
--- sqlite-3110100/Makefile.am.orig     2016-03-10 10:12:23.000000000 -0600
+++ sqlite-3110100/Makefile.am  2016-03-10 10:14:14.000000000 -0600
@@ -6,8 +6,8 @@
 libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8

 bin_PROGRAMS = sqlite3
-sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h
-sqlite3_LDADD = @READLINE_LIBS@
+sqlite3_SOURCES = shell.c sqlite3.h
+sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@
 sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@
 sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS

========

Hmmm, removing "sqlite3.c" from sqlite3_SOURCES works even without 
--disable-static-shell specified and a static sqlite3 binary is created as 
expected.

The above patch fixes the regression for me, though it may not work with all 
possible permutations of builds.  Possibly the line:
--
EXTRA_sqlite3_SOURCES = sqlite3.c
--
still needs to be added and referenced appropriately, currently 
EXTRA_sqlite3_SOURCES is no longer referenced.

Lonnie

Reply via email to