summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/pkg-bottom.mk2
-rw-r--r--mk/vars.mk2
-rw-r--r--package/expat/Makefile9
-rw-r--r--package/gdbserver/Makefile2
-rw-r--r--package/ncurses/Makefile5
-rw-r--r--package/zlib/Makefile5
-rw-r--r--target/config/Config.in.toolchain4
-rw-r--r--toolchain/gcc/Makefile3
-rw-r--r--toolchain/uclibc-ng/Makefile5
9 files changed, 32 insertions, 5 deletions
diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk
index 21e8abed2..2b4957266 100644
--- a/mk/pkg-bottom.mk
+++ b/mk/pkg-bottom.mk
@@ -19,7 +19,7 @@ endif
ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
CONFIGURE_LIB:=--enable-static --disable-shared
endif
-ifeq ($(ADK_TARGET_USE_SHARED_AND_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_SHARED_AND_STATIC_LIBS)$(ADK_TARGET_USE_STATIC_AND_SHARED_LIBS),y)
CONFIGURE_LIB:=--enable-static --enable-shared
endif
diff --git a/mk/vars.mk b/mk/vars.mk
index 6c2a813b1..bd4b2442a 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -201,7 +201,7 @@ TARGET_LDFLAGS+= -Wl,--secure-plt
endif
endif
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY)$(ADK_TARGET_USE_STATIC_AND_SHARED_LIBS),y)
TARGET_CFLAGS+= -static
TARGET_CXXFLAGS+= -static
TARGET_LDFLAGS+= -static
diff --git a/package/expat/Makefile b/package/expat/Makefile
index 47b4328ce..2bb86dd21 100644
--- a/package/expat/Makefile
+++ b/package/expat/Makefile
@@ -4,9 +4,9 @@
include ${ADK_TOPDIR}/rules.mk
PKG_NAME:= expat
-PKG_VERSION:= 2.2.3
+PKG_VERSION:= 2.2.5
PKG_RELEASE:= 1
-PKG_HASH:= b31890fb02f85c002a67491923f89bda5028a880fd6c374f707193ad81aace5f
+PKG_HASH:= d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6
PKG_DESCR:= xml parsing library
PKG_SECTION:= libs/data
PKG_NEEDS:= c++
@@ -23,6 +23,11 @@ include ${ADK_TOPDIR}/mk/package.mk
$(eval $(call HOST_template,LIBEXPAT,libexpat,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,LIBEXPAT,libexpat,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+ifeq ($(ADK_TARGET_USE_STATIC_AND_SHARED_LIBS),y)
+TARGET_CFLAGS:= $(filter-out -static,$(TARGET_CFLAGS))
+TARGET_LDFLAGS:=$(filter-out -static,$(TARGET_LDFLAGS))
+endif
+
libexpat-install:
${INSTALL_DIR} ${IDIR_LIBEXPAT}/usr/lib
${CP} ${WRKINST}/usr/lib/libexpat.so* ${IDIR_LIBEXPAT}/usr/lib/
diff --git a/package/gdbserver/Makefile b/package/gdbserver/Makefile
index e31c4df3c..f254da653 100644
--- a/package/gdbserver/Makefile
+++ b/package/gdbserver/Makefile
@@ -29,7 +29,7 @@ include ${ADK_TOPDIR}/mk/package.mk
$(eval $(call PKG_template,GDBSERVER,gdbserver,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-ifneq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS_ONLY),)
+ifneq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS_ONLY)$(ADK_TARGET_USE_STATIC_AND_SHARED_LIBS),)
TARGET_LDFLAGS+= -static-libstdc++
CONFIGURE_ARGS+= --disable-build-with-cxx --with-libthread-db=$(STAGING_TARGET_DIR)/usr/lib/libthread_db.a
endif
diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile
index e64d3fe59..2b2c3d2d1 100644
--- a/package/ncurses/Makefile
+++ b/package/ncurses/Makefile
@@ -26,6 +26,11 @@ include ${ADK_TOPDIR}/mk/package.mk
$(eval $(call HOST_template,LIBNCURSES,libncurses,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,LIBNCURSES,libncurses,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+ifeq ($(ADK_TARGET_USE_STATIC_AND_SHARED_LIBS),y)
+TARGET_CFLAGS:= $(filter-out -static,$(TARGET_CFLAGS))
+TARGET_LDFLAGS:=$(filter-out -static,$(TARGET_LDFLAGS))
+endif
+
ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
CONFIGURE_ARGS+= --with-static
else
diff --git a/package/zlib/Makefile b/package/zlib/Makefile
index f77620608..10ba76375 100644
--- a/package/zlib/Makefile
+++ b/package/zlib/Makefile
@@ -19,6 +19,11 @@ include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call HOST_template,ZLIB,zlib,$(PKG_VERSION)-$(PKG_RELEASE)))
$(eval $(call PKG_template,ZLIB,zlib,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
+ifeq ($(ADK_TARGET_USE_STATIC_AND_SHARED_LIBS),y)
+TARGET_CFLAGS:= $(filter-out -static,$(TARGET_CFLAGS))
+TARGET_LDFLAGS:=$(filter-out -static,$(TARGET_LDFLAGS))
+endif
+
HOST_STYLE:= auto
HOST_CONFIG_STYLE:= manual
HOST_CONFIGURE_ENV+= uname=Linux
diff --git a/target/config/Config.in.toolchain b/target/config/Config.in.toolchain
index 91aec0b8c..75e885f65 100644
--- a/target/config/Config.in.toolchain
+++ b/target/config/Config.in.toolchain
@@ -21,6 +21,10 @@ config ADK_TARGET_USE_SHARED_AND_STATIC_LIBS
bool "Create shared and static libraries and link dynamically"
depends on !ADK_TARGET_BINFMT_FLAT && !ADK_TARGET_BINFMT_DSBT
+config ADK_TARGET_USE_STATIC_AND_SHARED_LIBS
+ bool "Create static and shared libraries and link statically"
+ depends on !ADK_TARGET_BINFMT_FLAT && !ADK_TARGET_BINFMT_DSBT
+
endchoice
config ADK_TARGET_LIBC_WITH_LOCALE
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 095e6649a..929cf8a79 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -21,6 +21,9 @@ TARGET_CFLAGS:= $(filter-out -msep-data,$(TARGET_CFLAGS))
TARGET_CXXFLAGS:= $(filter-out -msep-data,$(TARGET_CXXFLAGS))
endif
+TARGET_CFLAGS:= $(filter-out -static,$(TARGET_CFLAGS))
+TARGET_CXXFLAGS:= $(filter-out -static,$(TARGET_CXXFLAGS))
+
GCC_CONFOPTS:= --prefix=$(TOOLCHAIN_DIR)/usr \
--with-bugurl="http://www.openadk.org/" \
--build=$(GNU_HOST_NAME) \
diff --git a/toolchain/uclibc-ng/Makefile b/toolchain/uclibc-ng/Makefile
index 3d07abac0..a31f4e3af 100644
--- a/toolchain/uclibc-ng/Makefile
+++ b/toolchain/uclibc-ng/Makefile
@@ -16,6 +16,11 @@ TARGET_LDFLAGS:=$(filter-out -fstack-protector-all,$(TARGET_LDFLAGS))
# don't use fast-math for C library
TARGET_CFLAGS:= $(filter-out -ffast-math,$(TARGET_CFLAGS))
+ifeq ($(ADK_TARGET_USE_STATIC_AND_SHARED_LIBS),y)
+TARGET_CFLAGS:= $(filter-out -static,$(TARGET_CFLAGS))
+TARGET_LDFLAGS:=$(filter-out -static,$(TARGET_LDFLAGS))
+endif
+
ifeq ($(ADK_BUILD_COMPILER_GCC),y)
ifeq ($(ADK_TARGET_HARD_FLOAT),y)
ifeq ($(ADK_TARGET_HARD_FLOAT_SP),y)