Description: kfreebsd uses ELF
 .
 cbmc (5.9-5) unstable; urgency=low
 .
   * Add support for goto-gcc on kfreebsd
Author: Michael Tautschnig <mt@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2018-07-04

--- cbmc-5.9.orig/src/goto-cc/as_mode.cpp
+++ cbmc-5.9/src/goto-cc/as_mode.cpp
@@ -302,7 +302,7 @@ int as_modet::as_hybrid_binary()
   debug() << "merging " << output_file << eom;
   std::string saved=output_file+".goto-cc-saved";
 
-  #ifdef __linux__
+  #if defined(__linux__) || defined(__FreeBSD_kernel__)
   if(result==0)
   {
     // remove any existing goto-cc section
--- cbmc-5.9.orig/src/goto-cc/hybrid_binary.cpp
+++ cbmc-5.9/src/goto-cc/hybrid_binary.cpp
@@ -26,7 +26,7 @@ int hybrid_binary(
 
   int result;
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
   std::string objcopy_cmd;
 
   if(has_suffix(compiler_or_linker, "-ld"))
