Skip to contentSkip to conversation

package/olsr: enable back on musl with headers >= 4.15

PATCH New Fabrice Fontaine 2 participants 2 messages Jan 11, 2020 – Jan 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/olsr: enable back on musl with headers >= 4.15

olsr has been disabled on musl three years ago by commit 4bca88c839e54a9140c06010666f5e034127b8b1.

Comments in https://github.com/OLSR/olsrd/issues/6 suggest that the issue was due to olsr mixing kernel and userspace headers. This issue is still open.

However, nowadays olsr builds fine on musl under those two conditions:
- musl >= 1.1.16 (i.e. with
http://git.musl-libc.org/cgit/musl/commit/?id=04983f2272382af92eb8f8838964ff944fbb8258)
- kernels >= 4.15 (i.e. with
https://github.com/torvalds/linux/commit/c0bace798436bca0fdc221ff61143f1376a9c3de)

So enable it back on musl with kernels >= 4.15.

---
 package/olsr/Config.in | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
package/olsr/Config.in +7 -5
index 85c5b4da1f..632511fba9 100644
@@ -3,9 +3,8 @@ config BR2_PACKAGE_OLSR
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
-	# doesn't build with musl,
 	# https://github.com/OLSR/olsrd/issues/6
-	depends on !BR2_TOOLCHAIN_USES_MUSL
+	depends on !BR2_TOOLCHAIN_USES_MUSL || BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
 	help
 	  The Optimized Link State Routing protocol (OLSR) is a
 	  routing protocol that is optimised for mobile ad-hoc
@@ -16,7 +15,10 @@ config BR2_PACKAGE_OLSR
 
 	  http://www.olsr.org/
 
-comment "olsr needs a uClibc or glibc toolchain w/ threads, dynamic library"
+comment "olsr needs a toolchain w/ threads, dynamic library"
 	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
-		BR2_TOOLCHAIN_USES_MUSL
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+
+comment "olsr needs a musl toolchain w/ headers >= 4.15"
+	depends on BR2_TOOLCHAIN_USES_MUSL
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_15
Signature · 1 line
2.24.1
#1 lore raw

PATCH 1/1 package/olsr: enable back on musl with headers >= 4.15

Quoted 13 lines · On Sat, 11 Jan 2020 23:08:24 +0100 Fabrice Fontaine…

olsr has been disabled on musl three years ago by commit 4bca88c839e54a9140c06010666f5e034127b8b1.

Comments in https://github.com/OLSR/olsrd/issues/6 suggest that the issue was due to olsr mixing kernel and userspace headers. This issue is still open.

However, nowadays olsr builds fine on musl under those two conditions:
- musl >= 1.1.16 (i.e. with
http://git.musl-libc.org/cgit/musl/commit/?id=04983f2272382af92eb8f8838964ff944fbb8258)
- kernels >= 4.15 (i.e. with
https://github.com/torvalds/linux/commit/c0bace798436bca0fdc221ff61143f1376a9c3de)

Quoted 6 lines

So enable it back on musl with kernels >= 4.15.

---
 package/olsr/Config.in | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com