summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/build.mk2
-rw-r--r--mk/package.mk2
-rw-r--r--mk/pkg-bottom.mk8
-rw-r--r--mk/vars.mk2
-rw-r--r--package/bluez/Makefile2
-rw-r--r--package/boost/Makefile2
-rw-r--r--package/bzip2/Makefile4
-rw-r--r--package/e2fsprogs/Makefile2
-rw-r--r--package/file/Makefile2
-rw-r--r--package/glibc/Makefile2
-rw-r--r--package/libevent/Makefile2
-rw-r--r--package/libgcc/Makefile2
-rw-r--r--package/libgfortran/Makefile2
-rw-r--r--package/libgo/Makefile2
-rw-r--r--package/libpthread-stubs/Makefile2
-rw-r--r--package/libthread_db/Makefile2
-rw-r--r--package/lvm/Makefile2
-rw-r--r--package/musl/Makefile2
-rw-r--r--package/ncurses/Makefile2
-rw-r--r--package/parted/Makefile4
-rw-r--r--package/pkgconf/Makefile2
-rw-r--r--package/python2/Makefile4
-rw-r--r--package/sqlite/Makefile2
-rw-r--r--package/sudo/Makefile2
-rw-r--r--package/uclibc-ng-test/Makefile2
-rw-r--r--package/x11vnc/Makefile2
-rw-r--r--package/zlib/Makefile4
-rw-r--r--target/config/Config.in.cpu8
-rw-r--r--target/config/Config.in.toolchain32
-rw-r--r--toolchain/gcc/Makefile2
-rw-r--r--toolchain/uclibc-ng/Makefile2
31 files changed, 63 insertions, 49 deletions
diff --git a/mk/build.mk b/mk/build.mk
index 9ab3c83d6..f089a35c2 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -39,7 +39,7 @@ DEFCONFIG= ADK_DEBUG=n \
ADK_TARGET_USE_GOLD=n \
ADK_TARGET_USE_GNU_HASHSTYLE=n \
ADK_TARGET_USE_PIE=n \
- ADK_TARGET_USE_STATIC_LIBS=n \
+ ADK_TARGET_USE_STATIC_LIBS_ONLY=n \
ADK_TARGET_USE_LD_RELRO=n \
ADK_TARGET_USE_LD_BIND_NOW=n \
ADK_TARGET_USE_LD_GC=n \
diff --git a/mk/package.mk b/mk/package.mk
index 40a791616..21299455d 100644
--- a/mk/package.mk
+++ b/mk/package.mk
@@ -113,7 +113,7 @@ IDIR_$(1)_DEV= $(WRKDIR)/fake-${ADK_TARGET_CPU_ARCH}/pkg-$(2)-dev
IDIR_$(1)_DBG= $(WRKDIR)/fake-${ADK_TARGET_CPU_ARCH}/pkg-$(2)-dbg
ifneq (${ADK_PACKAGE_$(1)}${DEVELOPER},)
ifneq (,$(filter dev,$(7)))
-ifneq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifneq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
ifneq ($(ADK_TARGET_BINFMT_FLAT),y)
ALL_IPKGS+= $$(IPKG_$(1))
ALL_IDIRS+= $${IDIR_$(1)}
diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk
index 7602b4674..b501d5a28 100644
--- a/mk/pkg-bottom.mk
+++ b/mk/pkg-bottom.mk
@@ -13,9 +13,13 @@
PKG_LIBNAME?= $(PKG_NAME)
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_SHARED_LIBS_ONLY),y)
+CONFIGURE_LIB:=--disable-static --enable-shared
+endif
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
CONFIGURE_LIB:=--enable-static --disable-shared
-else
+endif
+ifeq ($(ADK_TARGET_USE_SHARED_AND_STATIC_LIBS),y)
CONFIGURE_LIB:=--enable-static --enable-shared
endif
diff --git a/mk/vars.mk b/mk/vars.mk
index eb0336cf2..38e65b80d 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),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
TARGET_CFLAGS+= -static
TARGET_CXXFLAGS+= -static
TARGET_LDFLAGS+= -static
diff --git a/package/bluez/Makefile b/package/bluez/Makefile
index 497de4c4f..bf12c5187 100644
--- a/package/bluez/Makefile
+++ b/package/bluez/Makefile
@@ -21,7 +21,7 @@ $(eval $(call PKG_template,BLUEZ,bluez,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPEN
TARGET_LDFLAGS+= -lncurses
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
XAKE_FLAGS+= CCLD="$(TARGET_CC) -all-static -pthread"
endif
diff --git a/package/boost/Makefile b/package/boost/Makefile
index ed18cccb0..e9c70f6f6 100644
--- a/package/boost/Makefile
+++ b/package/boost/Makefile
@@ -135,7 +135,7 @@ PYTHON_INCLUDE:="`find ${STAGING_TARGET_DIR}/usr/include/ -maxdepth 1 -type d -n
PYTHON_LIB:= "`find ${STAGING_TARGET_DIR}/usr/lib/ -maxdepth 1 -type d -name "python*" | head -1`"
USER_JAM:= ${WRKBUILD}/tools/build/user-config.jam
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS)$(ADK_TARGET_BINFMT_FLAT),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY)$(ADK_TARGET_BINFMT_FLAT),y)
LINKMODE:= static
else
LINKMODE:= shared
diff --git a/package/bzip2/Makefile b/package/bzip2/Makefile
index 7ad9e9f97..4edfc4b7a 100644
--- a/package/bzip2/Makefile
+++ b/package/bzip2/Makefile
@@ -34,7 +34,7 @@ $(eval $(call PKG_template,LIBBZ2,libbz2,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_
HOST_STYLE:= manual
HOST_MAKE_FILE:= Makefile
-ifneq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifneq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
MAKE_FILE:= Makefile-libbz2_so
BIN_FILE:= bzip2-shared
else
@@ -57,7 +57,7 @@ bzip2-hostinstall:
do-install:
${INSTALL_DIR} $(STAGING_TARGET_DIR)/usr/include
$(CP) $(WRKBUILD)/bzlib.h $(STAGING_TARGET_DIR)/usr/include
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
$(CP) ${WRKBUILD}/libbz2.a ${STAGING_TARGET_DIR}/usr/lib
endif
diff --git a/package/e2fsprogs/Makefile b/package/e2fsprogs/Makefile
index 2c2d99f1d..dcee96ce2 100644
--- a/package/e2fsprogs/Makefile
+++ b/package/e2fsprogs/Makefile
@@ -64,7 +64,7 @@ HOST_CONFIGURE_ARGS+= --disable-rpath \
--disable-defrag \
--disable-debugfs
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
CONFIGURE_ARGS+= --disable-elf-shlibs
else
CONFIGURE_ARGS+= --enable-elf-shlibs
diff --git a/package/file/Makefile b/package/file/Makefile
index 4cda8385e..eb7cb98e5 100644
--- a/package/file/Makefile
+++ b/package/file/Makefile
@@ -35,7 +35,7 @@ $(eval $(call PKG_template,MAGIC,magic,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_MAG
AUTOTOOL_STYLE:= autoreconf
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
MAKE_FLAGS+= LDFLAGS="$(TARGET_LDFLAGS) -all-static"
endif
diff --git a/package/glibc/Makefile b/package/glibc/Makefile
index fa0cec5e6..adeff7f07 100644
--- a/package/glibc/Makefile
+++ b/package/glibc/Makefile
@@ -45,7 +45,7 @@ INSTALL_STYLE:= manual
# compile nothing, glibc is already build in toolchain directory
do-install:
-ifneq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifneq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
${INSTALL_DIR} ${IDIR_GLIBC}/$(ADK_TARGET_LIBC_PATH)
$(CP) $(STAGING_TARGET_DIR)/lib/ld*.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH)
for file in libc libpthread librt libcrypt libdl libm libnsl libresolv libutil libnss_dns libnss_files; do \
diff --git a/package/libevent/Makefile b/package/libevent/Makefile
index 55a3d5ca6..bb3ae87d7 100644
--- a/package/libevent/Makefile
+++ b/package/libevent/Makefile
@@ -20,7 +20,7 @@ include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call PKG_template,LIBEVENT,libevent,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
MAKE_FLAGS+= LDFLAGS="$(TARGET_LDFLAGS) -all-static"
endif
diff --git a/package/libgcc/Makefile b/package/libgcc/Makefile
index b6f0a55dd..e9ae22b86 100644
--- a/package/libgcc/Makefile
+++ b/package/libgcc/Makefile
@@ -23,7 +23,7 @@ INSTALL_STYLE:= manual
libgcc-install:
$(INSTALL_DIR) ${IDIR_LIBGCC}/$(ADK_TARGET_LIBC_PATH)
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),)
ifeq ($(ADK_TARGET_ARCH_SH),y)
ifeq ($(ADK_TARGET_CPU_SH_SH3),y)
${CP} ${STAGING_TARGET_DIR}/usr/lib/!m3*/libgcc*.so* ${IDIR_LIBGCC}/$(ADK_TARGET_LIBC_PATH)
diff --git a/package/libgfortran/Makefile b/package/libgfortran/Makefile
index 596a4887c..1f0353bea 100644
--- a/package/libgfortran/Makefile
+++ b/package/libgfortran/Makefile
@@ -23,7 +23,7 @@ INSTALL_STYLE:= manual
libgfortran-install:
$(INSTALL_DIR) ${IDIR_LIBGFORTRAN}/$(ADK_TARGET_LIBC_PATH)
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),)
ifeq ($(ADK_TARGET_BINFMT_FLAT),)
${CP} ${STAGING_TARGET_DIR}/usr/lib/libgfortran.so* ${IDIR_LIBGFORTRAN}/$(ADK_TARGET_LIBC_PATH)
endif
diff --git a/package/libgo/Makefile b/package/libgo/Makefile
index b447a5fc3..4b4589885 100644
--- a/package/libgo/Makefile
+++ b/package/libgo/Makefile
@@ -24,7 +24,7 @@ INSTALL_STYLE:= manual
libgo-install:
$(INSTALL_DIR) ${IDIR_LIBGO}/$(ADK_TARGET_LIBC_PATH)
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),)
ifeq ($(ADK_TARGET_BINFMT_FLAT),)
${CP} ${STAGING_TARGET_DIR}/usr/lib/libgo.so* ${IDIR_LIBGO}/$(ADK_TARGET_LIBC_PATH)
endif
diff --git a/package/libpthread-stubs/Makefile b/package/libpthread-stubs/Makefile
index b06e726bf..3ada9f220 100644
--- a/package/libpthread-stubs/Makefile
+++ b/package/libpthread-stubs/Makefile
@@ -22,7 +22,7 @@ include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call HOST_template,LIBPTHREAD_STUBS,libpthread-stubs,$(PKG_VERSION)-${PKG_RELEASE}))
$(eval $(call PKG_template,LIBPTHREAD_STUBS,libpthread-stubs,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
TARGET_LDFLAGS+= -pthread
endif
diff --git a/package/libthread_db/Makefile b/package/libthread_db/Makefile
index 33ca12679..5936decc6 100644
--- a/package/libthread_db/Makefile
+++ b/package/libthread_db/Makefile
@@ -31,7 +31,7 @@ BUILD_STYLE:= manual
INSTALL_STYLE:= manual
do-install:
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),)
ifeq ($(ADK_TARGET_LIB_MUSL),)
ifeq (${ADK_TARGET_UCLINUX},)
${INSTALL_DIR} ${IDIR_LIBTHREAD_DB}/$(ADK_TARGET_LIBC_PATH)
diff --git a/package/lvm/Makefile b/package/lvm/Makefile
index 16131ff95..8a63931b8 100644
--- a/package/lvm/Makefile
+++ b/package/lvm/Makefile
@@ -32,7 +32,7 @@ $(eval $(call PKG_template,LVM,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_D
$(eval $(call PKG_template,DEVICE_MAPPER,device-mapper,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_DEVICE_MAPPER},${PKG_SECTION}))
$(eval $(call PKG_template,LIBDEVMAPPER,libdevmapper,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBDEVMAPPER},${PKGSC_LIBDEVMAPPER},${PKG_OPTS}))
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
CONFIGURE_ARGS+= --enable-static_link
endif
diff --git a/package/musl/Makefile b/package/musl/Makefile
index 0e1574695..a7bd3a80d 100644
--- a/package/musl/Makefile
+++ b/package/musl/Makefile
@@ -84,7 +84,7 @@ endif
# do nothing, musl is already build in toolchain directory
do-install:
-ifneq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifneq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
${INSTALL_DIR} $(IDIR_MUSL)/bin
${INSTALL_DIR} $(IDIR_MUSL)/$(ADK_TARGET_LIBC_PATH)
$(CP) $(STAGING_TARGET_DIR)/usr/lib/libc.so $(IDIR_MUSL)/$(ADK_TARGET_LIBC_PATH)
diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile
index c0336e366..e64d3fe59 100644
--- a/package/ncurses/Makefile
+++ b/package/ncurses/Makefile
@@ -26,7 +26,7 @@ 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_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
CONFIGURE_ARGS+= --with-static
else
CONFIGURE_ARGS+= --with-shared
diff --git a/package/parted/Makefile b/package/parted/Makefile
index cba92d8aa..9508e1ab2 100644
--- a/package/parted/Makefile
+++ b/package/parted/Makefile
@@ -23,7 +23,7 @@ ifeq ($(ADK_TARGET_LIBICONV_TINY),y)
TARGET_LDFLAGS+= -liconv
endif
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
CONFIGURE_ARGS+= --disable-dynamic-loading
endif
@@ -31,7 +31,7 @@ CONFIGURE_ARGS+= --disable-device-mapper \
--without-readline
parted-install:
-ifneq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifneq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
$(INSTALL_DIR) $(IDIR_PARTED)/usr/lib
$(CP) $(WRKINST)/usr/lib/libparted*so* $(IDIR_PARTED)/usr/lib
endif
diff --git a/package/pkgconf/Makefile b/package/pkgconf/Makefile
index 47c2b7b78..bded34468 100644
--- a/package/pkgconf/Makefile
+++ b/package/pkgconf/Makefile
@@ -23,7 +23,7 @@ $(eval $(call PKG_template,PKGCONF,pkgconf,$(PKG_VERSION)-${PKG_RELEASE},${PKG_D
hostpost-install:
$(CP) ./files/pkg-config $(STAGING_HOST_DIR)/usr/bin
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
PATH="$(HOST_PATH)" $(SED) "s#@@OPTS@@#--static#" $(STAGING_HOST_DIR)/usr/bin/pkg-config
else
PATH="$(HOST_PATH)" $(SED) "s#@@OPTS@@##" $(STAGING_HOST_DIR)/usr/bin/pkg-config
diff --git a/package/python2/Makefile b/package/python2/Makefile
index 8e870e55b..32e8b33d9 100644
--- a/package/python2/Makefile
+++ b/package/python2/Makefile
@@ -83,7 +83,7 @@ $(eval $(call PKG_mod_template,PYTHON2_MOD_NCURSES,_curses))
$(eval $(call PKG_mod_template,PYTHON2_MOD_SSL,_ssl))
$(eval $(call PKG_mod_template,PYTHON2_MOD_READLINE,readline))
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
CONFIGURE_ARGS+= --disable-shared
endif
@@ -133,7 +133,7 @@ pre-configure:
$(SED) "s#@EXENAME@#$(STAGING_HOST_DIR)/usr/bin/python#" \
$(WRKBUILD)/Misc/python-config.in
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
python2-install:
else
python2-install: ${INSTALL_MODS_y} ${INSTALL_MODS_m}
diff --git a/package/sqlite/Makefile b/package/sqlite/Makefile
index 0a36e8403..cf035471f 100644
--- a/package/sqlite/Makefile
+++ b/package/sqlite/Makefile
@@ -31,7 +31,7 @@ $(eval $(call PKG_template,SQLITE_CLI,sqlite-cli,${PKG_VERSION}-${PKG_RELEASE},$
TARGET_CFLAGS:= $(filter-out -ffast-math,$(TARGET_CFLAGS))
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
CONFIGURE_ARGS+= --enable-dynamic-extensions=no
endif
diff --git a/package/sudo/Makefile b/package/sudo/Makefile
index 93d57db09..c472268a5 100644
--- a/package/sudo/Makefile
+++ b/package/sudo/Makefile
@@ -20,7 +20,7 @@ $(eval $(call PKG_template,SUDO,sudo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS
HOST_CPPFLAGS+= -I../ -I../include
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
MAKE_FLAGS+= LDFLAGS="$(TARGET_LDFLAGS) -all-static"
else
TARGET_LDFLAGS+= -ldl
diff --git a/package/uclibc-ng-test/Makefile b/package/uclibc-ng-test/Makefile
index 7481a0c27..ab4b6347c 100644
--- a/package/uclibc-ng-test/Makefile
+++ b/package/uclibc-ng-test/Makefile
@@ -34,7 +34,7 @@ endif
ifeq ($(ADK_TARGET_BINFMT_FLAT),y)
XAKE_FLAGS+= NO_DL=1
endif
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
XAKE_FLAGS+= NO_DL=1 NO_TLS=1 NO_NPTL=1
endif
ifeq ($(ADK_RUNTIME_ENABLE_LOCALE),)
diff --git a/package/x11vnc/Makefile b/package/x11vnc/Makefile
index 9f7195bc1..9fad7e631 100644
--- a/package/x11vnc/Makefile
+++ b/package/x11vnc/Makefile
@@ -20,7 +20,7 @@ include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call PKG_template,X11VNC,x11vnc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
MAKE_FLAGS+= CFLAGS="${TARGET_CFLAGS} -static" \
LIBS="-lxcb -lXau -lXdmcp -ldl -pthread -ljpeg -lz"
endif
diff --git a/package/zlib/Makefile b/package/zlib/Makefile
index a65da241f..45670b36c 100644
--- a/package/zlib/Makefile
+++ b/package/zlib/Makefile
@@ -20,12 +20,12 @@ $(eval $(call PKG_template,ZLIB,zlib,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS
CONFIG_STYLE:= manual
CONFIGURE_ENV+= uname=Linux
-ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS),)
+ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS_ONLY),)
CONFIGURE_OPTS:= --shared
endif
ALL_TARGET:= libz.a
-ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS),)
+ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS_ONLY),)
ALL_TARGET+= libz.so.$(PKG_VERSION)
endif
diff --git a/target/config/Config.in.cpu b/target/config/Config.in.cpu
index 4cbe8d167..f0d1b71c4 100644
--- a/target/config/Config.in.cpu
+++ b/target/config/Config.in.cpu
@@ -27,7 +27,7 @@ config ADK_TARGET_CPU_ALPHA
select ADK_LINUX_64
select ADK_TARGET_SUPPORTS_THREADS if ADK_TARGET_LIB_GLIBC
select ADK_TARGET_SUPPORTS_NPTL if ADK_TARGET_LIB_GLIBC
- select ADK_TARGET_USE_STATIC_LIBS if ADK_TARGET_LIB_UCLIBC_NG
+ select ADK_TARGET_USE_STATIC_LIBS_ONLY if ADK_TARGET_LIB_UCLIBC_NG
select ADK_TARGET_WITH_MMU
depends on ADK_TARGET_ARCH_ALPHA
@@ -466,7 +466,7 @@ config ADK_TARGET_CPU_PARISC
select ADK_TARGET_SUPPORTS_LT if ADK_TARGET_LIB_UCLIBC_NG
select ADK_TARGET_SUPPORTS_NPTL if ADK_TARGET_LIB_GLIBC
select ADK_TARGET_WITH_MMU
- select ADK_TARGET_USE_STATIC_LIBS if ADK_TARGET_LIB_UCLIBC_NG
+ select ADK_TARGET_USE_STATIC_LIBS_ONLY if ADK_TARGET_LIB_UCLIBC_NG
depends on ADK_TARGET_ARCH_HPPA
# ia64
@@ -476,7 +476,7 @@ config ADK_TARGET_CPU_IA64
select ADK_TARGET_SUPPORTS_LT if ADK_TARGET_LIB_UCLIBC_NG
select ADK_TARGET_SUPPORTS_NPTL if ADK_TARGET_LIB_GLIBC
select ADK_TARGET_WITH_MMU
- select ADK_TARGET_USE_STATIC_LIBS if ADK_TARGET_LIB_UCLIBC_NG
+ select ADK_TARGET_USE_STATIC_LIBS_ONLY if ADK_TARGET_LIB_UCLIBC_NG
depends on ADK_TARGET_ARCH_IA64
# lm32
@@ -906,7 +906,7 @@ config ADK_TARGET_CPU_NIOS2
select ADK_TARGET_SUPPORTS_LT
select ADK_TARGET_SUPPORTS_NPTL
select ADK_TARGET_WITH_MMU
- select ADK_TARGET_USE_STATIC_LIBS if ADK_TARGET_LIB_UCLIBC_NG
+ select ADK_TARGET_USE_STATIC_LIBS_ONLY if ADK_TARGET_LIB_UCLIBC_NG
depends on ADK_TARGET_ARCH_NIOS2
# openrisc
diff --git a/target/config/Config.in.toolchain b/target/config/Config.in.toolchain
index efc22490d..ba71d590e 100644
--- a/target/config/Config.in.toolchain
+++ b/target/config/Config.in.toolchain
@@ -3,8 +3,28 @@
choice
depends on ADK_TARGET_OS_LINUX
+prompt "Library support"
+
+config ADK_TARGET_USE_SHARED_LIBS_ONLY
+ bool "Create shared libraries only and link dynamically"
+
+config ADK_TARGET_USE_STATIC_LIBS_ONLY
+ bool "Create static libraries only and link statically"
+ select BUSYBOX_STATIC
+ depends on !ADK_TARGET_BINFMT_FLAT && !ADK_TARGET_BINFMT_DSBT
+ help
+ Useful for debugging of dynamic linker problems. Be aware of the fact, that uClibc and glibc
+ still requires libgcc_so.so.1 for pthread_cancel. Glibc also requires libnss_*.so libraries
+ at runtime. Full static builds are only supported for musl libc.
+
+config ADK_TARGET_USE_SHARED_AND_STATIC_LIBS
+ bool "Create shared and static libraries and link dynamically"
+
+endchoice
+
+choice
+depends on ADK_TARGET_OS_LINUX
prompt "Iconv implementation"
-bool
default ADK_TARGET_WITHOUT_ICONV if ADK_TARGET_WITHOUT_MMU
config ADK_TARGET_LIBICONV_TINY
@@ -71,7 +91,6 @@ endmenu
menu "Advanced Toolchain options"
-
config ADK_TOOLCHAIN_WITH_SSP
bool
@@ -131,15 +150,6 @@ config ADK_DEBUG_STRIP
All packages and C library will be compiled with debug information,
but stripped for the target.
-config ADK_TARGET_USE_STATIC_LIBS
- bool "Create static libraries and link applications statically for target"
- select BUSYBOX_STATIC
- depends on !ADK_TARGET_BINFMT_FLAT && !ADK_TARGET_BINFMT_DSBT
- help
- Useful for debugging of dynamic linker problems. Be aware of the fact, that uClibc and glibc
- still requires libgcc_so.so.1 for pthread_cancel. Glibc also requires libnss_*.so libraries
- at runtime. Full static builds are only supported for musl libc.
-
config ADK_STATIC_TOOLCHAIN
bool "Build the toolchain components statically (portable host binaries)"
help
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 4faa1378c..21c58100d 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -68,7 +68,7 @@ GCC_FINAL_CONFOPTS:= --disable-tls --disable-threads --disable-libatomic
GCC_TLS_CONFOPTS:= --disable-tls
endif
-ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS)$(ADK_TARGET_BINFMT_DSBT),y)
+ifeq ($(ADK_TARGET_BINFMT_FLAT)$(ADK_TARGET_USE_STATIC_LIBS_ONLY)$(ADK_TARGET_BINFMT_DSBT),y)
GCC_FINAL_CONFOPTS+= --disable-shared
else
GCC_FINAL_CONFOPTS+= --enable-shared --enable-cxx-flags='-fPIC'
diff --git a/toolchain/uclibc-ng/Makefile b/toolchain/uclibc-ng/Makefile
index d26ea41e0..1b5c45ff1 100644
--- a/toolchain/uclibc-ng/Makefile
+++ b/toolchain/uclibc-ng/Makefile
@@ -128,7 +128,7 @@ ifeq ($(ADK_TARGET_LIB_WITHOUT_THREADS)$(ADK_TARGET_WITHOUT_THREADS),y)
$(SED) 's/.*\(PTHREADS_DEBUG_SUPPORT\).*/# \1 is not set/' ${WRKBUILD}/.config
$(SED) 's/.*\(HAS_NO_THREADS\).*/\1=y/' ${WRKBUILD}/.config
endif
-ifeq ($(ADK_TARGET_USE_STATIC_LIBS)$(ADK_TARGET_BINFMT_FLAT),)
+ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY)$(ADK_TARGET_BINFMT_FLAT),)
$(SED) 's/.*\(HAVE_SHARED\).*/\1=y/' ${WRKBUILD}/.config
else
$(SED) 's/.*\(HAVE_SHARED\).*/# \1 is not set/' ${WRKBUILD}/.config