Merge pull request #1098 from jmallach/master

Add arch defines for Linux alpha and mips64el.
This commit is contained in:
Vas Crabb 2016-07-14 09:14:40 +10:00 committed by GitHub
commit 7e817e399a
2 changed files with 23 additions and 0 deletions

View File

@ -140,6 +140,12 @@ endif
ifneq ($(filter %86,$(UNAME_P)),)
PLATFORM := x86
endif
ifneq ($(filter alpha,$(UNAME_M)),)
PLATFORM := alpha
endif
ifneq ($(filter alpha,$(UNAME_P)),)
PLATFORM := alpha
endif
ifneq ($(filter arm%,$(UNAME_M)),)
PLATFORM := arm
endif
@ -155,6 +161,11 @@ endif
ifneq ($(filter powerpc,$(UNAME_P)),)
PLATFORM := powerpc
endif
ifneq ($(filter mips64%,$(UNAME_M)),)
ifeq ($(shell getconf LONG_BIT),64)
PLATFORM := mips64
endif
endif
ifeq ($(firstword $(filter Linux,$(UNAME))),Linux)
OS := linux
endif

View File

@ -982,6 +982,12 @@ end
end
end
if (_OPTIONS["PLATFORM"]=="alpha") then
defines {
"PTR64=1",
}
end
if (_OPTIONS["PLATFORM"]=="arm") then
buildoptions {
"-Wno-cast-align",
@ -997,6 +1003,12 @@ if (_OPTIONS["PLATFORM"]=="arm64") then
}
end
if (_OPTIONS["PLATFORM"]=="mips64") then
defines {
"PTR64=1",
}
end
local subdir
if (_OPTIONS["target"] == _OPTIONS["subtarget"]) then
subdir = _OPTIONS["osd"] .. "/" .. _OPTIONS["target"]