--- src/compiler/crystal/compiler.cr.orig	2018-06-19 05:20:05.000000000 +0400
+++ src/compiler/crystal/compiler.cr	2018-06-19 05:32:59.000000000 +0400
@@ -324,7 +324,7 @@
 
         link_flags = @link_flags || ""
         link_flags += " -rdynamic"
-        link_flags += " -static" if static?
+        link_flags += " -static" if static? && !program.has_flag? "darwin"
 
         %(#{cc} #{object_name} -o '#{output_filename}' #{link_flags} #{program.lib_flags})
       end