$(call Package/gcc/Default)
NAME:=libasan
TITLE:=Runtime library for AddressSanitizer in GCC
- DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips64 @!mips64el @!arc
+ DEPENDS:=@USE_GLIBC +libstdcpp @!mips64 @!mips64el @!arc
ABI_VERSION:=5
endef
$(call Package/gcc/Default)
NAME:=libtsan
TITLE:=Runtime library for ThreadSanitizer in GCC
- DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc
+ DEPENDS:=@USE_GLIBC +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc
ABI_VERSION:=0
endef
$(call Package/gcc/Default)
NAME:=liblsan
TITLE:=Runtime library for LeakSanitizer in GCC
- DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc
+ DEPENDS:=@USE_GLIBC +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc
ABI_VERSION:=0
endef
$(call Package/gcc/Default)
NAME:=libubsan
TITLE:=Runtime library for UndefinedBehaviorSanitizer in GCC
- DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips64 @!mips64el @!arc
+ DEPENDS:=@USE_GLIBC +libstdcpp @!mips64 @!mips64el @!arc
ABI_VERSION:=1
endef
define Package/libc
$(call Package/libc/Default)
TITLE:=C library
+ PROVIDES:=libpthread librt
endef
define Package/libc/config
string
prompt "libc shared library files (use wildcards)"
depends on EXTERNAL_TOOLCHAIN && PACKAGE_libc
- default "./lib/ld{*.so*,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*,.so}"
-
- endmenu
-endef
-
-
-define Package/libpthread
-$(call Package/libc/Default)
- TITLE:=POSIX thread library
-endef
-
-define Package/libpthread/config
- menu "Configuration"
- depends on EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
-
- config LIBPTHREAD_ROOT_DIR
- string
- prompt "libpthread shared library base directory"
- depends on EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
- default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
- default "/" if NATIVE_TOOLCHAIN
-
- config LIBPTHREAD_FILE_SPEC
- string
- prompt "libpthread shared library files (use wildcards)"
- depends on EXTERNAL_TOOLCHAIN && PACKAGE_libpthread
- default "./lib/libpthread{-*.so,.so.*}"
+ default "./lib/ld{*.so*,-linux*.so.*} ./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,pthread,resolv,rt,util}{-*.so,.so.*,.so}"
endmenu
endef
endmenu
endef
-define Package/librt
-$(call Package/libc/Default)
- TITLE:=POSIX.1b RealTime extension library
- DEPENDS:=+libpthread
-endef
-
-define Package/librt/config
- menu "Configuration"
- depends on EXTERNAL_TOOLCHAIN && PACKAGE_librt
-
- config LIBRT_ROOT_DIR
- string
- prompt "librt shared library base directory"
- depends on EXTERNAL_TOOLCHAIN && PACKAGE_librt
- default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN
- default "/" if NATIVE_TOOLCHAIN
-
- config LIBRT_FILE_SPEC
- string
- prompt "librt shared library files (use wildcards)"
- depends on EXTERNAL_TOOLCHAIN && PACKAGE_librt
- default "./lib/librt{-*.so,.so.*}"
-
- endmenu
-endef
-
-
define Package/libgfortran
$(call Package/gcc/Default)
TITLE:=GFortran support library
$(CP) \
$(TOOLCHAIN_DIR)/lib/ld*.so.* \
$(1)/lib/
- for file in libanl libc libcidn libcrypt libdl libm libnsl libnss_dns libnss_files libresolv libutil; do \
+ for file in libanl libc libcidn libcrypt libdl libm libnsl libnss_dns libnss_files libpthread libresolv librt libutil; do \
for file in $(TOOLCHAIN_DIR)/lib/$$$$file.so.*; do \
if [ -e "$$$$file" ]; then \
$(CP) $$$$file $(1)/lib/; \
define Package/libc/install_lib
$(CP) $(filter-out %/libdl_pic.a %/libpthread_pic.a %/libresolv_pic.a,$(wildcard $(TOOLCHAIN_DIR)/lib/lib*.a)) $(1)/lib/
$(if $(wildcard $(TOOLCHAIN_DIR)/lib/libc_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libc_so.a $(1)/lib/libc_pic.a)
+ $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libpthread_so.a $(1)/lib/libpthread_pic.a)
$(if $(LIBGCC_MAP), \
$(CP) $(LIBGCC_A) $(1)/lib/libgcc_s_pic.a; \
$(CP) $(LIBGCC_MAP) $(1)/lib/libgcc_s_pic.map \
)
endef
- define Package/libpthread/install
- $(INSTALL_DIR) $(1)/lib
- ifneq ($(CONFIG_USE_MUSL),y)
- $(CP) \
- $(TOOLCHAIN_DIR)/lib/libpthread.so.* \
- $(1)/lib/
- endif
- endef
-
define Package/libthread-db/install
$(INSTALL_DIR) $(1)/lib
$(CP) \
$(TOOLCHAIN_DIR)/lib/libthread_db.so.* $(1)/lib
endef
- define Package/libpthread/install_lib
- $(if $(wildcard $(TOOLCHAIN_DIR)/lib/libpthread_so.a),$(CP) $(TOOLCHAIN_DIR)/lib/libpthread_so.a $(1)/lib/libpthread_pic.a)
- endef
-
- define Package/librt/install
- $(INSTALL_DIR) $(1)/lib
- ifneq ($(CONFIG_USE_MUSL),y)
- $(CP) \
- $(TOOLCHAIN_DIR)/lib/librt.so.* \
- $(1)/lib/
- endif
- endef
-
define Package/ldd/install
$(INSTALL_DIR) $(1)/usr/bin/
$(CP) $(TOOLCHAIN_DIR)/bin/ldd $(1)/usr/bin/
$(call Package/$(LIBC)/install,$1)
endef
- define Package/libpthread/install
- for file in $(call qstrip,$(CONFIG_LIBPTHREAD_FILE_SPEC)); do \
- $(INSTALL_DIR) $(1)/lib ; \
- $(CP) $(call qstrip,$(CONFIG_LIBPTHREAD_ROOT_DIR))/$$$$file $(1)/lib/ ; \
- done ; \
- exit 0
- endef
-
define Package/libthread-db/install
for file in $(call qstrip,$(CONFIG_LIBTHREAD_DB_FILE_SPEC)); do \
$(INSTALL_DIR) $(1)/lib ; \
exit 0
endef
- define Package/librt/install
- for file in $(call qstrip,$(CONFIG_LIBRT_FILE_SPEC)); do \
- $(INSTALL_DIR) $(1)/lib ; \
- $(CP) $(call qstrip,$(CONFIG_LIBRT_ROOT_DIR))/$$$$file $(1)/lib/ ; \
- done ; \
- exit 0
- endef
-
define Package/libatomic/install
for file in $(call qstrip,$(CONFIG_LIBATOMIC_FILE_SPEC)); do \
$(INSTALL_DIR) $(1)/lib ; \
$(eval $(call BuildPackage,libtsan))
$(eval $(call BuildPackage,liblsan))
$(eval $(call BuildPackage,libubsan))
-$(eval $(call BuildPackage,libpthread))
$(eval $(call BuildPackage,libthread-db))
-$(eval $(call BuildPackage,librt))
$(eval $(call BuildPackage,libgfortran))
$(eval $(call BuildPackage,libgomp))
$(eval $(call BuildPackage,ldd))