pixman: pass extra cflags and ldflags
PATCH 1/1 pixman: pass extra cflags and ldflags
Store --extra-cflags and --extra-ldflags in config-host.mak, then pass them on to the pixman configure script.
Cc Scott Wood <[email protected]>
Signed-off-by Gerd Hoffmann <[email protected]>
--- Makefile | 2 +- configure | 4 ++++ 2 files changed, 5 insertions(+), 1 deletions(-)
Makefile +1 -1
@@ -126,7 +126,7 @@ subdir-pixman: pixman/Makefile $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pixman V="$(V)" all,) pixman/Makefile: $(SRC_PATH)/pixman/configure - (cd pixman; CFLAGS="$(CFLAGS) -fPIC" $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static) + (cd pixman; CFLAGS="$(CFLAGS) -fPIC $(extra_cflags) $(extra_ldflags)" $(SRC_PATH)/pixman/configure $(AUTOCONF_HOST) --disable-gtk --disable-shared --enable-static) $(SRC_PATH)/pixman/configure: (cd $(SRC_PATH)/pixman; autoreconf -v --install)
configure +4 -0
@@ -238,8 +238,10 @@ for opt do --cpu=*) cpu="$optarg" ;; --extra-cflags=*) QEMU_CFLAGS="$optarg $QEMU_CFLAGS" + EXTRA_CFLAGS="$optarg" ;; --extra-ldflags=*) LDFLAGS="$optarg $LDFLAGS" + EXTRA_LDFLAGS="$optarg" ;; --enable-debug-info) debug_info="yes" ;;
@@ -3334,6 +3336,8 @@ echo "qemu_datadir=$qemu_datadir" >> $config_host_mak echo "qemu_docdir=$qemu_docdir" >> $config_host_mak echo "qemu_localstatedir=$local_statedir" >> $config_host_mak echo "qemu_helperdir=$libexecdir" >> $config_host_mak +echo "extra_cflags=$EXTRA_CFLAGS" >> $config_host_mak +echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak echo "ARCH=$ARCH" >> $config_host_mak if test "$debug_tcg" = "yes" ; then
Signature · 1 line
1.7.1
Quoted 9 lines · Gerd Hoffmann
Store --extra-cflags and --extra-ldflags in config-host.mak, then pass them on to the pixman configure script.
Cc Scott Wood <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>--- Makefile | 2 +- configure | 4 ++++ 2 files changed, 5 insertions(+), 1 deletions(-)
This fixes pixman cross-compile for me; thanks!
BTW, one thing I noticed when testing this was that "make clean" at the qemu level won't cause pixman to be fully cleaned (the final library file remains, and won't be rebuilt).
-Scott