diff options
Diffstat (limited to 'src/rebar_port_compiler.erl')
-rw-r--r-- | src/rebar_port_compiler.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl index a9b73cc..ad1e387 100644 --- a/src/rebar_port_compiler.erl +++ b/src/rebar_port_compiler.erl @@ -398,7 +398,14 @@ default_env() -> {"DRV_LDFLAGS", "-shared $ERL_LDFLAGS"}, {"darwin", "DRV_LDFLAGS", "-bundle -flat_namespace -undefined suppress $ERL_LDFLAGS"}, - {"ERLANG_ARCH", integer_to_list(8 * erlang:system_info(wordsize))}, + {"ERLANG_ARCH", + try erlang:system_info({wordsize, external}) of + Val -> + integer_to_list(8 * Val) + catch + error:badarg -> + integer_to_list(8 * erlang:system_info(wordsize)) + end}, {"ERLANG_TARGET", rebar_utils:get_arch()}, %% Solaris specific flags |