From: Ian Jackson Subject: [PATCH] tools/configure: add options to pass EXTRA_CLFAGS Date: Tue, 3 Apr 2012 18:13:22 +0100 Message-ID: <20347.12210.719765.271115@mariner.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: xen-devel@lists.xensource.com, Fabio Fantoni List-Id: xen-devel@lists.xenproject.org Olaf Hering writes ("[Xen-devel] [PATCH] tools/configure: add options to pass EXTRA_CLFAGS"): > tools/configure: add options to pass EXTRA_CLFAGS Much of this looks good to me. (Although you need to fix the typo CLFLAGS in the subject...) I'm happy with the changes to all the tools/*/Makefile. > This patch extends configure to recognize three environment variables > which will be written to config/Tools.mk so they will be reused with > each make invocation: > EXTRA_CFLAGS_XEN_TOOLS= specifies CFLAGS for the tools build. > EXTRA_CFLAGS_QEMU_TRADITIONAL= specifies CFLAGS for old qemu. > EXTRA_CFLAGS_QEMU_XEN= specifies CFLAGS for new qemu. > The new feature can be used like this in a rpm xen.spec file: I'm not sure why it is necessary to plumb these through our configure and Tools.mk. Why can't we just take them from the environment (or the make command line) ? However, > cd qemu-xen-traditional-dir; \ > + env CFLAGS="$(EXTRA_CFLAGS_QEMU_TRADITIONAL)" \ > $(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS); \ > $(MAKE) install I'm not really sure that this is a good idea. Note that the xen-setup script in qemu-xen-traditional already imports many of the settings from the Xen tree. I think this would be a better approach than a blanket export of CFLAGS. > @@ -146,6 +147,7 @@ subdir-all-qemu-xen-dir subdir-install-q > source=.; \ > fi; \ > cd qemu-xen-dir; \ > + env CFLAGS="$(EXTRA_CFLAGS_QEMU_XEN)" \ > $$source/configure --enable-xen --target-list=i386-softmmu \ > --source-path=$$source \ > --extra-cflags="-I$(XEN_ROOT)/tools/include \ And this definitely isn't a good idea, unless you can find me some documentation from qemu upstream which says that it is a supported approach. Thanks, Ian.