From 9b030d87dc7e6d5f83fa2329121f9ce9867e6288 Mon Sep 17 00:00:00 2001 From: pkubaj Date: Fri, 15 Jan 2021 18:05:24 +0000 Subject: Fix build on FreeBSD/powerpc64 FreeBSD uses powerpc64 name for what Linux calls ppc64. --- makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/makefile b/makefile index 765333c747d..b30b921b352 100644 --- a/makefile +++ b/makefile @@ -322,6 +322,9 @@ endif ifeq ($(firstword $(filter ppc64,$(UNAME))),ppc64) ARCHITECTURE := _x64 endif +ifeq ($(firstword $(filter powerpc64,$(UNAME))),powerpc64) +ARCHITECTURE := _x64 +endif ifeq ($(firstword $(filter ppc64le,$(UNAME))),ppc64le) ARCHITECTURE := _x64 endif @@ -402,6 +405,13 @@ ifndef FORCE_DRC_C_BACKEND endif endif +# powerpc has inline assembly support but no DRC +ifeq ($(findstring powerpc,$(UNAME)),powerpc) +ifndef FORCE_DRC_C_BACKEND + FORCE_DRC_C_BACKEND := 1 +endif +endif + # ARM / ARM64 ifeq ($(findstring arm,$(UNAME)),arm) ifndef FORCE_DRC_C_BACKEND @@ -427,6 +437,14 @@ ifneq (,$(findstring s390x,$(UNAME))) BIGENDIAN := 1 endif endif # BIGENDIAN +# FreeBSD +ifneq (,$(findstring powerpc,$(UNAME))) +ifneq (,$(findstring powerpc64le,$(UNAME))) +BIGENDIAN := 0 +else +BIGENDIAN := 1 +endif +endif ifndef PYTHON_EXECUTABLE PYTHON := python -- cgit v1.2.3