mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-21 16:31:39 +00:00
Fix platform detection in makefile (#6751)
This commit is contained in:
committed by
Andreas Rumpf
parent
39c304f882
commit
0d81ada619
@@ -17,7 +17,6 @@ endif
|
||||
|
||||
ucpu := $(shell sh -c 'uname -m | tr "[:upper:]" "[:lower:]"')
|
||||
uos := $(shell sh -c 'uname | tr "[:upper:]" "[:lower:]"')
|
||||
uosname := $(shell sh -c 'uname -o | tr "[:upper:]" "[:lower:]"')
|
||||
|
||||
ifeq ($(uos),linux)
|
||||
myos = linux
|
||||
@@ -65,15 +64,10 @@ endif
|
||||
ifeq ($(uos),haiku)
|
||||
myos = haiku
|
||||
endif
|
||||
ifndef uos
|
||||
ifndef myos
|
||||
$(error unknown operating system: $(uos))
|
||||
endif
|
||||
|
||||
ifeq ($(uosname),android)
|
||||
myos = android
|
||||
LINK_FLAGS += -landroid-glob
|
||||
endif
|
||||
|
||||
ifeq ($(ucpu),i386)
|
||||
mycpu = i386
|
||||
endif
|
||||
@@ -141,7 +135,16 @@ endif
|
||||
ifeq ($(ucpu),armv6l)
|
||||
mycpu = arm
|
||||
endif
|
||||
ifndef ucpu
|
||||
ifeq ($(ucpu),armv7l)
|
||||
mycpu = arm
|
||||
endif
|
||||
ifeq ($(ucpu),armv7hl)
|
||||
mycpu = arm
|
||||
endif
|
||||
ifeq ($(ucpu),aarch64)
|
||||
mycpu = arm64
|
||||
endif
|
||||
ifndef mycpu
|
||||
$(error unknown processor: $(ucpu))
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user