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

Use sysctl hw.optional.x86_64 to detect 64-bit support with a 32-bit kernel

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