$OpenBSD: patch-compiler_extccomp_nim,v 1.3 2017/01/09 10:32:33 juanfra Exp $
--- compiler/extccomp.nim.orig	Sun Jan  8 21:33:43 2017
+++ compiler/extccomp.nim	Mon Jan  9 02:22:00 2017
@@ -21,7 +21,7 @@ import
 type
   TSystemCC* = enum
     ccNone, ccGcc, ccLLVM_Gcc, ccCLang, ccLcc, ccBcc, ccDmc, ccWcc, ccVcc,
-    ccTcc, ccPcc, ccUcc, ccIcl, asmFasm
+    ccTcc, ccPcc, ccUcc, ccIcl, asmFasm, ccEGcc
   TInfoCCProp* = enum         # properties of the C compiler:
     hasSwitchRange,           # CC allows ranges in switch statements (GNU C)
     hasComputedGoto,          # CC has computed goto (GNU C extension)
@@ -69,8 +69,8 @@ compiler gcc:
   result = (
     name: "gcc",
     objExt: "o",
-    optSpeed: " -O3 -ffast-math ",
-    optSize: " -Os -ffast-math ",
+    optSpeed: " -O2 ",
+    optSize: " -Os ",
     compilerExe: "gcc",
     cppCompiler: "g++",
     compileTmpl: "-c $options $include -o $objfile $file",
@@ -90,6 +90,13 @@ compiler gcc:
     props: {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard, hasGnuAsm,
             hasAttribute})
 
+compiler egcc:
+    result = gcc()
+
+    result.name = "egcc"
+    result.compilerExe = "egcc"
+    result.cppCompiler = "eg++"
+
 # LLVM Frontend for GCC/G++
 compiler llvmGcc:
   result = gcc() # Uses settings from GCC
@@ -359,7 +366,8 @@ const
     pcc(),
     ucc(),
     icl(),
-    fasm()]
+    fasm(),
+    egcc()]
 
   hExt* = ".h"
 
