openbsd-ports/emulators/qemu/patches/patch-Makefile_target
fgsch 11f007dd2c workaround to make qemu happy on amd64 until a better and more correct
fix is applied.
sturm@ ok, maintainer ok a previous more generic approach.
2005-11-03 18:41:55 +00:00

63 lines
1.8 KiB
Plaintext

$OpenBSD: patch-Makefile_target,v 1.5 2005/11/03 18:41:55 fgsch Exp $
--- Makefile.target.orig Sun Sep 4 14:11:31 2005
+++ Makefile.target Tue Oct 25 02:44:17 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=
@@ -138,6 +138,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
@@ -151,6 +157,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
@@ -269,7 +277,10 @@ AUDIODRV += sdlaudio.o
endif
ifdef CONFIG_OSS
AUDIODRV += ossaudio.o
+ifdef CONFIG_OSS_LIBRARY
+LIBS += -lossaudio
endif
+endif
pc.o: DEFINES := -DUSE_SB16 $(DEFINES)
@@ -288,6 +299,7 @@ ifeq ($(TARGET_BASE_ARCH), i386)
VL_OBJS+= ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o
VL_OBJS+= cirrus_vga.o mixeng.o apic.o parallel.o
+VL_OBJS+= pcnet.o
endif
ifeq ($(TARGET_BASE_ARCH), ppc)
VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
@@ -427,7 +439,7 @@ clean:
install: all
ifneq ($(PROGS),)
- install -m 755 -s $(PROGS) "$(bindir)"
+ install -m 755 -s $(PROGS) "$(PREFIX)/bin/"
endif
ifneq ($(wildcard .depend),)