Skip to contentSkip to conversation

pixman build fixes

GIT PULL New Gerd Hoffmann 1 participant 8 messages Nov 14, 2012 Kbuild

lore
Share & tools
lore
#0 lore raw

Hi,

This patch series fixes the build issues with the internal pixman submodule. It also adds licensing info to the qemu-pixman.[ch] files.

v2 improves things a bit based on comments from Stefan Weil, fixes some tyops found by Peter Maydell and adds a patch which also cleans up the pixman directory on "make distclean"

please pull,
Gerd

The following changes since commit f5022a135e4309a54d433c69b2a056756b2d0d6b:

aio: fix aio_ctx_prepare with idle bottom halves (2012-11-12 20:02:09 +0400)

are available in the git repository at:
git://git.kraxel.org/qemu pixman.v5

Gerd Hoffmann (7):
pixman: add output dir to include path
pixman: set --host for cross builds
pixman: disable gtk
pixman: pass cflags, add -fPIC
pixman: build internal version early
pixman: add licensing info
pixman: cleanup properly on make distclean

 Makefile      |    3 ++-
 configure     |   24 ++++++++++++++++--------
 qemu-pixman.c |    5 +++++
 qemu-pixman.h |    5 +++++
 4 files changed, 28 insertions(+), 9 deletions(-)
#1 lore raw

PATCH 1/7 pixman: add output dir to include path

Needed to make sure the (generated) pixman-version.h file is found. Based on a patch from Blue Swirl.

---
 configure |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
configure +7 -5
index 7290f50..e6fe4f8 100755
@@ -2121,11 +2121,10 @@ else
     echo "      git submodule update --init pixman"
     exit 1
   fi
-  pixman_cflags="-I${source_path}/pixman/pixman"
-  pixman_libs="-Lpixman/pixman/.libs -lpixman-1"
+  mkdir -p pixman/pixman
+  pixman_cflags="-I\$(SRC_PATH)/pixman/pixman -I\$(BUILD_DIR)/pixman/pixman"
+  pixman_libs="-L\$(BUILD_DIR)/pixman/pixman/.libs -lpixman-1"
 fi
-QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags"
-libs_softmmu="$libs_softmmu $pixman_libs"
 
 ##########################################
 # libcap probe
@@ -3137,6 +3136,10 @@ if test "$cpu" = "ppc64" -a "$targetos" != "Darwin" ; then
   roms="$roms spapr-rtas"
 fi
 
+# add pixman flags after all config tests are done
+QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags"
+libs_softmmu="$libs_softmmu $pixman_libs"
+
 echo "Install prefix    $prefix"
 echo "BIOS directory    `eval echo $qemu_datadir`"
 echo "binary directory  `eval echo $bindir`"
@@ -4154,7 +4157,6 @@ DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"
 DIRS="$DIRS roms/seabios roms/vgabios"
 DIRS="$DIRS qapi-generated"
 DIRS="$DIRS libcacard libcacard/libcacard libcacard/trace"
-DIRS="$DIRS pixman"
 FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
 FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
 FILES="$FILES tests/tcg/lm32/Makefile libcacard/Makefile"
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/7 pixman: set --host for cross builds

In reply to Gerd Hoffmann

Set --host when calling pixman configure while doing cross builds so pixman's autoconf picks up the cross build tools correctly.

---
 Makefile  |    2 +-
 configure |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)
Makefile +1 -1
index ca14a21..ff2c16d 100644
@@ -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; $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-shared --enable-static)
 
 $(SRC_PATH)/pixman/configure:
 	(cd $(SRC_PATH)/pixman; autoreconf -v --install)
configure +5 -0
index e6fe4f8..0a241eb 100755
@@ -3649,6 +3649,11 @@ if test "$sparse" = "yes" ; then
   echo "HOST_CC      := REAL_CC=\"\$(HOST_CC)\" cgcc"  >> $config_host_mak
   echo "QEMU_CFLAGS  += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak
 fi
+if test "$cross_prefix" != ""; then
+  echo "AUTOCONF_HOST := --host=${cross_prefix%-}"     >> $config_host_mak
+else
+  echo "AUTOCONF_HOST := "                             >> $config_host_mak
+fi
 echo "LDFLAGS=$LDFLAGS" >> $config_host_mak
 echo "ARLIBS_BEGIN=$arlibs_begin" >> $config_host_mak
 echo "ARLIBS_END=$arlibs_end" >> $config_host_mak
Signature · 1 line
1.7.1
#3 lore raw

PATCH 3/7 pixman: disable gtk

In reply to Gerd Hoffmann

gtk is only needed to build test cases.
Disable it to simplify the build.

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index ff2c16d..e68bb8f 100644
@@ -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 $(AUTOCONF_HOST) --disable-shared --enable-static)
+	(cd pixman; $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static)
 
 $(SRC_PATH)/pixman/configure:
 	(cd $(SRC_PATH)/pixman; autoreconf -v --install)
Signature · 1 line
1.7.1
#4 lore raw

PATCH 4/7 pixman: pass cflags, add -fPIC

In reply to Gerd Hoffmann

Pass on CFLAGS to the pixman configure script.
Add -fPIC to the cflags, needed to make the final link succeed.

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index e68bb8f..4538b87 100644
@@ -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 $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static)
+	(cd pixman; CFLAGS="$(CFLAGS) -fPIC" $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static)
 
 $(SRC_PATH)/pixman/configure:
 	(cd $(SRC_PATH)/pixman; autoreconf -v --install)
Signature · 1 line
1.7.1
#6 lore raw

PATCH 6/7 pixman: add licensing info

In reply to Gerd Hoffmann
---
 qemu-pixman.c |    5 +++++
 qemu-pixman.h |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
qemu-pixman.c +5 -0
index 7547ed7..063b52d 100644
@@ -1,3 +1,8 @@
+/*
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
 #include "qemu-pixman.h"
 
 int qemu_pixman_get_type(int rshift, int gshift, int bshift)
qemu-pixman.h +5 -0
index 7652c41..783a392 100644
@@ -1,3 +1,8 @@
+/*
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
 #ifndef QEMU_PIXMAN_H
 #define QEMU_PIXMAN_H
 
Signature · 1 line
1.7.1
#7 lore raw

PATCH 7/7 pixman: cleanup properly on make distclean

In reply to Gerd Hoffmann
---
 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Makefile +1 -0
index 4538b87..81c660f 100644
@@ -278,6 +278,7 @@ distclean: clean
 	for d in $(TARGET_DIRS) $(QEMULIBS); do \
 	rm -rf $$d || exit 1 ; \
         done
+	test -f pixman/config.log && make -C pixman distclean
 
 KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
 ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
Signature · 1 line
1.7.1
#5 lore raw

PATCH 5/7 pixman: build internal version early

In reply to Gerd Hoffmann
---
 configure |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
configure +4 -3
index 0a241eb..f847ee2 100755
@@ -3956,9 +3956,6 @@ if test "$target_softmmu" = "yes" ; then
   if test "$smartcard_nss" = "yes" ; then
     echo "subdir-$target: subdir-libcacard" >> $config_host_mak
   fi
-  if test "$pixman" = "internal" ; then
-    echo "subdir-$target: subdir-pixman" >> $config_host_mak
-  fi
   case "$target_arch2" in
     i386|x86_64)
       echo "CONFIG_HAVE_CORE_DUMP=y" >> $config_target_mak
@@ -4156,6 +4153,10 @@ echo "QEMU_INCLUDES+=$includes" >> $config_target_mak
 
 done # for target in $targets
 
+if [ "$pixman" = "internal" ]; then
+  echo "config-host.h: subdir-pixman" >> $config_host_mak
+fi
+
 # build tree in object directory in case the source is not in the current directory
 DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32"
 DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"
Signature · 1 line
1.7.1