xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xensource.com
Subject: [PATCH] tools/qemu-xen: remove CFLAGS for qemu build
Date: Thu, 23 Feb 2012 17:45:57 +0100	[thread overview]
Message-ID: <5bdbdcb03d60a7b58f41.1330015557@probook.site> (raw)

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1330015545 -3600
# Node ID 5bdbdcb03d60a7b58f41306ef39cb988100efbe4
# Parent  56214b978466914c1b9f8adb1158a3217a823e42
tools/qemu-xen: remove CFLAGS for qemu build

Currently qemu-xen gets build with CFLAGS only if CFLAGS was already in
the environment during make invocation. If CFLAGS is in environment then
make will append all of the various flags specified in xen Makefiles,
which is then passed to qemu configure. If CFLAGS is not set, then
configure will use just "-O2 -g" because make does not export its own
CFLAGS variable.

To make qemu-xen build consistent this change removes CFLAGS from the
environment so that only the CFLAGS from qemu configure script will be
used. This matches what is done in kvm.rpm and qemu.rpm where for
example RPM_OPT_FLAGS is not passes as CFLAGS. Otherwise those packages
would not build as well.

Passing makes CFLAGS to configure will lead to build errors:
- xen Makefiles append -std=gnu99, this breaks qemu build due to a bug
  in header file:
fpu/softfloat-specialize.h:107: error: initializer element is not constant
- in 32bit builds, qemus configure script will append -mcpu=i486 in an
  odd way, which leads to unknown gcc cmdline options due to a missing
  space
- xen Makefiles will append -Wall which will expose all sorts of style
  issues in the qemu code
- in one case some of the asm() blocks will not compile with gcc 4.6 in
  openSuSE 12.1

Until upstream qemu has fixed all these issues use no extra CFLAGS to
configure qemu-xen.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

diff -r 56214b978466 -r 5bdbdcb03d60 tools/Makefile
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -146,6 +146,7 @@ subdir-all-qemu-xen-dir subdir-install-q
 		source=.; \
 	fi; \
 	cd qemu-xen-dir; \
+	env -u CFLAGS \
 	$$source/configure --enable-xen --target-list=i386-softmmu \
 		--source-path=$$source \
 		--extra-cflags="-I$(XEN_ROOT)/tools/include \

             reply	other threads:[~2012-02-23 16:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 16:45 Olaf Hering [this message]
2012-03-01 17:42 ` [PATCH] tools/qemu-xen: remove CFLAGS for qemu build Ian Jackson
2012-03-01 17:53   ` Olaf Hering
2012-03-01 18:20     ` Ian Jackson
2012-03-01 19:08       ` Olaf Hering
2012-03-02 11:51       ` Olaf Hering
2012-03-14 12:04         ` Ian Jackson
2012-03-14 16:46           ` Olaf Hering
2012-03-14 18:07             ` Olaf Hering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5bdbdcb03d60a7b58f41.1330015557@probook.site \
    --to=olaf@aepfle.de \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).