From 342608db0c65191251da75020eba42afd30d6c70 Mon Sep 17 00:00:00 2001 From: Mikhail Sobolev Date: Mon, 12 Jan 2015 11:16:52 +0200 Subject: [PATCH] make FreeBSD's compiler clang * there's not much documentation about what's in nim.cfg file * the build.sh template was updated based on darwin --- config/nim.cfg | 2 +- tools/niminst/buildsh.tmpl | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config/nim.cfg b/config/nim.cfg index 018e21b178..54c77e5734 100644 --- a/config/nim.cfg +++ b/config/nim.cfg @@ -100,7 +100,7 @@ hint[LineTooLong]=off @end @end -@if macosx: +@if macosx or freebsd: cc = clang tlsEmulation:on gcc.options.always = "-w -fasm-blocks" diff --git a/tools/niminst/buildsh.tmpl b/tools/niminst/buildsh.tmpl index 4966af07a2..d9508f515d 100644 --- a/tools/niminst/buildsh.tmpl +++ b/tools/niminst/buildsh.tmpl @@ -54,10 +54,16 @@ case $uos in myos="linux" LINK_FLAGS="$LINK_FLAGS -ldl -lm" ;; - *freebsd* | *dragonfly* ) + *dragonfly* ) myos="freebsd" LINK_FLAGS="$LINK_FLAGS -lm" ;; + *freebsd* ) + myos="freebsd" + CC="clang" + LINKER="clang" + LINK_FLAGS="$LINK_FLAGS -ldl -lm" + ;; *openbsd* ) myos="openbsd" LINK_FLAGS="$LINK_FLAGS -lm"