patch-compiler_extccomp_nim 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. $OpenBSD: patch-compiler_extccomp_nim,v 1.3 2017/01/09 10:32:33 juanfra Exp $
  2. --- compiler/extccomp.nim.orig Sun Jan 8 21:33:43 2017
  3. +++ compiler/extccomp.nim Mon Jan 9 02:22:00 2017
  4. @@ -21,7 +21,7 @@ import
  5. type
  6. TSystemCC* = enum
  7. ccNone, ccGcc, ccLLVM_Gcc, ccCLang, ccLcc, ccBcc, ccDmc, ccWcc, ccVcc,
  8. - ccTcc, ccPcc, ccUcc, ccIcl, asmFasm
  9. + ccTcc, ccPcc, ccUcc, ccIcl, asmFasm, ccEGcc
  10. TInfoCCProp* = enum # properties of the C compiler:
  11. hasSwitchRange, # CC allows ranges in switch statements (GNU C)
  12. hasComputedGoto, # CC has computed goto (GNU C extension)
  13. @@ -69,8 +69,8 @@ compiler gcc:
  14. result = (
  15. name: "gcc",
  16. objExt: "o",
  17. - optSpeed: " -O3 -ffast-math ",
  18. - optSize: " -Os -ffast-math ",
  19. + optSpeed: " -O2 ",
  20. + optSize: " -Os ",
  21. compilerExe: "gcc",
  22. cppCompiler: "g++",
  23. compileTmpl: "-c $options $include -o $objfile $file",
  24. @@ -90,6 +90,13 @@ compiler gcc:
  25. props: {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard, hasGnuAsm,
  26. hasAttribute})
  27. +compiler egcc:
  28. + result = gcc()
  29. +
  30. + result.name = "egcc"
  31. + result.compilerExe = "egcc"
  32. + result.cppCompiler = "eg++"
  33. +
  34. # LLVM Frontend for GCC/G++
  35. compiler llvmGcc:
  36. result = gcc() # Uses settings from GCC
  37. @@ -359,7 +366,8 @@ const
  38. pcc(),
  39. ucc(),
  40. icl(),
  41. - fasm()]
  42. + fasm(),
  43. + egcc()]
  44. hExt* = ".h"