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
|
RUSTARCH ?= aarch64-unknown-none-softfloat
|
||||||
|
|
||||||
ifeq ($(shell uname),Darwin)
|
ifeq ($(shell uname),Darwin)
|
||||||
|
@ -12,6 +11,12 @@ endif
|
||||||
$(info INFO: Toolchain path: $(TOOLCHAIN))
|
$(info INFO: Toolchain path: $(TOOLCHAIN))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(shell uname -m),aarch64)
|
||||||
|
ARCH ?=
|
||||||
|
else
|
||||||
|
ARCH ?= aarch64-linux-gnu-
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CLANG),1)
|
ifeq ($(USE_CLANG),1)
|
||||||
CC := $(TOOLCHAIN)clang --target=$(ARCH)
|
CC := $(TOOLCHAIN)clang --target=$(ARCH)
|
||||||
AS := $(TOOLCHAIN)clang --target=$(ARCH)
|
AS := $(TOOLCHAIN)clang --target=$(ARCH)
|
||||||
|
|
|
@ -12,6 +12,9 @@ if uname.sysname == "Darwin":
|
||||||
TOOLCHAIN = "/usr/local/opt/llvm/bin/"
|
TOOLCHAIN = "/usr/local/opt/llvm/bin/"
|
||||||
USE_CLANG = "1"
|
USE_CLANG = "1"
|
||||||
else:
|
else:
|
||||||
|
if uname.machine == "aarch64":
|
||||||
|
DEFAULT_ARCH = ""
|
||||||
|
else:
|
||||||
DEFAULT_ARCH = "aarch64-linux-gnu-"
|
DEFAULT_ARCH = "aarch64-linux-gnu-"
|
||||||
USE_CLANG = "0"
|
USE_CLANG = "0"
|
||||||
TOOLCHAIN = ""
|
TOOLCHAIN = ""
|
||||||
|
@ -98,7 +101,7 @@ class BaseAsm(object):
|
||||||
self._tmp = None
|
self._tmp = None
|
||||||
|
|
||||||
class ARMAsm(BaseAsm):
|
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"
|
CFLAGS = "-pipe -Wall -march=armv8.4-a"
|
||||||
LDFLAGS = "-maarch64elf"
|
LDFLAGS = "-maarch64elf"
|
||||||
HEADER = """
|
HEADER = """
|
||||||
|
|
Loading…
Reference in a new issue