openbsd-ports/emulators/qemu/patches/patch-Makefile_target
todd 9993d5d566 update to 0.8.0, see qemu.org for full ChangeLog
for OpenBSD, amd64 simulation on i386 appars to work ok now
2005-12-27 07:56:14 +00:00

63 lines
1.8 KiB
Plaintext

$OpenBSD: patch-Makefile_target,v 1.6 2005/12/27 07:56:15 todd Exp $
--- Makefile.target.orig Mon Dec 19 16:51:53 2005
+++ Makefile.target Tue Dec 20 11:18:25 2005
@@ -17,7 +17,7 @@ ifdef CONFIG_USER_ONLY
VPATH+=:$(SRC_PATH)/linux-user
DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
endif
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+#CFLAGS=-Wall -O2 -g -fno-strict-aliasing
#CFLAGS+=-Werror
LDFLAGS=-g
LIBS=
@@ -137,7 +137,7 @@ LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64
endif
ifeq ($(ARCH),arm)
-OP_CFLAGS=$(CFLAGS) -mno-sched-prolog -fno-omit-frame-pointer
+OP_CFLAGS=$(CFLAGS) -mno-sched-prolog -fno-omit-frame-pointer -mapcs-frame
LDFLAGS+=-Wl,-T,$(SRC_PATH)/arm.ld
endif
@@ -146,6 +146,12 @@ OP_CFLAGS=$(CFLAGS) -fomit-frame-pointer
LDFLAGS+=-Wl,-T,m68k.ld
endif
+# Very important for this 'ifeq' block to be after other
+# OP_CFLAGS= .. constructs above
+ifeq ($(shell uname -s),OpenBSD)
+OP_CFLAGS+= -fno-stack-protector
+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
@@ -159,6 +165,8 @@ endif
#########################################################
DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
+
+DEFINES+= #-DDEBUG_GDB -DDEBUG -DDEBUG_KBD -DDEBUG_MOUSE
LIBS+=-lm
ifndef CONFIG_USER_ONLY
LIBS+=-lz
@@ -275,6 +283,9 @@ VL_OBJS+=block-cow.o block-qcow.o aes.o
SOUND_HW = sb16.o es1370.o
AUDIODRV = audio.o noaudio.o wavaudio.o
+ifdef CONFIG_OSS_LIBRARY
+LIBS += -lossaudio
+endif
ifdef CONFIG_SDL
AUDIODRV += sdlaudio.o
endif
@@ -462,7 +473,7 @@ clean:
install: all
ifneq ($(PROGS),)
- install -m 755 -s $(PROGS) "$(bindir)"
+ install -m 755 -s $(PROGS) "$(PREFIX)/bin/"
endif
ifneq ($(wildcard .depend),)