Skip to content

Commit

Permalink
Eliminate 'default' MODEL, instead compute from uname -m
Browse files Browse the repository at this point in the history
  • Loading branch information
andralex committed Dec 10, 2013
1 parent db35781 commit 3fdd7cb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions posix.mak
Expand Up @@ -48,11 +48,21 @@ ifeq (,$(OS))
$(error Unrecognized or unsupported OS for uname: $(uname_S))
endif

MODEL:=default
ifneq (default,$(MODEL))
MODEL_FLAG:=-m$(MODEL)
ifeq (,$(MODEL))
uname_M:=$(shell uname -m)
ifeq (x86_64,$(uname_M))
MODEL=64
else
ifeq (i686,$(uname_M))
MODEL=32
else
$(error Cannot figure 32/64 model from uname -m: $(uname_M))
endif
endif
endif

MODEL_FLAG:=-m$(MODEL)

override PIC:=$(if $(PIC),-fPIC,)

# Configurable stuff that's rarely edited
Expand Down

0 comments on commit 3fdd7cb

Please sign in to comment.