qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Cc: haikuports-devs@ports.haiku-files.org
Subject: Re: [Qemu-devel] Re: [PATCH] [RFC] Haiku host support and general configure issues
Date: Sun, 08 Mar 2009 13:15:59 -0500	[thread overview]
Message-ID: <49B40B5F.9070507@codemonkey.ws> (raw)
In-Reply-To: <DC042C64-ECA8-43BA-A999-1E39CDE635B5@web.de>

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 <pthread.h>
> 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
>
>
>

  parent reply	other threads:[~2009-03-08 18:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-28 14:08 [Qemu-devel] [PATCH] [RFC] Haiku host support and general configure issues Andreas Färber
2009-02-28 17:08 ` [Qemu-devel] " François Revol
2009-02-28 18:31   ` Andreas Färber
2009-02-28 19:01     ` [HaikuPorts-devs] " François Revol
2009-02-28 20:26     ` Jamie Lokier
2009-02-28 20:32       ` François Revol
2009-03-08 18:15     ` Anthony Liguori [this message]
2009-03-08 18:41       ` [HaikuPorts-devs] " François Revol
2009-03-09  8:40       ` Avi Kivity
2009-03-09 14:14         ` [HaikuPorts-devs] " François Revol
2009-03-09 14:33           ` Avi Kivity
2009-03-09 15:39             ` François Revol

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B40B5F.9070507@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=haikuports-devs@ports.haiku-files.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).