Skip to content

Commit

Permalink
Fix nim-lang#14715 - detect tool fails on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
euantorano authored Jun 18, 2020
1 parent bb62fef commit 6bab60c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/detect/detect.nim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# compilation.
import os, strutils

when defined(openbsd):
when defined(openbsd) or defined(freebsd) or defined(netbsd):
const
cc = "cc -o $# $#.c"
cpp = "cc -E -o $#.i $#.c"
Expand Down Expand Up @@ -98,8 +98,8 @@ proc main =
f.write(nimfile % [other])
close(f)

let cCompile = when defined(openbsd): ccLinkMath else: cc
let cppCompile = when defined(openbsd): cppLinkMath else: cpp
let cCompile = defined(openbsd) or defined(freebsd) or defined(netbsd): ccLinkMath else: cc
let cppCompile = defined(openbsd) or defined(freebsd) or defined(netbsd): cppLinkMath else: cpp
if not myExec(cCompile % [gen.addFileExt(ExeExt), gen]): quit(1)
if not myExec(cppCompile % [pre.addFileExt(ExeExt), pre]): quit(1)
when defined(windows):
Expand Down

0 comments on commit 6bab60c

Please sign in to comment.