Disable compiler options dangerous for op compilation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2495 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
11f295118c
commit
6c041c54bc
@ -70,16 +70,26 @@ BASE_LDFLAGS+=-static
|
||||
endif
|
||||
|
||||
# We require -O2 to avoid the stack setup prologue in EXIT_TB
|
||||
OP_CFLAGS = -Wall -O2 -g -fno-strict-aliasing
|
||||
OP_CFLAGS := -Wall -O2 -g -fno-strict-aliasing
|
||||
|
||||
# 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 ;)
|
||||
|
||||
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, ""))
|
||||
|
||||
ifeq ($(ARCH),i386)
|
||||
HELPER_CFLAGS+=-fomit-frame-pointer
|
||||
OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer
|
||||
ifeq ($(HAVE_GCC3_OPTIONS),yes)
|
||||
OP_CFLAGS+= -falign-functions=0 -fno-gcse
|
||||
else
|
||||
OP_CFLAGS+= -malign-functions=0
|
||||
endif
|
||||
ifdef TARGET_GPROF
|
||||
USE_I386_LD=y
|
||||
endif
|
||||
@ -163,11 +173,6 @@ ifeq ($(ARCH),mips)
|
||||
BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GCC3_OPTIONS),yes)
|
||||
# very important to generate a return at the end of every operation
|
||||
OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DARWIN),yes)
|
||||
LIBS+=-lmx
|
||||
endif
|
||||
|
8
configure
vendored
8
configure
vendored
@ -475,11 +475,6 @@ int main(void) {
|
||||
}
|
||||
EOF
|
||||
|
||||
have_gcc3_options="no"
|
||||
if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/null ; then
|
||||
have_gcc3_options="yes"
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# SDL probe
|
||||
|
||||
@ -654,9 +649,6 @@ echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_h
|
||||
echo "MAKE=$make" >> $config_mak
|
||||
echo "INSTALL=$install" >> $config_mak
|
||||
echo "CC=$cc" >> $config_mak
|
||||
if test "$have_gcc3_options" = "yes" ; then
|
||||
echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak
|
||||
fi
|
||||
echo "HOST_CC=$host_cc" >> $config_mak
|
||||
echo "AR=$ar" >> $config_mak
|
||||
echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
|
||||
|
Loading…
Reference in New Issue
Block a user