tree-wide: Do not use package librt and libpthread
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 18 Dec 2022 16:32:46 +0000 (17:32 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 29 Dec 2022 17:50:24 +0000 (18:50 +0100)
The libraries libpthread, libdl, libutil, libanl have been integrated
into the libc library in version 2.34. it is not needed to explicitly
link them any more.

Most of the functions have been moved from the librt.so into libc.so
some time ago already.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/package-defaults.mk
package/network/services/hostapd/Makefile
package/system/fstools/Makefile
package/system/procd/Makefile
package/system/ubox/Makefile
package/utils/e2fsprogs/Makefile
package/utils/lua/Makefile

index 3ee3a965f20a4ebe3f9a723e76d7a1b9aa42a8bc..72f88b9bbbdd3661b1df4039a45ca4b9729c79ae 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Copyright (C) 2006-2020 OpenWrt.org
 
-PKG_DEFAULT_DEPENDS = +libc +USE_GLIBC:librt +USE_GLIBC:libpthread
+PKG_DEFAULT_DEPENDS = +libc
 
 ifneq ($(PKG_NAME),toolchain)
   PKG_FIXUP_DEPENDS = $(if $(filter kmod-%,$(1)),$(2),$(PKG_DEFAULT_DEPENDS) $(filter-out $(PKG_DEFAULT_DEPENDS),$(2)))
index 829879f7630bad9ee5a6714b027daec7124633b0..7daca315b0a4bf0b340b33fb6b8122d56b8e01a4 100644 (file)
@@ -139,11 +139,6 @@ ifneq ($(LOCAL_TYPE),hostapd)
   endif
 endif
 
-ifdef CONFIG_USE_GLIBC
-  TARGET_LDFLAGS += -lrt
-  TARGET_LDFLAGS_C += -lrt
-endif
-
 DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny
 
 
index f7cb17461c2434bf0cfbc3ca6eddbeac4ca896b7..f716f26c0565e3bfb79b21c21ed1911ee78778e7 100644 (file)
@@ -31,7 +31,6 @@ PKG_MAINTAINER:=John Crispin <john@phrozen.org>
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
 CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_UBIFS_EXTROOT),-DCMAKE_UBIFS_EXTROOT=y)
 CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_FULL_ACCESS_TIME),-DCMAKE_OVL_MOUNT_FULL_ACCESS_TIME=y)
 CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB),-DCMAKE_OVL_MOUNT_COMPRESS_ZLIB=y)
@@ -39,7 +38,7 @@ CMAKE_OPTIONS += $(if $(CONFIG_FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB),-DCMAKE_OVL_MOUN
 define Package/fstools
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+ubox +USE_GLIBC:librt +NAND_SUPPORT:ubi-utils
+  DEPENDS:=+ubox +NAND_SUPPORT:ubi-utils
   TITLE:=OpenWrt filesystem tools
   MENU:=1
 endef
index 5e9733675a6a06e29a7e11c635b4ef0c596107d9..2eebe50a4fa8db6fda6d7198430ce20379c4641d 100644 (file)
@@ -35,7 +35,6 @@ ifeq ($(DUMP),)
 endif
 
 CMAKE_OPTIONS += -DEARLY_PATH="$(TARGET_INIT_PATH)"
-TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
 
 TARGET_CFLAGS += -flto
 TARGET_LDFLAGS += -flto
@@ -43,7 +42,7 @@ TARGET_LDFLAGS += -flto
 define Package/procd/Default
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+ubusd +ubus +libjson-script +ubox +USE_GLIBC:librt +libubox \
+  DEPENDS:=+ubusd +ubus +libjson-script +ubox +libubox \
          +libubus +libblobmsg-json +libjson-c +jshn
   TITLE:=OpenWrt system process manager
   USERID:=:dialout=20 :audio=29
index ca177b2c494904c54fc44eb3e4a694f8ea2e0105..1030c14bb1af25c1d701d1316402e4306f784645 100644 (file)
@@ -18,12 +18,10 @@ PKG_MAINTAINER:=John Crispin <john@phrozen.org>
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
-TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
-
 define Package/ubox
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+libubox +ubusd +ubus +libubus +libuci +USE_GLIBC:librt
+  DEPENDS:=+libubox +ubusd +ubus +libubus +libuci
   TITLE:=OpenWrt system helper toolbox
   ALTERNATIVES:=\
     100:/sbin/rmmod:/sbin/kmodloader \
@@ -46,7 +44,7 @@ endef
 define Package/logd
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt
+  DEPENDS:=+libubox +libubus +libblobmsg-json
   TITLE:=OpenWrt system log implementation
   USERID:=logd=514:logd=514
 endef
index 2ece58f3151c5db7afefb45a25c31661eb17c2d6..94f22a53cc8138b04a320b634e118ae1229a09bf 100644 (file)
@@ -144,7 +144,6 @@ endef
 
 TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
 
-TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
 TARGET_LDFLAGS += -flto
 
 CONFIGURE_ARGS += \
index 9d7cc406712539133df8663541dc8853e5506fa9..e4d2fd1c500069a16d1ce19babf40dee37450e93 100644 (file)
@@ -99,7 +99,7 @@ define Build/Compile
                RANLIB="$(TARGET_CROSS)ranlib" \
                INSTALL_ROOT=/usr \
                CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
-               MYLDFLAGS="$(TARGET_LDFLAGS) $(if $(CONFIG_USE_GLIBC),-lm -ldl)" \
+               MYLDFLAGS="$(TARGET_LDFLAGS)" \
                PKG_VERSION=$(PKG_VERSION) \
                linux
        rm -rf $(PKG_INSTALL_DIR)