libmicrohttpd: fix build on riscv
PATCH 1/1 libmicrohttpd: fix build on riscv
Define _REENTRANT like already done for ARC otherwise pthread detection will fail
Fixes:
- https://autobuild.buildroot.org/results/910dc7164312637bf4dcd89e4cb476ae198466c8
--- package/libmicrohttpd/libmicrohttpd.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/libmicrohttpd/libmicrohttpd.mk +2 -2
@@ -11,10 +11,10 @@ LIBMICROHTTPD_INSTALL_STAGING = YES LIBMICROHTTPD_CONF_OPTS = --disable-curl --disable-examples LIBMICROHTTPD_CFLAGS = $(TARGET_CFLAGS) -std=c99 -# gcc on arc doesn't define _REENTRANT when -pthread is passed while +# gcc on arc and riscv doesn't define _REENTRANT when -pthread is passed while # it should. Compensate this deficiency here otherwise libmicrohttpd # configure script doesn't find that thread support is enabled. -ifeq ($(BR2_arc),y) +ifeq ($(BR2_arc)$(BR2_riscv),y) LIBMICROHTTPD_CFLAGS += -D_REENTRANT endif
Signature · 1 line
2.17.1
Thomas Petazzoni
AppliedPATCH 1/1 libmicrohttpd: fix build on riscv
Hello,
+Mark Corbin in Cc.
Quoted 10 lines · Fabrice Fontaine
Define
_REENTRANTlike already done for ARC otherwise pthread detection will failFixes:
- https://autobuild.buildroot.org/results/910dc7164312637bf4dcd89e4cb476ae198466c8Signed-off-by Fabrice Fontaine <[email protected]>--- package/libmicrohttpd/libmicrohttpd.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to master, thanks.
Mark: could you report upstream to the RISC-V gcc developers that the gcc port should define _REENTRANT when -pthread is passed ?
I.E, most platforms do some variations of:
#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
in their gcc/config/<ARCH>/linux.h file.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com