mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-24 23:53:04 +00:00
Makefile, asm.py: Work on native arm64 by default
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
4c672c00b6
commit
29a85d6857
2 changed files with 11 additions and 3 deletions
7
Makefile
7
Makefile
|
@ -1,4 +1,3 @@
|
|||
ARCH ?= aarch64-linux-gnu-
|
||||
RUSTARCH ?= aarch64-unknown-none-softfloat
|
||||
|
||||
ifeq ($(shell uname),Darwin)
|
||||
|
@ -12,6 +11,12 @@ endif
|
|||
$(info INFO: Toolchain path: $(TOOLCHAIN))
|
||||
endif
|
||||
|
||||
ifeq ($(shell uname -m),aarch64)
|
||||
ARCH ?=
|
||||
else
|
||||
ARCH ?= aarch64-linux-gnu-
|
||||
endif
|
||||
|
||||
ifeq ($(USE_CLANG),1)
|
||||
CC := $(TOOLCHAIN)clang --target=$(ARCH)
|
||||
AS := $(TOOLCHAIN)clang --target=$(ARCH)
|
||||
|
|
|
@ -12,7 +12,10 @@ if uname.sysname == "Darwin":
|
|||
TOOLCHAIN = "/usr/local/opt/llvm/bin/"
|
||||
USE_CLANG = "1"
|
||||
else:
|
||||
DEFAULT_ARCH = "aarch64-linux-gnu-"
|
||||
if uname.machine == "aarch64":
|
||||
DEFAULT_ARCH = ""
|
||||
else:
|
||||
DEFAULT_ARCH = "aarch64-linux-gnu-"
|
||||
USE_CLANG = "0"
|
||||
TOOLCHAIN = ""
|
||||
|
||||
|
@ -98,7 +101,7 @@ class BaseAsm(object):
|
|||
self._tmp = None
|
||||
|
||||
class ARMAsm(BaseAsm):
|
||||
ARCH = os.path.join(os.environ.get("ARCH", "aarch64-linux-gnu-"))
|
||||
ARCH = os.path.join(os.environ.get("ARCH", DEFAULT_ARCH))
|
||||
CFLAGS = "-pipe -Wall -march=armv8.4-a"
|
||||
LDFLAGS = "-maarch64elf"
|
||||
HEADER = """
|
||||
|
|
Loading…
Reference in a new issue