fix i386 and x86_64 builds

This commit is contained in:
David Woodhouse 2006-03-17 14:58:09 +00:00
parent bf4430245c
commit 9f8ef0cfab
2 changed files with 14 additions and 6 deletions

View File

@ -4,7 +4,7 @@
-include config-host.mak
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+CFLAGS=$(subst -mtune=pentium4,-mcpu=pentium4,$(RPM_OPT_FLAGS)) -Wall -fno-strict-aliasing
+CFLAGS=$(subst -mtune=,-mcpu=,$(RPM_OPT_FLAGS)) -Wall -fno-strict-aliasing
ifdef CONFIG_DARWIN
CFLAGS+= -mdynamic-no-pic
endif
@ -15,7 +15,7 @@
DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
endif
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+CFLAGS=$(subst -mtune=pentium4,-mcpu=pentium4,$(RPM_OPT_FLAGS)) -Wall -fno-strict-aliasing
+CFLAGS=$(subst -mtune=,-mcpu=,$(RPM_OPT_FLAGS)) -Wall -fno-strict-aliasing
#CFLAGS+=-Werror
LDFLAGS=-g
LIBS=
@ -24,7 +24,7 @@
# -msmall-data is not used because we want two-instruction relocations
# for the constant constructions
-OP_CFLAGS=-Wall -O2 -g
+OP_CFLAGS=$(subst -mtune=pentium4,-mcpu=pentium4,$(RPM_OPT_FLAGS)) -Wall
+OP_CFLAGS=$(subst -mtune=,-mcpu=,$(RPM_OPT_FLAGS)) -Wall
# Ensure there's only a single GP
CFLAGS += -msmall-data
LDFLAGS+=-Wl,-T,$(SRC_PATH)/alpha.ld

View File

@ -1,12 +1,12 @@
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 0.8.0
Release: 1%{?dist}
Release: 3%{?dist}
License: GPL/LGPL
Group: Development/Tools
URL: http://fabrice.bellard.free.fr/qemu
Source0: http://fabrice.bellard.free.fr/qemu/%{name}-%{version}.tar.gz
Source0: http://www.qemu.org/%{name}-%{version}.tar.gz
Source1: qemu.init
Patch0: qemu-0.7.0-build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@ -36,7 +36,11 @@ As QEMU requires no host kernel patches to run, it is very safe and easy to use.
%patch0 -p1
%build
./configure --prefix=%{_prefix} --interp-prefix=%{_prefix}/qemu-%%M --cc=gcc32 --enable-alsa
./configure --prefix=%{_prefix} --interp-prefix=%{_prefix}/qemu-%%M \
%ifarch x86_64
--target-list="i386-user arm-user armeb-user ppc-user mips-user mipsel-user i386-softmmu ppc-softmmu x86_64-softmmu mips-softmmu arm-softmmu" \
%endif
--cc=gcc32 --enable-alsa
make
%install
@ -74,6 +78,10 @@ fi
%config %{_sysconfdir}/rc.d/init.d/qemu
%changelog
* Fri Mar 17 2006 David Woodhouse <dwmw2@infradead.org> 0.8.0-3
- Use -mcpu= instead of -mtune= on x86_64 too
- Disable SPARC targets on x86_64, because dyngen doesn't like fnegs
* Fri Mar 17 2006 David Woodhouse <dwmw2@infradead.org> 0.8.0-2
- Don't use -mtune=pentium4 on i386. GCC 3.2 doesn't like it