From b14ef0e24bcb70d70360690130b2bf2a0c8f8d33 Mon Sep 17 00:00:00 2001 From: Edmund Grimley Evans Date: Fri, 13 Feb 2015 18:58:31 +0000 Subject: Add arm64 (AArch64) as a target architecture. --- lib/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/Makefile') diff --git a/lib/Makefile b/lib/Makefile index 37d4711..6e192b9 100644 --- a/lib/Makefile +++ b/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) -- cgit v1.3.1