All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/5] Drop OP_CFLAGS
Date: Mon, 19 Jan 2009 13:47:19 +0200	[thread overview]
Message-ID: <1232365643-6417-2-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1232365643-6417-1-git-send-email-avi@redhat.com>

OP_CFLAGS is no longer used, except for machine.c, where it is not needed.

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 Makefile.target |   52 +++++-----------------------------------------------
 1 files changed, 5 insertions(+), 47 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index a97edd7..7d9fe7b 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -71,90 +71,49 @@ endif
 
 PROGS=$(QEMU_PROG)
 
-# We require -O2 to avoid the stack setup prologue in EXIT_TB
-OP_CFLAGS := -O2 -g -fno-strict-aliasing
-OP_CFLAGS += -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls
-
 # cc-option
-# Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
-
-cc-option = $(shell if $(CC) $(OP_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
-              > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+# Usage: CFLAGS+=$(call cc-option, $(CFLAGS), -falign-functions=0, -malign-functions=0)
 
-OP_CFLAGS+=$(call cc-option, -fno-reorder-blocks, "")
-OP_CFLAGS+=$(call cc-option, -fno-gcse, "")
-OP_CFLAGS+=$(call cc-option, -fno-tree-ch, "")
-OP_CFLAGS+=$(call cc-option, -fno-optimize-sibling-calls, "")
-OP_CFLAGS+=$(call cc-option, -fno-crossjumping, "")
-OP_CFLAGS+=$(call cc-option, -fno-align-labels, "")
-OP_CFLAGS+=$(call cc-option, -fno-align-jumps, "")
-OP_CFLAGS+=$(call cc-option, -fno-align-functions, $(call cc-option, -malign-functions=0, ""))
-OP_CFLAGS+=$(call cc-option, -fno-section-anchors, "")
+cc-option = $(shell if $(CC) $(1) $(2) -S -o /dev/null -xc /dev/null \
+              > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi ;)
 
 HELPER_CFLAGS=
 
 ifeq ($(ARCH),i386)
 HELPER_CFLAGS+=-fomit-frame-pointer
-OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer
 endif
 
 ifeq ($(ARCH),sparc)
   CFLAGS+=-ffixed-g2 -ffixed-g3
-  OP_CFLAGS+=-fno-delayed-branch -ffixed-i0
-  ifeq ($(CONFIG_SOLARIS),yes)
-    OP_CFLAGS+=-fno-omit-frame-pointer
-  else
+  ifneq ($(CONFIG_SOLARIS),yes)
     CFLAGS+=-ffixed-g1 -ffixed-g6
     HELPER_CFLAGS+=-ffixed-i0
   endif
 endif
 
 ifeq ($(ARCH),sparc64)
-  OP_CFLAGS+=-mcpu=ultrasparc -m64 -fno-delayed-branch -ffixed-i0
   ifneq ($(CONFIG_SOLARIS),yes)
     CFLAGS+=-ffixed-g5 -ffixed-g6 -ffixed-g7
-    OP_CFLAGS+=-ffixed-g5 -ffixed-g6 -ffixed-g7
   else
     CFLAGS+=-ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7
   endif
 endif
 
 ifeq ($(ARCH),alpha)
-# -msmall-data is not used for OP_CFLAGS because we want two-instruction
-# relocations for the constant constructions
 # Ensure there's only a single GP
 CFLAGS+=-msmall-data
 endif
 
 ifeq ($(ARCH),hppa)
-OP_CFLAGS=-O1 -fno-delayed-branch
 BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
 endif
 
 ifeq ($(ARCH),ia64)
 CFLAGS+=-mno-sdata
-OP_CFLAGS+=-mno-sdata
-endif
-
-ifeq ($(ARCH),arm)
-OP_CFLAGS+=-mno-sched-prolog -fno-omit-frame-pointer
-endif
-
-ifeq ($(ARCH),m68k)
-OP_CFLAGS+=-fomit-frame-pointer
-endif
-
-ifeq ($(ARCH),mips)
-OP_CFLAGS+=-mabi=32 -G0 -fno-PIC -mno-abicalls -fomit-frame-pointer -fno-delayed-branch -Wa,-O0
-endif
-
-ifeq ($(ARCH),mips64)
-OP_CFLAGS+=-mabi=n32 -G0 -fno-PIC -mno-abicalls -fomit-frame-pointer -fno-delayed-branch -Wa,-O0
 endif
 
 CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS)
 LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS)
-OP_CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS)
 
 CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 LIBS+=-lm
@@ -166,7 +125,6 @@ LIBS+=-lsocket -lnsl -lresolv
 ifdef NEEDS_LIBSUNMATH
 LIBS+=-lsunmath
 LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib
-OP_CFLAGS+=-I/opt/SUNWspro/prod/include/cc
 CFLAGS+=-I/opt/SUNWspro/prod/include/cc
 endif
 endif
@@ -262,7 +220,7 @@ translate-all.o: translate-all.c cpu.h
 tcg/tcg.o: cpu.h
 
 machine.o: machine.c
-	$(CC) $(OP_CFLAGS) $(CPPFLAGS) -c -o $@ $<
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
 # HELPER_CFLAGS is used for all the code compiled with static register
 # variables
-- 
1.6.0.6

  reply	other threads:[~2009-01-19 11:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19 11:47 [Qemu-devel] [PATCH 0/5] Makefile enhancements Avi Kivity
2009-01-19 11:47 ` Avi Kivity [this message]
2009-01-19 11:47 ` [Qemu-devel] [PATCH 2/5] Consolidate compiler invocations Avi Kivity
2009-01-19 11:47 ` [Qemu-devel] [PATCH 3/5] Introduce rules.mak Avi Kivity
2009-01-21 15:57   ` [Qemu-devel] " Anthony Liguori
2009-01-21 17:08     ` Avi Kivity
2009-01-19 11:47 ` [Qemu-devel] [PATCH 4/5] Consolidate linker rules Avi Kivity
2009-01-19 11:47 ` [Qemu-devel] [PATCH 5/5] Make make output quieter Avi Kivity
2009-01-19 16:03 ` [Qemu-devel] Re: [PATCH 0/5] Makefile enhancements Anthony Liguori
2009-01-19 16:14   ` Paul Brook

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=1232365643-6417-2-git-send-email-avi@redhat.com \
    --to=avi@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.