Patchwork [32/81] move common QEMU_CFLAGS to configure

login
register
mail settings
Submitter Juan Quintela
Date Aug. 3, 2009, 12:46 p.m.
Message ID <7fa186f42452d567056b9af343afe250261e7e51.1249301360.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/30533/
State Superseded
Headers show

Comments

Juan Quintela - Aug. 3, 2009, 12:46 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    3 ---
 Makefile.hw     |    4 +---
 Makefile.target |    4 +---
 configure       |    3 +++
 4 files changed, 5 insertions(+), 9 deletions(-)

Patch

diff --git a/Makefile b/Makefile
index 37eba6b..cd130a0 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,6 @@  endif

 VPATH=$(SRC_PATH):$(SRC_PATH)/hw

-QEMU_CFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
-QEMU_CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-QEMU_CFLAGS += -U_FORTIFY_SOURCE
 LIBS+=-lz

 ifdef BUILD_DOCS
diff --git a/Makefile.hw b/Makefile.hw
index 052eb1a..139412e 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -8,9 +8,7 @@  include $(SRC_PATH)/rules.mak

 VPATH=$(SRC_PATH):$(SRC_PATH)/hw

-QEMU_CFLAGS += -I. -I.. -I$(SRC_PATH) -MMD -MP -MT $@
-QEMU_CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-QEMU_CFLAGS+=-I$(SRC_PATH)/fpu
+QEMU_CFLAGS+=-I.. -I$(SRC_PATH)/fpu

 obj-y =
 obj-y += virtio.o virtio-pci.o
diff --git a/Makefile.target b/Makefile.target
index fcf6eeb..60eba31 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -3,7 +3,7 @@  include $(SRC_PATH)/rules.mak

 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
-QEMU_CFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
+QEMU_CFLAGS+= -I.. -I$(TARGET_PATH) -DNEED_CPU_H

 ifdef CONFIG_USER_ONLY
 # user emulator name
@@ -44,8 +44,6 @@  ifeq ($(ARCH),ia64)
 QEMU_CFLAGS+=-mno-sdata
 endif

-QEMU_CFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-QEMU_CFLAGS+=-U_FORTIFY_SOURCE
 LIBS+=-lm
 ifdef CONFIG_SOLARIS
 ifdef CONFIG_NEEDS_LIBSUNMATH
diff --git a/configure b/configure
index 51469fd..01e667f 100755
--- a/configure
+++ b/configure
@@ -1389,6 +1389,9 @@  if test "$debug" = "no" ; then
 fi
 QEMU_CFLAGS="-Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
+QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
+QEMU_CFLAGS="-U_FORTIFY_SOURCE $QEMU_CFLAGS"
+QEMU_CFLAGS="-I. -I\$(SRC_PATH) -MMD -MP -MT \$@ $QEMU_CFLAGS"
 LDFLAGS="-g $LDFLAGS"

 # Consult white-list to determine whether to enable werror