mirror of
https://github.com/novatiq/packages.git
synced 2026-04-28 22:58:38 +01:00
b8e6fc3eb7
When compiling against uClibc on lede-17.01 it's detected in the linking
phase that '__isnan' is nowhere to be found:
sqlite3-sqlite3.o: In function `serialGet':
sqlite3.c:(.text+0x6364): undefined reference to `__isnan'
sqlite3-sqlite3.o: In function `sqlite3_result_double':
sqlite3.c:(.text+0x10faa): undefined reference to `__isnan'
sqlite3-sqlite3.o: In function `sqlite3VXPrintf':
sqlite3.c:(.text+0x175ca): undefined reference to `__isnan'
sqlite3-sqlite3.o: In function `sqlite3_bind_double':
sqlite3.c:(.text+0x1b0ac): undefined reference to `__isnan'
sqlite3-sqlite3.o: In function `sqlite3VdbeExec':
sqlite3.c:(.text+0x3b77e): undefined reference to `__isnan'
collect2: error: ld returned 1 exit status
To fix this libm needs to be linked in as well in the uClibc case. So
add libm ('-lm') to the TARGET_LDFLAGS accordingly.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
113 lines
2.9 KiB
Makefile
113 lines
2.9 KiB
Makefile
#
|
|
# Copyright (C) 2006-2018 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=sqlite
|
|
PKG_VERSION:=3190300
|
|
PKG_RELEASE:=2
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
|
|
PKG_HASH:=06129c03dced9f87733a8cba408871bd60673b8f93b920ba8d815efab0a06301
|
|
PKG_SOURCE_URL:=http://www.sqlite.org/2017/
|
|
|
|
PKG_LICENSE:=PUBLICDOMAIN
|
|
PKG_LICENSE_FILES:=
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-autoconf-$(PKG_VERSION)
|
|
PKG_BUILD_DEPENDS:=libncurses libreadline
|
|
|
|
PKG_FIXUP:=autoreconf
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/sqlite3/Default
|
|
SUBMENU:=database
|
|
TITLE:=SQLite (v3.x) database engine
|
|
URL:=http://www.sqlite.org/
|
|
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
|
|
endef
|
|
|
|
define Package/sqlite3/Default/description
|
|
SQLite is a small C library that implements a self-contained, embeddable,
|
|
zero-configuration SQL database engine.
|
|
endef
|
|
|
|
define Package/libsqlite3
|
|
$(call Package/sqlite3/Default)
|
|
SECTION:=libs
|
|
CATEGORY:=Libraries
|
|
DEPENDS:=+libpthread
|
|
TITLE+= (library)
|
|
endef
|
|
|
|
define Package/libsqlite3/description
|
|
$(call Package/sqlite3/Default/description)
|
|
This package contains the SQLite (v3.x) shared library, used by other
|
|
programs.
|
|
endef
|
|
|
|
define Package/sqlite3-cli
|
|
$(call Package/sqlite3/Default)
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
DEPENDS:=+libsqlite3 +libncurses +libreadline
|
|
TITLE+= (cli)
|
|
endef
|
|
|
|
define Package/sqlite3-cli/description
|
|
$(call Package/sqlite3/Default/description)
|
|
This package contains a terminal-based front-end to the SQLite (v3.x) library
|
|
that can evaluate queries interactively and display the results in multiple
|
|
formats.
|
|
endef
|
|
|
|
# On uClibc libm needs to be linked in for ISNAN()
|
|
TARGET_LDFLAGS += $(if $(CONFIG_USE_UCLIBC),-lm)
|
|
|
|
TARGET_CFLAGS += $(FPIC) \
|
|
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
|
|
-DHAVE_ISNAN=1 \
|
|
-DHAVE_MALLOC_USABLE_SIZE=1
|
|
|
|
CONFIGURE_ARGS += \
|
|
--enable-shared \
|
|
--enable-static \
|
|
--disable-editline
|
|
|
|
CONFIGURE_VARS += \
|
|
config_BUILD_CC="$(HOSTCC)" \
|
|
config_BUILD_CFLAGS="-O2" \
|
|
config_TARGET_CC="$(TARGET_CC)" \
|
|
config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
|
|
config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
|
|
config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
|
|
|
|
define Build/InstallDev
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3{,ext}.h $(1)/usr/include/
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/
|
|
endef
|
|
|
|
define Package/libsqlite3/install
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/
|
|
endef
|
|
|
|
define Package/sqlite3-cli/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,libsqlite3))
|
|
$(eval $(call BuildPackage,sqlite3-cli))
|