Browse Source

allow to preset thread implementation

Waldemar Brodkorb 3 years ago
parent
commit
af0062c6d6
2 changed files with 12 additions and 2 deletions
  1. 11 0
      mk/build.mk
  2. 1 2
      target/config/Config.in.threads

+ 11 - 0
mk/build.mk

@@ -460,6 +460,17 @@ defconfig: .menu $(CONFIG)/conf
 		printf "# ADK_TARGET_WITH_MMU is not set\n" \
 			>> $(ADK_TOPDIR)/.defconfig; \
 	fi
+	@if [ ! -z "$(ADK_TARGET_THREADS)" ];then \
+		if [ "$(ADK_TARGET_THREADS)" = "nptl" ];then \
+			printf "ADK_TARGET_WITH_NPTL=y\n" >> $(ADK_TOPDIR)/.defconfig; \
+		fi; \
+		if [ "$(ADK_TARGET_THREADS)" = "lt" ];then \
+			printf "ADK_TARGET_WITH_LT=y\n" >> $(ADK_TOPDIR)/.defconfig; \
+		fi; \
+		if [ "$(ADK_TARGET_THREADS)" = "none" ];then \
+			printf "ADK_TARGET_WITHOUT_THREADS=y\n" >> $(ADK_TOPDIR)/.defconfig; \
+		fi; \
+	fi
 	@if [ ! -z "$(ADK_TARGET_LIBC)" ];then \
 		libc=$$(echo "$(ADK_TARGET_LIBC)"|sed -e "s/-/_/"); \
 		grep "^config" target/config/Config.in.libc \

+ 1 - 2
target/config/Config.in.threads

@@ -7,8 +7,7 @@ depends on ADK_TARGET_LIB_UCLIBC_NG
 
 config ADK_TARGET_WITH_NPTL
 	bool "NPTL"
-	depends on ADK_TARGET_SUPPORTS_NPTL && ADK_TARGET_SUPPORTS_THREADS || \
-	((ADK_TARGET_ARCH_ARM && ADK_TARGET_BINFMT_FDPIC) || ADK_TARGET_WITH_MMU)
+	depends on ADK_TARGET_SUPPORTS_NPTL && ADK_TARGET_SUPPORTS_THREADS
 
 config ADK_TARGET_WITH_LT
 	bool "Linuxthreads"