openbsd-ports/lang/nim/patches/patch-compiler_extccomp_nim
juanfra 8d456a4ddc Changes:
- Update to nim 0.11.2
- Enable the tests
- lang/nimrod -> lang/nim

OK jturner@

Comment:
statically typed, imperative programming language

Description:
Nim is a statically typed, imperative programming language that tries
to give the programmer ultimate power without compromises on runtime
efficiency. This means it focuses on compile-time mechanisms in all
their various forms.

Beneath a nice infix/indentation based syntax with a powerful (AST
based, hygienic) macro system lies a semantic model that supports a soft
realtime GC on thread local heaps. Asynchronous message passing is used
between threads, so no "stop the world" mechanism is necessary. An
unsafe shared memory heap is also provided for the increased efficiency
that results from that model.

Maintainer: James Turner <james@calminferno.net>

WWW: http://nim-lang.org/
2015-10-19 21:50:14 +00:00

48 lines
1.4 KiB
Plaintext

$OpenBSD: patch-compiler_extccomp_nim,v 1.1.1.1 2015/10/19 21:50:14 juanfra Exp $
--- compiler/extccomp.nim.orig Sun Sep 13 00:55:21 2015
+++ compiler/extccomp.nim Sun Sep 13 01:01:06 2015
@@ -18,7 +18,7 @@ import
type
TSystemCC* = enum
ccNone, ccGcc, ccLLVM_Gcc, ccCLang, ccLcc, ccBcc, ccDmc, ccWcc, ccVcc,
- ccTcc, ccPcc, ccUcc, ccIcl
+ ccTcc, ccPcc, ccUcc, ccIcl, 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)
@@ -66,8 +66,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",
@@ -87,6 +87,13 @@ compiler gcc:
props: {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard, hasGnuAsm,
hasNakedAttribute})
+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
@@ -330,7 +337,8 @@ const
tcc(),
pcc(),
ucc(),
- icl()]
+ icl(),
+ egcc()]
hExt* = ".h"