| Submitter | Gerd Hoffmann |
|---|---|
| Date | Nov. 13, 2012, 8:42 a.m. |
| Message ID | <1352796133-956-3-git-send-email-kraxel@redhat.com> |
| Download | mbox | patch |
| Permalink | /patch/198593/ |
| State | New |
| Headers | show |
Comments
Am 13.11.2012 09:42, schrieb Gerd Hoffmann: > Complete the set of compiler tool names in config-host.mak, > pass them to pixman configure to make sure cross builds work. > Based on a patch from Blue Swirl. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > Makefile | 2 +- > configure | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/Makefile b/Makefile > index ca14a21..7b267c9 100644 > --- 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) An alternate solution (which works in my build environment) is passing --host=... (value derived from QEMU cross_prefix) to the pixman configure. > > $(SRC_PATH)/pixman/configure: > (cd $(SRC_PATH)/pixman; autoreconf -v --install) > diff --git a/configure b/configure > index 18faded..e7ca78b 100755 > --- a/configure > +++ b/configure > @@ -252,8 +252,10 @@ done > > cc="${CC-${cross_prefix}gcc}" > ar="${AR-${cross_prefix}ar}" > +nm="${AR-${cross_prefix}nm}" NM instead of AR? > objcopy="${OBJCOPY-${cross_prefix}objcopy}" > ld="${LD-${cross_prefix}ld}" > +ranlib="${LD-${cross_prefix}ranlib}" RANLIB instead of LD? > libtool="${LIBTOOL-${cross_prefix}libtool}" > strip="${STRIP-${cross_prefix}strip}" > windres="${WINDRES-${cross_prefix}windres}" > @@ -3635,8 +3637,10 @@ echo "CC_I386=$cc_i386" >> $config_host_mak > echo "HOST_CC=$host_cc" >> $config_host_mak > echo "OBJCC=$objcc" >> $config_host_mak > echo "AR=$ar" >> $config_host_mak > +echo "NM=$nm" >> $config_host_mak > echo "OBJCOPY=$objcopy" >> $config_host_mak > echo "LD=$ld" >> $config_host_mak > +echo "RANLIB=$ranlib" >> $config_host_mak > echo "WINDRES=$windres" >> $config_host_mak > echo "LIBTOOL=$libtool" >> $config_host_mak > echo "CFLAGS=$CFLAGS" >> $config_host_mak
Hi, > An alternate solution (which works in my build environment) is passing > --host=... (value derived from QEMU cross_prefix) to the pixman configure. Sounds reasonable, I'll try. >> +nm="${AR-${cross_prefix}nm}" > > NM instead of AR? > > RANLIB instead of LD? Indeed. /me wonders why the test builds worked nevertheless. cheers, Gerd
Patch
diff --git a/Makefile b/Makefile index ca14a21..7b267c9 100644 --- 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) $(SRC_PATH)/pixman/configure: (cd $(SRC_PATH)/pixman; autoreconf -v --install) diff --git a/configure b/configure index 18faded..e7ca78b 100755 --- a/configure +++ b/configure @@ -252,8 +252,10 @@ done cc="${CC-${cross_prefix}gcc}" ar="${AR-${cross_prefix}ar}" +nm="${AR-${cross_prefix}nm}" objcopy="${OBJCOPY-${cross_prefix}objcopy}" ld="${LD-${cross_prefix}ld}" +ranlib="${LD-${cross_prefix}ranlib}" libtool="${LIBTOOL-${cross_prefix}libtool}" strip="${STRIP-${cross_prefix}strip}" windres="${WINDRES-${cross_prefix}windres}" @@ -3635,8 +3637,10 @@ echo "CC_I386=$cc_i386" >> $config_host_mak echo "HOST_CC=$host_cc" >> $config_host_mak echo "OBJCC=$objcc" >> $config_host_mak echo "AR=$ar" >> $config_host_mak +echo "NM=$nm" >> $config_host_mak echo "OBJCOPY=$objcopy" >> $config_host_mak echo "LD=$ld" >> $config_host_mak +echo "RANLIB=$ranlib" >> $config_host_mak echo "WINDRES=$windres" >> $config_host_mak echo "LIBTOOL=$libtool" >> $config_host_mak echo "CFLAGS=$CFLAGS" >> $config_host_mak
Complete the set of compiler tool names in config-host.mak, pass them to pixman configure to make sure cross builds work. Based on a patch from Blue Swirl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- Makefile | 2 +- configure | 4 ++++ 2 files changed, 5 insertions(+), 1 deletions(-)