Permalink
Browse files

linux: fix compiling under a 32-bit VM/64-bit arch

Fix build failure:

#13

rebar designates 32-bit VM on x864_64 as
"R16B03-1-i686-pc-linux-gnu-32".

My guess is that a half-word emulator will be reported as
"x86_64.*-32", so try to accomodate this case as well.

Thanks @NAR!
  • Loading branch information...
1 parent 9b1342e commit 94bd7bc2162f18f8b3f4ba60437d3c6d93054cb6 @msantos committed Jan 29, 2014
Showing with 7 additions and 3 deletions.
  1. +7 −3 rebar.config
View
@@ -4,9 +4,13 @@
{port_env, [
{"LDFLAGS", "$LDFLAGS -Lc_src -lancillary"},
- {"x86_64", "PROCKET_CFLAGS", "-m$(ERLANG_ARCH)"},
- {"i686", "PROCKET_CFLAGS", "-m$(ERLANG_ARCH)"},
- {"i386", "PROCKET_CFLAGS", "-m$(ERLANG_ARCH)"}
+ {"x86_64", "PROCKET_CFLAGS", "-m$ERLANG_ARCH"},
+ {"x86_64", "CFLAGS", "$CFLAGS -m$ERLANG_ARCH"},
+ {"x86_64", "LDFLAGS", "-m$ERLANG_ARCH $LDFLAGS"},
+ {"i686", "PROCKET_CFLAGS", "-m$ERLANG_ARCH"},
+ {"i686", "CFLAGS", "$CFLAGS -m$ERLANG_ARCH"},
+ {"i686", "LDFLAGS", "-m$ERLANG_ARCH $LDFLAGS"},
+ {"i386", "PROCKET_CFLAGS", "-m$ERLANG_ARCH"}
]}.
{pre_hooks, [

0 comments on commit 94bd7bc

Please sign in to comment.