summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorSergey Avseyev <sergey.avseyev@gmail.com>2015-05-26 08:36:23 +0300
committerSergey Avseyev <sergey.avseyev@gmail.com>2015-05-26 08:40:51 +0300
commit1001fd21665ec1662d42e6e2bdc3cc98318b7002 (patch)
treedfd9e0d3fe7e1ee9782559f596270e20c4a50e9a /lib
parent77b010bd3695b5ec4169cb6c892a036f6af2711e (diff)
downloadNim-1001fd21665ec1662d42e6e2bdc3cc98318b7002.tar.gz
Fix Boehm GC on linux
Motivation
----------
Some linuxes (like Fedora) actually multiarch. And it means that
libgc.so.1 not always installed into /usr/lib. It is better to entrust
this job to ld and system configuration for it.

Modification
------------
Use relative path for Boehm GC on 'other' OS (and linux in particular)

Result
------
It is possible now to build nim with --gc:boehm on linux
Diffstat (limited to 'lib')
-rw-r--r--lib/system/mmdisp.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/system/mmdisp.nim b/lib/system/mmdisp.nim
index a378f86e7..bdbb3a95a 100644
--- a/lib/system/mmdisp.nim
+++ b/lib/system/mmdisp.nim
@@ -70,7 +70,7 @@ when defined(boehmgc):
   elif defined(macosx):
     const boehmLib = "libgc.dylib"
   else:
-    const boehmLib = "/usr/lib/libgc.so.1"
+    const boehmLib = "libgc.so.1"
 
   proc boehmGCinit {.importc: "GC_init", dynlib: boehmLib.}
   proc boehmGC_disable {.importc: "GC_disable", dynlib: boehmLib.}
@@ -335,4 +335,3 @@ else:
     include "system/gc"
 
 {.pop.}
-