$OpenBSD: patch-config_nim_cfg,v 1.2 2016/06/15 00:19:59 juanfra Exp $
--- config/nim.cfg.orig	Tue Jun  7 00:38:56 2016
+++ config/nim.cfg	Thu Jun  9 20:17:49 2016
@@ -80,7 +80,7 @@ path="$lib/pure"
   @end
   @if bsd or haiku:
     # BSD got posix_spawn only recently, so we deactivate it for osproc:
-    define:useFork
+    #define:useFork
     # at least NetBSD has problems with thread local storage:
     tlsEmulation:on
   @end
@@ -108,6 +108,8 @@ path="$lib/pure"
 @else:
   gcc.options.always = "-w"
   gcc.cpp.options.always = "-w -fpermissive"
+  egcc.options.always = "-w"
+  egpp.options.alaways = "-w -fpermissive"
 @end
 
 # Configuration for Objective-C compiler:
@@ -140,15 +142,20 @@ clang.objc.options.linker = "-lobjc -lgnustep-base"
   gcc.options.linker %= "-L $WIND_BASE/target/lib/usr/lib/ppc/PPC32/common -mrtp -fno-strict-aliasing -D_C99 -D_HAS_C9X -std=c99 -fasm -Wall -Wno-write-strings"
 @end
 
-gcc.options.speed = "-O3 -fno-strict-aliasing"
+gcc.options.speed = "-O2 -fno-strict-aliasing"
 gcc.options.size = "-Os"
 gcc.options.debug = "-g3 -O0"
 
-gcc.cpp.options.speed = "-O3 -fno-strict-aliasing"
+gcc.cpp.options.speed = "-O2 -fno-strict-aliasing"
 gcc.cpp.options.size = "-Os"
 gcc.cpp.options.debug = "-g3 -O0"
 #passl = "-pg"
 
+# Configuration for the OpenBSD ports GCC compiler:
+egcc.options.speed = "-O2 -fno-strict-aliasing"
+egcc.options.size = "-Os"
+egcc.options.debug = "-g3 -O0"
+
 # Configuration for the LLVM GCC compiler:
 llvm_gcc.options.debug = "-g"
 llvm_gcc.options.always = "-w"
@@ -158,7 +165,7 @@ llvm_gcc.options.size = "-Os"
 # Configuration for the LLVM CLang compiler:
 clang.options.debug = "-g"
 clang.options.always = "-w"
-clang.options.speed = "-O3"
+clang.options.speed = "-O2"
 clang.options.size = "-Os"
 
 # Configuration for the Visual C/C++ compiler:
