Skip to contentSkip to conversation

libsepol: require threads

PATCH New Adam Duskett 3 participants 3 messages Nov 3, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 libsepol: require threads

libsepol 2.7 now uses pthreads.h

---
Changes v1 -> v2:
- Added thread dependency to semodule-utils (Arnout)

Changes v2 -> v3:
- Added explanations for dependencies (Matt Webber)

Changes v3 -> v4:
- Added Config.in comment in libsepol for threads. (Thomas)

 package/libsepol/Config.in       | 4 ++++
 package/semodule-utils/Config.in | 4 ++++
 2 files changed, 8 insertions(+)
package/libsepol/Config.in +4 -0
index f92af52072..cfa923e452 100644
@@ -1,7 +1,11 @@
 config BR2_PACKAGE_LIBSEPOL
 	bool "libsepol"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # pthread
 	help
 	  Libsepol is the binary policy manipulation library. It doesn't
 	  depend upon or use any of the other SELinux components.
 
 	  http://selinuxproject.org/page/Main_Page
+
+comment "libsepol needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/semodule-utils/Config.in +4 -0
index d9cb928c4c..38e043dc2c 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_SEMODULE_UTILS
 	bool "semodule-utils"
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libsepol
 	select BR2_PACKAGE_LIBSEPOL
 	help
 	  semodule-utils is a package that contains tools for handling
@@ -13,3 +14,6 @@ config BR2_PACKAGE_SEMODULE_UTILS
 	  * semodule_package - Create a SELinux policy module package.
 
 	  https://github.com/SELinuxProject/selinux/wiki/Releases
+
+comment "semodule-utils needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
Signature · 1 line
2.13.6
#1 lore raw

PATCH v4 1/1 libsepol: require threads

Adam,

Quoted 2 lines · Adam Duskett

libsepol 2.7 now uses pthreads.h

Suggest adding link to one of the failures.

    libsepol-2.7 |

http://autobuild.buildroot.net/results/5f1c6872a395d8c6d55e2b1722730871b4daf6a3

I used the above config, changed to buildroot toolchain/glibc/gcc6 and retested without error. Also before making that change, menuconfig looked correct with the comment.

#2 lore raw

PATCH v4 1/1 libsepol: require threads

In reply to Adam Duskett

Hello,

Quoted 6 lines · Adam Duskett

libsepol 2.7 now uses pthreads.h

---
Changes v1 -> v2:
- Added thread dependency to semodule-utils (Arnout)

Applied to master after a reference to an autobuilder failure.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com