Browse Source

add three library methods, static, shared or both

Rename the static symbol and add the choice to a more
visible place for users.
Waldemar Brodkorb 7 years ago
parent
commit
739d512289

+ 1 - 1
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 \

+ 1 - 1
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)}

+ 6 - 2
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
 

+ 1 - 1
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

+ 1 - 1
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
 

+ 1 - 1
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

+ 2 - 2
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
 

+ 1 - 1
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

+ 1 - 1
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
 

+ 1 - 1
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 \

+ 1 - 1
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
 

+ 1 - 1
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)

+ 1 - 1
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

+ 1 - 1
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

+ 1 - 1
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
 

+ 1 - 1
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)

+ 1 - 1
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
 

+ 1 - 1
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)

+ 1 - 1
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

+ 2 - 2
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

+ 1 - 1
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

+ 2 - 2
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}

+ 1 - 1
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
 

+ 1 - 1
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

+ 1 - 1
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),)

+ 1 - 1
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

+ 2 - 2
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
 

+ 4 - 4
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

+ 21 - 11
target/config/Config.in.toolchain

@@ -1,10 +1,30 @@
 # This file is part of the OpenADK project. OpenADK is copyrighted
 # material, please see the LICENCE file in the top-level directory.
 
+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

+ 1 - 1
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'

+ 1 - 1
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