summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-11-27 21:19:21 (GMT)
committerWaldemar Brodkorb <wbx@openadk.org>2016-11-27 21:20:13 (GMT)
commit739d512289d14ade82e9fbae7f4371e65989622f (patch)
tree66c17c7e39a041169e08ea7137f072e3b65ab945
parentd47894abb5304cf3bb30b3669e596d648b5277ba (diff)
add three library methods, static, shared or both
Rename the static symbol and add the choice to a more visible place for users.
-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 9ab3c83..f089a35 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 40a7916..2129945 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 7602b46..b501d5a 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 eb0336c..38e65b8 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 497de4c..bf12c51 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 ed18ccc..e9c70f6 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 7ad9e9f..4edfc4b 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 2c2d99f..dcee96c 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 4cda838..eb7cb98 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 fa0cec5..adeff7f 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 55a3d5c..bb3ae87 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 b6f0a55..e9ae22b 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 596a488..1f0353b 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 b447a5f..4b45898 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 b06e726..3ada9f2 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 33ca126..5936dec 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 16131ff..8a63931 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 0e15746..a7bd3a8 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 c0336e3..e64d3fe 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 cba92d8..9508e1a 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 47c2b7b..bded344 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 8e870e5..32e8b33 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 0a36e84..cf03547 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 93d57db..c472268 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 7481a0c..ab4b634 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 9f7195b..9fad7e6 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 a65da24..45670b3 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 4cbe8d1..f0d1b71 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 efc2249..ba71d59 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 4faa137..21c5810 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 d26ea41..1b5c45f 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