From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LgNXh-00021M-SW for qemu-devel@nongnu.org; Sun, 08 Mar 2009 14:16:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LgNXf-0001zy-DF for qemu-devel@nongnu.org; Sun, 08 Mar 2009 14:16:04 -0400 Received: from [199.232.76.173] (port=50418 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgNXf-0001zq-7b for qemu-devel@nongnu.org; Sun, 08 Mar 2009 14:16:03 -0400 Received: from an-out-0708.google.com ([209.85.132.250]:5772) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LgNXe-0004SM-VD for qemu-devel@nongnu.org; Sun, 08 Mar 2009 14:16:03 -0400 Received: by an-out-0708.google.com with SMTP id b6so610105ana.37 for ; Sun, 08 Mar 2009 11:16:02 -0700 (PDT) Message-ID: <49B40B5F.9070507@codemonkey.ws> Date: Sun, 08 Mar 2009 13:15:59 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] [RFC] Haiku host support and general configure issues References: <6011275057-BeMail@laptop> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: haikuports-devs@ports.haiku-files.org Andreas Färber wrote: > Hello, > > Am 28.02.2009 um 18:08 schrieb François Revol: > >>> We have undocumented --extra-cflags= and --extra-ldflags= options >>> that >>> don't work as expected. They are ignored by all the configure tests, >>> so it seems there is no direct equivalent to autoconf's CPPFLAGS to >>> pass in additional header include paths. The OS_CFLAGS come closest, >>> but they are ignored for some of the tests, too. Any preferences how >>> to fix this? >> >> Ideally those shouldn't be needed anyway. > > Not sure what exactly you're referring to, but both OS-specific as > well as user-supplied settings may be necessary and should be working. > Command line arguments are necessary to use self-compiled dependency > libraries in their own prefix, for example. Because any use of them usually signifies that someone is doing something wrong. For libraries that have non-standard install paths, we should be detecting it via pkg-config or the appropriate tool (like sdl-config). For libraries that don't support these (like zlib), the expectation is that they will be available in prefix. >>> Unresolved issues include that AIO is detected, and as a consequence >> >> Then the test is buggy as we don't have AIO in Haiku that I know of :) > > Hm, the so-called AIO check is rather a pthreads check: > > #include > int main(void) { pthread_mutex_t lock; return 0; } > > If that compiles, a working -lpthread is assumed. It's buggy in itself > because it first sets AIOLIBS="", then compiles with unchanged empty > $AIOLIBS and then sets AIOLIBS="-lpthread". So we need to also make a pthread call. Like int main(void) { pthread_mutex_init; return 0; } >> Well we should have a pthread lib available though... > > It's part of libroot.so, I thought, and thus referenced without extra > linker arguments. So we should try to compile against -lpthread and then try to compile against -lroot. Or better yet, does -pthread do the right thing on haiku? We could just switch to that. > >> Another big issue that I mentionned earlier here is the widely used >> assumption that error codes are positive, which is not the case for >> BeOS and Haiku. >> Not fixing this will result in a dangerous binary. > > Thanks for the reminder. But that also reminds me, you wanted to > supply a patch for that! :) Such a patch may be something ya'll have to maintain on your own. This has been discussed a lot in the past and I'm concerned that it's going to be too invasive. Regards, Anthony Liguori > > Andreas > > >