Skip to content
Snippets Groups Projects
Commit cd2f071f authored by deuce's avatar deuce
Browse files

Get the architecture from ld rather than uname on OS X.

parent d5d059e7
Branches
Tags
No related merge requests found
......@@ -196,8 +196,13 @@ ifndef os
endif
os := $(shell echo $(os) | tr '[A-Z]' '[a-z]' | tr ' ' '_')
machine := $(shell if uname -m | egrep -v "(i[3456789]*|x)86" > /dev/null; then uname -m | tr "[A-Z]" "[a-z]" | tr " " "_" ; fi)
machine := $(shell if uname -m | egrep "64" > /dev/null; then uname -m | tr "[A-Z]" "[a-z]" | tr " " "_" ; else echo $(machine) ; fi)
ifeq ($(os),darwin)
machine := $(shell ld -w 2>&1 | sed -E 's/.*[[:space:]]//')
else
machine := $(shell if uname -m | egrep -v "(i[3456789]*|x)86" > /dev/null; then uname -m | tr "[A-Z]" "[a-z]" | tr " " "_" ; fi)
machine := $(shell if uname -m | egrep "64" > /dev/null; then uname -m | tr "[A-Z]" "[a-z]" | tr " " "_" ; else echo $(machine) ; fi)
endif
ifeq ($(machine),x86_64)
machine := x64
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment