Patchwork Fix out-of-tree and cross compile builds for pixman

login
register
mail settings
Submitter Stefan Weil
Date Nov. 4, 2012, 12:10 p.m.
Message ID <50965B49.4090900@weilnetz.de>
Download mbox | patch
Permalink /patch/197026/
State Accepted
Headers show

Comments

Stefan Weil - Nov. 4, 2012, 12:10 p.m.
Am 03.11.2012 21:15, schrieb Blue Swirl:
> On Sat, Nov 3, 2012 at 7:02 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 3 November 2012 19:47, Blue Swirl <blauwirbel@gmail.com> wrote:
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -122,7 +122,7 @@ subdir-pixman: pixman/Makefile
>>>          $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,)
>>>
>>>   pixman/Makefile: $(SRC_PATH)/pixman/configure
>>> -       (cd pixman; $(SRC_PATH)/pixman/configure --disable-shared --enable-static)
>>> +       (cd pixman; CC=$(CC) LD=$(LD) AR=$(AR) NM=$(NM) RANLIB=$(RANLIB) $(SRC_PATH)/pixman/configure --disable-shared --enable-static)
>> Not tested, but aren't there quoting issues here if you're
>> building with --cc='ccache gcc' ?
> Yes. Also configure fails because the variables are not expanded and
> directory pixman/pixman does not exist. Funny how it worked earlier.

I struggle with the same issue, and there are more problems caused
by the internal pixman code.

The dependencies are wrong because pixman is built too late:
$(TOOLS) also depends on it. It is not trivial to model them correctly.
IMHO it would be better to build the internal pixman immediately when
QEMU's configure is called. Then QEMU's make can always rely on an
existing pixman.

The internal pixman code is also too old for cross compilations with
MinGW-w64. It already fails when running configure.

Newer versions of pixman compile after a trivial modification which
is needed to avoid redefined symbols:


More changes are needed to avoid typical MinGW-w64 compiler warnings
(pointer to int conversions without uintptr_t).

Up to now, I did not test the resulting code, so maybe there will be more
surprises.

Regards
Stefan
Gerd Hoffmann - Nov. 7, 2012, 11:47 a.m.
Hi,

> The internal pixman code is also too old for cross compilations with
> MinGW-w64. It already fails when running configure.
> 
> Newer versions of pixman compile after a trivial modification which
> is needed to avoid redefined symbols:

I'd prefer to not have local patches.  Can you submit the patch to
upstream pixman?  Then we can just switch to a fixed checkout to get w64
going.

thanks,
  Gerd
Stefan Weil - Nov. 17, 2012, 9:56 a.m.
Am 07.11.2012 12:47, schrieb Gerd Hoffmann:
> Hi,
>
>> The internal pixman code is also too old for cross compilations with
>> MinGW-w64. It already fails when running configure.
>>
>> Newer versions of pixman compile after a trivial modification which
>> is needed to avoid redefined symbols:
>
> I'd prefer to not have local patches. Can you submit the patch to
> upstream pixman? Then we can just switch to a fixed checkout to get w64
> going.
>
> thanks,
> Gerd

I sent three patches which are now in the official pixman git repository,
so we can switch to the next labelled version as soon as it is available
(maybe pixman-0.28.1).

Regards,

Stefan

Patch

diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 1a014fd..723c245 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -61,7 +61,7 @@  _mm_empty (void)
  #endif

  #ifdef USE_X86_MMX
-# if (defined(__SUNPRO_C) || defined(_MSC_VER))
+# if (defined(__SUNPRO_C) || defined(_MSC_VER) || defined(__WIN64))
  #  include <xmmintrin.h>
  # else
  /* We have to compile with -msse to use xmmintrin.h, but that causes SSE