qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/1] Fix configure for s390 qemu on alpine an


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 1/1] Fix configure for s390 qemu on alpine and other busybox environments
Date: Wed, 31 Jan 2018 12:51:30 +0000

On 31 January 2018 at 12:14, Christian Borntraeger
<address@hidden> wrote:
> On 01/30/2018 04:41 PM, Eric Blake wrote:
>> On 01/30/2018 07:38 AM, Christian Borntraeger wrote:
>>> +++ b/configure
>>> @@ -1906,9 +1906,9 @@ int main(int argc, char *argv[]) {
>>>  EOF
>>>
>>>  if compile_object ; then
>>> -    if grep -q BiGeNdIaN $TMPO ; then
>>> +    if strings -a $TMPO | grep -q BiGeNdIaN ; then
>>>          bigendian="yes"
>>> -    elif grep -q LiTtLeEnDiAn $TMPO ; then
>>> +    elif strings -a $TMPO | grep -q LiTtLeEnDiAn ; then
>>
>> Yes, this is indeed a more portable way to grep binary files (it's also
>> possible to do:
>>
>> tr -d '\0' < $TMPO | grep -q ...
>>
>> if we're worried about the availability of strings, but I don't see that
>> being a problem if no one reports it actually failing).
>>
>> Reviewed-by: Eric Blake <address@hidden>
>
> Peter, does that patch work on MacOS and Windows? If yes we could
> get this patch in via the s390 tree.

I haven't tested but I think it should be fine. OSX provides
a strings binary that supports -a, and Windows cross-builds
so it will use the Linux strings.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]