--- src/Options.ml.orig	2019-08-20 08:05:43.000000000 -0600
+++ src/Options.ml	2019-09-09 11:04:27.000000000 -0600
@@ -27,7 +27,7 @@
 let verbose = ref false
 let silent = ref false
 let exe_name = ref ""
-let cc = ref "gcc"
+let cc = ref "clang"
 let m32 = ref false
 let fsopts: string list ref = ref []
 let ccopts: string list ref = ref []
@@ -86,16 +86,24 @@
     "-ccopts";
     "-Wall,-Werror,-Wno-unused-variable," ^
     "-Wno-unknown-warning-option,-Wno-unused-but-set-variable,-Wno-unused-function," ^
-    "-g,-fwrapv,-D_BSD_SOURCE,-D_DEFAULT_SOURCE" ^
+    "-g,-fwrapv," ^
     (if Sys.os_type = "Win32" then ",-D__USE_MINGW_ANSI_STDIO" else "") ^
     (if !parentheses then "" else ",-Wno-parentheses")
   |] in
   let gcc_options = Array.append gcc_like_options
-    [| "-ccopt"; if !c89_std then "-std=c89" else "-std=c11" |]
+    [| "-ccopt"; if !c89_std then "-std=c89" else "-std=c11" |] in
+  let clang_options = Array.concat [gcc_options;
+  (* '-Winfinite-recursion' is triggered by the use of 'C.portable_exit'
+   * in a recursive function; we need to disable this
+   * warning until KreMLin adds support for the _Noreturn attribute *)
+    [| "-ccopt"; "-Wno-error=infinite-recursion" |];
+  (* '-Wc99-extensions' is triggered by kremlib's use of <stdbool.h> 'bool'
+     in c89 mode *)
+    (if !c89_std then [| "-ccopt"; "-Wno-error=c99-extensions" |] else [| |])]
   in
   [
     "gcc", gcc_options;
-    "clang", gcc_options;
+    "clang", clang_options;
     "g++", gcc_like_options;
     "compcert", [|
       "-warn-error"; "@6@8";
