From 53371b7e21c9eafcf0f480c22b5a9b3fe6219632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trung=20L=C3=AA?= <8@tle.id.au> Date: Thu, 17 Aug 2023 10:50:58 +1000 Subject: [PATCH] Refactor Makefile to support PowerPC64 LE --- Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index e658f2c44c..440a5826ad 100644 --- a/Makefile +++ b/Makefile @@ -369,13 +369,17 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu") OPTIMIZE = $(OPTIMIZEVM) -ffast-math HAVE_VM_COMPILED=true else - ifeq ($(ARCH),ppc) - ALTIVEC_CFLAGS = -maltivec + ifneq ($(findstring $(ARCH),ppc ppc64 ppc64le),) HAVE_VM_COMPILED=true endif + ifeq ($(ARCH),ppc) + OPTIMIZE += -mcpu=powerpc + endif ifeq ($(ARCH),ppc64) - ALTIVEC_CFLAGS = -maltivec - HAVE_VM_COMPILED=true + OPTIMIZE += -mcpu=power7 + endif + ifeq ($(ARCH),ppc64le) + OPTIMIZE += -mcpu=power8 endif ifeq ($(ARCH),sparc) OPTIMIZE += -mtune=ultrasparc3 -mv8plus @@ -424,10 +428,6 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu") ifeq ($(ARCH),x86) # linux32 make ... BASE_CFLAGS += -m32 - else - ifeq ($(ARCH),ppc64) - BASE_CFLAGS += -m64 - endif endif else # ifeq Linux @@ -2257,7 +2257,7 @@ ifeq ($(HAVE_VM_COMPILED),true) Q3OBJ += \ $(B)/client/vm_x86.o endif - ifneq ($(findstring $(ARCH),ppc ppc64),) + ifneq ($(findstring $(ARCH),ppc ppc64 ppc64le),) Q3OBJ += $(B)/client/vm_powerpc.o $(B)/client/vm_powerpc_asm.o endif ifeq ($(ARCH),sparc) @@ -2433,7 +2433,7 @@ ifeq ($(HAVE_VM_COMPILED),true) Q3DOBJ += \ $(B)/ded/vm_x86.o endif - ifneq ($(findstring $(ARCH),ppc ppc64),) + ifneq ($(findstring $(ARCH),ppc ppc64 ppc64le),) Q3DOBJ += $(B)/ded/vm_powerpc.o $(B)/ded/vm_powerpc_asm.o endif ifeq ($(ARCH),sparc)