Isaku Yamahata
2008-Aug-25 05:31 UTC
[Xen-devel] [PATCH] ioemu-remote: fix cross compilation.
When cross compile, INSTALL is set to cross-install by --install configure option. However it is overwritten by including $(XEN_ROOT)/tools/Rules.mk so that install command fails to strip as follows. So after the include set INSTALL again when --install is passed to configure.> install -m 755 -s qemu-img-xen "/xen-unstable.hg/dist/install/usr/bin" > strip: Unable to recognise the format of the input file `/xen-unstable.hg/dist/install/usr/bin/qemu-img-xen'' > install: strip process terminated abnormallySigned-off-by: Isaku Yamahata <yamahata@valinux.co.jp> --- xen-setup | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/xen-setup b/xen-setup index 7f8768d..88f56dd 100755 --- a/xen-setup +++ b/xen-setup @@ -21,6 +21,13 @@ ln -sf ../Makefile.target $target/Makefile ln -sf ../xen-config.mak $target/config.mak cat xen-config-host.mak >>config-host.mak +# even if --install is specified to configure to set INSTALL, +# "include $(XEN_ROOT)/tools/Rules.mk" overrides INSTALL, so set it again. +echo $@ | grep -q -- --install +if [ $? -eq 0 ]; then + grep INSTALL config-host.mak >>config-host.mak +fi + sed -e ''s,qemu,xen/qemu,'' config-host.h >config-host.h.new echo ''#include "xen-config-host.h"'' >>config-host.h.new -- 1.6.0.rc0.42.g186458 -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2008-Aug-28 14:39 UTC
[Xen-ia64-devel] Re: [Xen-devel] [PATCH] ioemu-remote: fix cross compilation.
Isaku Yamahata writes ("[Xen-devel] [PATCH] ioemu-remote: fix cross compilation."):> When cross compile, INSTALL is set to cross-install by --install > configure option. > > However it is overwritten by including $(XEN_ROOT)/tools/Rules.mk > so that install command fails to strip as follows. > So after the include set INSTALL again when --install is passed > to configure.I think this is quite ugly really. We''re engaging in a war of makefiles. Why can''t Rules.mk set the right version of install ? Ian. _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
Isaku Yamahata
2008-Aug-29 02:36 UTC
Re: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] ioemu-remote: fix cross compilation.
On Thu, Aug 28, 2008 at 03:39:39PM +0100, Ian Jackson wrote:> Isaku Yamahata writes ("[Xen-devel] [PATCH] ioemu-remote: fix cross compilation."): > > When cross compile, INSTALL is set to cross-install by --install > > configure option. > > > > However it is overwritten by including $(XEN_ROOT)/tools/Rules.mk > > so that install command fails to strip as follows. > > So after the include set INSTALL again when --install is passed > > to configure. > > I think this is quite ugly really. We''re engaging in a war of > makefiles. Why can''t Rules.mk set the right version of install ? > > Ian.Yes, it''s ugly. How about the followings? Which do you prefer? One candidate is to modify ioemu-remote/Makefile, Makefile.target, another is for the xen-unstable. Making INSTALL overridable isn''t intuit... qemu-dm and qemu-dm-xen are the only commands in the xen source tree which is installed with strip option, "-s". The issue isn''t which install command is used, but which strip command is invoked by the install command. GCC knows where commands are stored, however the install command doesn''t. tools/cross-install is a simple wrapper shell script to set up PATH for the install command to find the correct strip command by adding a directory in front of PATH. Modifying PATH in tools/Makefile doesn''t work because the install command is invoked via shell which resets PATH. diff --git a/Makefile b/Makefile index bebd244..b055b3f 100644 --- a/Makefile +++ b/Makefile @@ -205,7 +205,7 @@ endif install: all $(if $(BUILD_DOCS),install-doc) mkdir -p "$(DESTDIR)$(bindir)" ifneq ($(TOOLS),) - $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" + $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)" endif mkdir -p "$(DESTDIR)$(datadir)" set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ diff --git a/Makefile.target b/Makefile.target index 1aace9c..e796d61 100644 --- a/Makefile.target +++ b/Makefile.target @@ -707,7 +707,7 @@ clean: install: all install-hook ifneq ($(PROGS),) - $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" + $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" endif # Include automatically generated dependency files --------------------------------------------------------------------------- or diff -r 7f653c6ce545 config/StdGNU.mk --- a/config/StdGNU.mk Mon Aug 25 12:37:36 2008 +0900 +++ b/config/StdGNU.mk Fri Aug 29 11:12:41 2008 +0900 @@ -16,7 +16,7 @@ # Allow git to be wrappered in the environment GIT ?= git -INSTALL = install +INSTALL ?= install INSTALL_DIR = $(INSTALL) -d -m0755 -p INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p diff -r 7f653c6ce545 config/SunOS.mk --- a/config/SunOS.mk Mon Aug 25 12:37:36 2008 +0900 +++ b/config/SunOS.mk Fri Aug 29 11:12:41 2008 +0900 @@ -14,7 +14,7 @@ SHELL = bash -INSTALL = ginstall +INSTALL ?= ginstall INSTALL_DIR = $(INSTALL) -d -m0755 -p INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p -- yamahata _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
Ian Jackson
2008-Aug-29 09:22 UTC
Re: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] ioemu-remote: fix cross compilation.
Isaku Yamahata writes ("Re: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] ioemu-remote: fix cross compilation."):> On Thu, Aug 28, 2008 at 03:39:39PM +0100, Ian Jackson wrote: > > I think this is quite ugly really. We''re engaging in a war of > > makefiles. Why can''t Rules.mk set the right version of install ? > > Yes, it''s ugly. How about the followings? Which do you prefer? > One candidate is to modify ioemu-remote/Makefile, Makefile.target, > another is for the xen-unstable. Making INSTALL overridable > isn''t intuit...I meant that the xen-unstable tree should set INSTALL to the cross-install wrapper.> qemu-dm and qemu-dm-xen are the only commands in the xen source tree > which is installed with strip option, "-s".Presumably the xen-unstable tree calls $(CROSS_COMPILE)strip instead, which works. I agree that this is better but I don''t want to have a deviation from the upstream makefiles in qemu.> Modifying PATH in tools/Makefile doesn''t work because the install > command is invoked via shell which resets PATH.That can''t be right. Running something via a shell does not normally reset the PATH. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Isaku Yamahata
2008-Aug-29 10:11 UTC
Re: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] ioemu-remote: fix cross compilation.
On Fri, Aug 29, 2008 at 10:22:07AM +0100, Ian Jackson wrote:> Isaku Yamahata writes ("Re: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] ioemu-remote: fix cross compilation."): > > On Thu, Aug 28, 2008 at 03:39:39PM +0100, Ian Jackson wrote: > > > I think this is quite ugly really. We''re engaging in a war of > > > makefiles. Why can''t Rules.mk set the right version of install ? > > > > Yes, it''s ugly. How about the followings? Which do you prefer? > > One candidate is to modify ioemu-remote/Makefile, Makefile.target, > > another is for the xen-unstable. Making INSTALL overridable > > isn''t intuit... > > I meant that the xen-unstable tree should set INSTALL to the > cross-install wrapper.Something like the following? I didn''t touch SunOS.mk intentionally because I don''t have the environment. And I''ll leave it to sun guys. build system: make INSTALL cross aware. When cross compiling, use cross-install instead of the install command. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> diff -r 0d7da13ec71b config/StdGNU.mk --- a/config/StdGNU.mk Thu Aug 21 16:21:10 2008 +0900 +++ b/config/StdGNU.mk Fri Aug 29 19:11:06 2008 +0900 @@ -16,7 +16,11 @@ # Allow git to be wrappered in the environment GIT ?= git +ifneq ($(CROSS_COMPILE),) +INSTALL = $(XEN_ROOT)/tools/cross-install +else INSTALL = install +endif INSTALL_DIR = $(INSTALL) -d -m0755 -p INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) -m0755 -p -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2008-Aug-29 13:50 UTC
Re: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] ioemu-remote: fix cross compilation.
Isaku Yamahata writes ("Re: [Xen-ia64-devel] Re: [Xen-devel] [PATCH] ioemu-remote: fix cross compilation."):> Something like the following?...> +ifneq ($(CROSS_COMPILE),) > +INSTALL = $(XEN_ROOT)/tools/cross-install > +else > INSTALL = install > +endifYes. Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel