diff options
author | Eugene Kabanov <ka@hardcore.kiev.ua> | 2017-03-16 15:47:53 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-03-16 14:47:53 +0100 |
commit | 9c99973ff867110c17a706c4481a90ade1cf0758 (patch) | |
tree | ae46ccfe077b22ff3fffe699c15fd9a27167c88d /compiler | |
parent | 13ba0b557e7009a397fa550747fbc92e6fb15400 (diff) | |
download | Nim-9c99973ff867110c17a706c4481a90ade1cf0758.tar.gz |
Make DragonFlyBSD a first class BSD-like OS (#5548)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/condsyms.nim | 7 | ||||
-rw-r--r-- | compiler/installer.ini | 1 | ||||
-rw-r--r-- | compiler/platform.nim | 11 |
3 files changed, 14 insertions, 5 deletions
diff --git a/compiler/condsyms.nim b/compiler/condsyms.nim index a738ddb48..4303fd6c8 100644 --- a/compiler/condsyms.nim +++ b/compiler/condsyms.nim @@ -41,9 +41,9 @@ proc isDefined*(symbol: string): bool = result = targetOS in {osLinux, osMorphos, osSkyos, osIrix, osPalmos, osQnx, osAtari, osAix, osHaiku, osVxWorks, osSolaris, osNetbsd, - osFreebsd, osOpenbsd, osMacosx} + osFreebsd, osOpenbsd, osDragonfly, osMacosx} of "bsd": - result = targetOS in {osNetbsd, osFreebsd, osOpenbsd} + result = targetOS in {osNetbsd, osFreebsd, osOpenbsd, osDragonfly} of "emulatedthreadvars": result = platform.OS[targetOS].props.contains(ospLacksThreadVars) of "msdos": result = targetOS == osDos @@ -57,7 +57,8 @@ proc isDefined*(symbol: string): bool = of "cpu32": result = CPU[targetCPU].bit == 32 of "cpu64": result = CPU[targetCPU].bit == 64 of "nimrawsetjmp": - result = targetOS in {osSolaris, osNetbsd, osFreebsd, osOpenbsd, osMacosx} + result = targetOS in {osSolaris, osNetbsd, osFreebsd, osOpenbsd, + osDragonfly, osMacosx} else: discard proc isDefined*(symbol: PIdent): bool = isDefined(symbol.s) diff --git a/compiler/installer.ini b/compiler/installer.ini index 5021cc05a..0987aa6be 100644 --- a/compiler/installer.ini +++ b/compiler/installer.ini @@ -12,6 +12,7 @@ Platforms: """ freebsd: i386;amd64 netbsd: i386;amd64 openbsd: i386;amd64 + dragonfly: i386;amd64 haiku: i386;amd64 """ diff --git a/compiler/platform.nim b/compiler/platform.nim index 36ec10477..19d0d5853 100644 --- a/compiler/platform.nim +++ b/compiler/platform.nim @@ -20,8 +20,8 @@ type TSystemOS* = enum # Also add OS in initialization section and alias # 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, osHaiku, osVxworks, + osIrix, osNetbsd, osFreebsd, osOpenbsd, osDragonfly, osAix, osPalmos, osQnx, + osAmiga, osAtari, osNetware, osMacos, osMacosx, osHaiku, osVxworks, osJS, osNimrodVM, osStandalone type @@ -98,6 +98,13 @@ const scriptExt: ".sh", curDir: ".", exeExt: "", extSep: ".", props: {ospNeedsPIC, ospPosix}), + (name: "DragonFly", parDir: "..", + dllFrmt: "lib$1.so", altDirSep: "/", + objExt: ".o", newLine: "\x0A", + pathSep: ":", dirSep: "/", + scriptExt: ".sh", curDir: ".", + exeExt: "", extSep: ".", + props: {ospNeedsPIC, ospPosix}), (name: "AIX", parDir: "..", dllFrmt: "lib$1.so", altDirSep: "/", objExt: ".o", newLine: "\x0A", pathSep: ":", dirSep: "/", scriptExt: ".sh", curDir: ".", exeExt: "", extSep: ".", |