Browse Source

riscv64: enable NPTL/TLS for uClibc-ng

Waldemar Brodkorb 2 years ago
parent
commit
7eb784ff9c
3 changed files with 11 additions and 10 deletions
  1. 4 6
      target/config/Config.in.cpu
  2. 1 1
      target/riscv64/Makefile
  3. 6 3
      target/riscv64/uclibc-ng.config

+ 4 - 6
target/config/Config.in.cpu

@@ -1111,18 +1111,16 @@ config ADK_TARGET_CPU_RISCV32_RV32IMAC
 
 config ADK_TARGET_CPU_RISCV64_RV64IMAFDC
 	bool "rv64imafdc"
-	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_ONLY if ADK_TARGET_LIB_UCLIBC_NG
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_NPTL
 	select ADK_TARGET_WITH_MMU
 	select ADK_TARGET_ABI_LP64D
 	depends on ADK_TARGET_ARCH_RISCV64
 
 config ADK_TARGET_CPU_RISCV64_RV64IMAC
 	bool "rv64imac"
-	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_ONLY if ADK_TARGET_LIB_UCLIBC_NG
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_NPTL
 	select ADK_TARGET_WITH_MMU
 	select ADK_TARGET_ABI_LP64
 	depends on ADK_TARGET_ARCH_RISCV64

+ 1 - 1
target/riscv64/Makefile

@@ -7,7 +7,7 @@ include $(ADK_TOPDIR)/mk/image.mk
 
 KERNEL:=$(LINUX_DIR)/vmlinux
 OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
-QEMU_ARGS:=-M virt -nographic
+QEMU_ARGS:=-M virt -m 256 -nographic
 ifeq ($(ADK_TARGET_QEMU_WITH_VIRTIO),y)
 QEMU_ARGS+=-netdev user,id=eth0 -device virtio-net-device,netdev=eth0
 endif

+ 6 - 3
target/riscv64/uclibc-ng.config

@@ -78,9 +78,11 @@ LDSO_SAFE_RUNPATH=y
 LDSO_SEARCH_INTERP_PATH=y
 LDSO_LD_LIBRARY_PATH=y
 # LDSO_GNU_HASH_SUPPORT is not set
-HAS_NO_THREADS=y
-# UCLIBC_HAS_LINUXTHREADS is not set
-# UCLIBC_HAS_THREADS_NATIVE is not set
+# HAS_NO_THREADS is not set
+UCLIBC_HAS_THREADS_NATIVE=y
+UCLIBC_HAS_THREADS=y
+UCLIBC_HAS_TLS=y
+# PTHREADS_DEBUG_SUPPORT is not set
 UCLIBC_HAS_SYSLOG=y
 UCLIBC_HAS_LFS=y
 # MALLOC is not set
@@ -152,6 +154,7 @@ UCLIBC_HAS_RESOLVER_SUPPORT=y
 #
 UCLIBC_HAS_STRING_GENERIC_OPT=y
 UCLIBC_HAS_STRING_ARCH_OPT=y
+UCLIBC_HAS_STDIO_FUTEXES=y
 UCLIBC_HAS_CTYPE_TABLES=y
 UCLIBC_HAS_CTYPE_SIGNED=y
 # UCLIBC_HAS_CTYPE_UNSAFE is not set