]> code.ossystems Code Review - openembedded-core.git/commitdiff
ncurses: poll() works, but only on Linux
authorRoss Burton <ross@burtonini.com>
Fri, 12 Nov 2021 14:02:36 +0000 (14:02 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 13 Nov 2021 16:08:07 +0000 (16:08 +0000)
ncurses does AC_TRY_RUN() to determine is poll() actually works. As that
doesn't work in cross-compiles, we seed it with 'yes'.

However, MinGW doesn't have a working poll(), so use a :linux override
so that this only applies to Linux builds.

The ncurses build now compiles but doesn't link in MinGW, which is a step
forwards at least.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/ncurses/ncurses.inc

index e32a6d12f1779adfad68ff45ef4322bd1dada85e..a0ecd8a80b8242d8abe2682ef46c610f0efd4309 100644 (file)
@@ -18,6 +18,7 @@ SRC_URI = "git://salsa.debian.org/debian/ncurses.git;protocol=https;branch=maste
 EXTRA_AUTORECONF = "-I m4"
 
 CACHED_CONFIGUREVARS = "cf_cv_func_nanosleep=yes"
+CACHED_CONFIGUREVARS:append:linux = " cf_cv_working_poll=yes"
 
 EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'"
 
@@ -98,10 +99,6 @@ ncurses_configure() {
 # patched autoconf213 to generate the configure script. This autoconf
 # is not available so that the shipped script will be used.
 do_configure() {
-        # check does not work with cross-compiling and is generally
-        # broken because it requires stdin to be pollable (which is
-        # not the case for /dev/null redirections)
-        export cf_cv_working_poll=yes
        #Remove ${includedir} from CPPFLAGS, need for cross compile
        sed -i 's#-I${cf_includedir}##g' ${S}/configure || die "sed CPPFLAGS"