$OpenBSD: patch-Makefile_defs,v 1.6 2015/11/20 10:09:52 sthen Exp $
--- Makefile.defs.orig	Fri Oct  2 15:35:19 2015
+++ Makefile.defs	Wed Oct 21 02:36:24 2015
@@ -300,9 +300,9 @@ ppc_macros= __powerpc __powerpc__ __POWERPC__ __ppc__ 
 ppc64_macros= __ppc64__ _ARCH_PPC64
 
 mips_macros= __mips__ __mips _MIPS_ARCH_MIPS1
-mips2_macros= _MIPS_ISA_MIPS2 _MIPS_ISA_MIPS3 _MIPS_ISA_MIPS4 \
+mips2_macros= _MIPS_ISA_MIPS2 _MIPS_ISA_MIPS4 \
 			_MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4
-mips64_macros= _MIPS_ISA_MIPS64 _MIPS_ARCH_MIPS64
+mips64_macros= _MIPS_ISA_MIPS64 _MIPS_ARCH_MIPS64 _MIPS_ISA_MIPS3
 
 alpha_macros= __alpha__ __alpha _M_ALPHA_
 
@@ -373,7 +373,7 @@ endif
 endif
 
 # dirs
-cfg_dir = etc/$(MAIN_NAME)/
+cfg_dir = share/examples/$(MAIN_NAME)/
 bin_dir = sbin/
 share_dir = share/$(MAIN_NAME)/
 # lib/$(MAIN_NAME)/modules , lib/$(MAIN_NAME)/modules-s, lib/$(MAIN_NAME)/modules-k
@@ -459,11 +459,11 @@ data_prefix = $(basedir)$(prefix)
 
 
 # target dirs for various stuff
-cfg_target = $(prefix)/$(cfg_dir)
+cfg_target = $(SYSCONFDIR)/$(MAIN_NAME)/
 bin_target = $(prefix)/$(bin_dir)
 #modules_target = $(prefix)/$(modules_dir)
 lib_target = $(prefix)/$(lib_dir)
-run_target = $(run_prefix)/$(run_dir)
+run_target = $(VARBASE)/run/$(MAIN_NAME)/
 doc_target = $(prefix)/$(doc_dir)
 data_target = $(prefix)/$(data_dir)
 
@@ -841,16 +841,12 @@ ifeq	($(ARCH), i386)
 ifeq		($(CC_NAME), gcc) 
 				C_DEFS+=-DCC_GCC_LIKE_ASM
 				#common stuff
-				CFLAGS=-g $(CC_OPT) -funroll-loops  -Wcast-align $(PROFILE)
+				CFLAGS=
 			#if gcc 5.0+, 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+,$(CC_SHORTVER))))
 $(call				set_if_empty,CPU,athlon64)
-					CFLAGS+=-m32 -minline-all-stringops \
-							-falign-loops \
-							-ftree-vectorize \
-							-fno-strict-overflow \
-							-mtune=$(CPU)
-					LDFLAGS+=-m32
+					CFLAGS+=
+					LDFLAGS+=
 else
 			#if gcc 4.0+
 ifeq			($(CC_SHORTVER), 4.x)
@@ -923,7 +919,7 @@ ifeq	($(ARCH), x86_64)
 ifeq		($(CC_NAME), gcc)
 				C_DEFS+=-DCC_GCC_LIKE_ASM
 				#common stuff
-				CFLAGS=-g $(CC_OPT) -funroll-loops  -Wcast-align $(PROFILE)
+				CFLAGS=
 			#if gcc 4.5+
 			# don't add '-mtune=$(CPU)' - gcc failure
 ifeq			($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.5+ 5.0+))
@@ -937,12 +933,8 @@ else
 			#if gcc 4.2+
 ifeq			($(CC_SHORTVER), 4.2+)
 $(call				set_if_empty,CPU,opteron)
-					CFLAGS+=-m64 -minline-all-stringops \
-							-falign-loops \
-							-ftree-vectorize \
-							-fno-strict-overflow \
-							-mtune=$(CPU)
-					LDFLAGS+=-m64
+					CFLAGS+=
+					LDFLAGS+=
 else
 			#if gcc 4.0+
 ifeq			($(CC_SHORTVER), 4.x)
@@ -1848,9 +1840,10 @@ endif
 
 ifeq ($(OS), openbsd)
 	C_DEFS+=-DHAVE_SOCKADDR_SA_LEN  -DHAVE_GETHOSTBYNAME2 \
-		-DHAVE_UNION_SEMUN -DHAVE_MSGHDR_MSG_CONTROL \
-		-DHAVE_CONNECT_ECONNRESET_BUG -DHAVE_TIMEGM \
-		-DHAVE_NETINET_IN_SYSTM -DUSE_SIGWAIT
+		-DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD \
+		-DHAVE_MSGHDR_MSG_CONTROL -DHAVE_CONNECT_ECONNRESET_BUG \
+		-DHAVE_TIMEGM -DHAVE_NETINET_IN_SYSTM \
+		-DUSE_SIGWAIT
 	ifneq ($(found_lock_method), yes)
 		C_DEFS+= -DUSE_PTHREAD_MUTEX  # try pthread sems
 		found_lock_method=yes
