anchor.diff:      o3 -> "-O3";
       undefined -> "-O2"
     end.
  +
  +llc_ver_flags(Ver = {_, _}) when Ver >= {3,9} ->
  +  %% Works around a bug in the x86-call-frame-opt pass (as of LLVM 3.9) that
  +  %% break the garbage collection stack descriptors.
  +  ["-no-x86-call-frame-opt"];
  +llc_ver_flags({_, _}) -> [].
   
   %%------------------------------------------------------------------------------
   %% Functions to manage Relocations
  
positive.code: 
  %% @doc Invoke llc tool to compile the bitcode to object file
  %%      (_name.bc -> _name.o).
  llvm_llc(Dir, Filename, Options) ->
    Source   = Dir ++ Filename ++ ".bc",
    OptLevel = trans_optlev_flag(llc, Options),
    Align    = find_stack_alignment(),
    LlcFlags = [OptLevel, "-code-model=medium", "-stack-alignment=" ++ Align
               , "-tailcallopt", "-filetype=asm"], %%FIXME
    Command  = "llc " ++ fix_opts(LlcFlags) ++ " " ++ Source,
    %% io:format("LLC: ~s~n", [Command]),
    case os:cmd(Command) of
  
negative.code:   __ = file:close(File_llvm),
    %% Invoke LLVM compiler tools to produce an object file
    llvm_opt(Dir, Filename, Options),
    llvm_llc(Dir, Filename, Ver, Options),
    compile(Dir, Filename, "gcc"), %%FIXME: use llc -filetype=obj and skip this!
    {ok, Dir, Dir ++ Filename ++ ".o"}.
  
  