Explorar el Código

package/libcoap: fix build for toolchains w/o threads

The version bump in [1] introduced the upstream commit [2] which made
builds using toolchain without thread support fail to build libcoap.

This patch adds an option check in the libcoap.mk file to verify
the toolchain has thread support and passes the correct configuration
options introduced in [2] as well.

The build can be tested with the following config.

```
BR2_armeb=y
BR2_cortex_a76_a55=y
BR2_ARM_EABI=y
BR2_ARM_SOFT_FLOAT=y
BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
BR2_PTHREADS_NONE=y
BR2_PACKAGE_LIBCOAP=y
```

Fixes:
https://autobuild.buildroot.org/results/9c0/9c0b675a64fb2576bc34457043f118cffe5fe555//

[1] 4df4d1d312 package/libcoap: bump version to 4.3.5
[2] https://github.com/obgm/libcoap/commit/c69c5d5af0a30859e90756f535e2ca21cdeda0b2

Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Signed-off-by: Julien Olivain <ju.o@free.fr>
Thomas Perale hace 3 meses
padre
commit
70ca62fb49
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      package/libcoap/libcoap.mk

+ 6 - 0
package/libcoap/libcoap.mk

@@ -31,4 +31,10 @@ else
 LIBCOAP_CONF_OPTS += --disable-dtls
 LIBCOAP_CONF_OPTS += --disable-dtls
 endif
 endif
 
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+LIBCOAP_CONF_OPTS += --enable-thread-safe
+else
+LIBCOAP_CONF_OPTS += --disable-thread-safe
+endif
+
 $(eval $(autotools-package))
 $(eval $(autotools-package))