Comment 4 for bug 1777252

Revision history for this message
Peter Maydell (pmaydell) wrote :

The condition we use in configure to decide whether to add -lutil to libs_softmmu is "not Darwin and not MinGW and not Solaris and not Haiku"...

I think the thing we're trying to get from libutil is openpty(), which is in that library for Linux and the BSDs. It's not in libutil for OSX (though since OSX has a libutil anyway it's harmless that it gets linked in). For Windows we avoid code paths that use openpty(), and Solaris doesn't have openpty() at all so we have to hand-roll our own implementation in util/qemu-openpty.c.

I think the cleanest fix to this problem is to have a configure test that checks "does openpty() require -lutil?", and then use the answer to that both to decide whether to add -lutil to libs_softmmu and to decide whether to add -lutil to the link line for this test binary.

PS: Thanks for the offer of Solaris hardware access. We may be able to take you up on that but it would also require some time from somebody on our end to set things up to use it. The other possible option is to have one of the free-solaris-equivalents set up as a VM to run tests in in the same way we do for the BSDs in tests/vm.