diff options
author | Araq <rumpf_a@web.de> | 2012-07-29 00:23:37 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-07-29 00:23:37 +0200 |
commit | 48e95fe9f9ce1a412e7fddc8293a2b1db7f46bbd (patch) | |
tree | 663a3d15e4d9943a6f215d8fe37350e67d011c3f | |
parent | d962b75c183ed04612dc20919d94925f3eaa161b (diff) | |
download | Nim-48e95fe9f9ce1a412e7fddc8293a2b1db7f46bbd.tar.gz |
added some support for Haiku
-rwxr-xr-x | compiler/condsyms.nim | 3 | ||||
-rwxr-xr-x | compiler/platform.nim | 6 | ||||
-rwxr-xr-x | tools/niminst/buildsh.tmpl | 40 | ||||
-rwxr-xr-x | web/news.txt | 4 |
4 files changed, 33 insertions, 20 deletions
diff --git a/compiler/condsyms.nim b/compiler/condsyms.nim index 5467e3929..b0ecef816 100755 --- a/compiler/condsyms.nim +++ b/compiler/condsyms.nim @@ -68,7 +68,8 @@ proc InitDefines*() = of osWindows: DefineSymbol("mswindows") DefineSymbol("win32") - of osLinux, osMorphOS, osSkyOS, osIrix, osPalmOS, osQNX, osAtari, osAix: + of osLinux, osMorphOS, osSkyOS, osIrix, osPalmOS, osQNX, osAtari, osAix, + osHaiku: # these are all 'unix-like' DefineSymbol("unix") DefineSymbol("posix") diff --git a/compiler/platform.nim b/compiler/platform.nim index f4cf3b882..1e73faa5d 100755 --- a/compiler/platform.nim +++ b/compiler/platform.nim @@ -21,7 +21,7 @@ type # conditionals to condsyms (end of module). osNone, osDos, osWindows, osOs2, osLinux, osMorphos, osSkyos, osSolaris, osIrix, osNetbsd, osFreebsd, osOpenbsd, osAix, osPalmos, osQnx, osAmiga, - osAtari, osNetware, osMacos, osMacosx, osEcmaScript, osNimrodVM, + osAtari, osNetware, osMacos, osMacosx, osHaiku, osEcmaScript, osNimrodVM, osStandalone type @@ -132,6 +132,10 @@ const objExt: ".o", newLine: "\x0A", pathSep: ":", dirSep: "/", scriptExt: ".sh", curDir: ".", exeExt: "", extSep: ".", props: {ospNeedsPIC, ospPosix, ospLacksThreadVars}), + (name: "Haiku", parDir: "..", dllFrmt: "lib$1.so", altDirSep: ":", + objExt: ".o", newLine: "\x0A", pathSep: ":", dirSep: "/", + scriptExt: ".sh", curDir: ".", exeExt: "", extSep: ".", + props: {ospNeedsPIC, ospPosix, ospLacksThreadVars}), (name: "EcmaScript", parDir: "..", dllFrmt: "lib$1.so", altDirSep: "/", objExt: ".o", newLine: "\x0A", diff --git a/tools/niminst/buildsh.tmpl b/tools/niminst/buildsh.tmpl index f35a8f221..e528fe3ab 100755 --- a/tools/niminst/buildsh.tmpl +++ b/tools/niminst/buildsh.tmpl @@ -8,23 +8,23 @@ set -e while : do - case "$1" in - --extraBuildArgs) - extraBuildArgs=" $2" - shift 2 - ;; - --) # End of all options - shift - break; - ;; - -*) - echo "Error: Unknown option: $1" >&2 - exit 1 - ;; - *) # No more options - break - ;; - esac + case "$1" in + --extraBuildArgs) + extraBuildArgs=" $2" + shift 2 + ;; + --) # End of all options + shift + break; + ;; + -*) + echo "Error: Unknown option: $1" >&2 + exit 1 + ;; + *) # No more options + break + ;; + esac done CC="gcc" @@ -71,6 +71,10 @@ case $uos in myos="solaris" LINK_FLAGS="$LINK_FLAGS -ldl -lm" ;; + *haiku* ) + myos="haiku" + # Haiku does not need -ldl nor -lm + ;; *) echo "Error: unknown operating system: $uos" exit 1 @@ -78,7 +82,7 @@ case $uos in esac case $ucpu in - *i386* | *i486* | *i586* | *i686* ) + *i386* | *i486* | *i586* | *i686* | *bepc* ) mycpu="i386" ;; *amd*64* | *x86-64* | *x86_64* ) mycpu="amd64" ;; diff --git a/web/news.txt b/web/news.txt index 63dd7587b..b445ff8c4 100755 --- a/web/news.txt +++ b/web/news.txt @@ -99,6 +99,10 @@ Changes affecting backwards compatibility to ``int8``. - ``bind`` expressions in templates are not properly supported anymore. Use the declarative ``bind`` statement instead. +- The default calling convention for a procedural **type** is now ``closure``, + for procs it remains ``nimcall`` (which is compatible to ``closure``). + Activate the warning ``ImplicitClosure`` to make the compiler list the + occurances of proc types which are affected. Compiler Additions |