openbsd-ports/emulators/qemu/patches/patch-Makefile_target

64 lines
1.8 KiB
Plaintext

$OpenBSD: patch-Makefile_target,v 1.10 2006/12/22 17:31:45 todd Exp $
--- Makefile.target.orig Sat Jul 22 13:23:34 2006
+++ Makefile.target Mon Dec 18 17:16:21 2006
@@ -17,8 +17,9 @@ 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
+CFLAGS+= -ggdb
LDFLAGS=-g
LIBS=
HELPER_CFLAGS=$(CFLAGS)
@@ -144,7 +145,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
@@ -153,6 +154,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
@@ -166,6 +173,7 @@ 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
@@ -297,6 +305,9 @@ endif
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
@@ -403,7 +414,7 @@ endif
ifndef CONFIG_DARWIN
ifndef CONFIG_WIN32
ifndef CONFIG_SOLARIS
-VL_LIBS=-lutil -lrt
+#VL_LIBS=-lutil -lrt
endif
endif
endif