Add arm64 (AArch64) as a target architecture.
This commit is contained in:
12
lib/Makefile
12
lib/Makefile
@ -28,6 +28,11 @@ ifndef TARGET # native library
|
||||
ifeq ($(ARCH),arm)
|
||||
TARGET = arm
|
||||
XCC = $(CC)
|
||||
else
|
||||
ifeq ($(ARCH),arm64)
|
||||
TARGET = arm64
|
||||
else
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@ -49,6 +54,7 @@ X86_64_O = libtcc1.o alloca86_64.o
|
||||
ARM_O = libtcc1.o armeabi.o alloca-arm.o
|
||||
WIN32_O = $(I386_O) crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
|
||||
WIN64_O = $(X86_64_O) crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
|
||||
ARM64_O = lib-arm64.o
|
||||
|
||||
# build TCC runtime library to contain PIC code, so it can be linked
|
||||
# into shared libraries
|
||||
@ -86,6 +92,11 @@ ifeq "$(TARGET)" "arm"
|
||||
OBJ = $(addprefix $(DIR)/,$(ARM_O))
|
||||
TGT = -DTCC_TARGET_ARM
|
||||
XCC ?= $(TCC) -B$(TOP)
|
||||
else
|
||||
ifeq "$(TARGET)" "arm64"
|
||||
OBJ = $(addprefix $(DIR)/,$(ARM64_O))
|
||||
TGT = -DTCC_TARGET_ARM64
|
||||
XCC ?= $(TCC) -B$(TOP)
|
||||
else
|
||||
$(error libtcc1.a not supported on target '$(TARGET)')
|
||||
endif
|
||||
@ -93,6 +104,7 @@ endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
XFLAGS = $(CPPFLAGS) $(CFLAGS) $(PICFLAGS) $(TGT)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user