From owner-svn-ports-all@freebsd.org Thu Jun 27 17:18:19 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B687A15C82B5; Thu, 27 Jun 2019 17:18:18 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A17E8E921; Thu, 27 Jun 2019 17:18:18 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34B931A563; Thu, 27 Jun 2019 17:18:18 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5RHIIIU038375; Thu, 27 Jun 2019 17:18:18 GMT (envelope-from pkubaj@FreeBSD.org) Received: (from pkubaj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5RHIHKC038374; Thu, 27 Jun 2019 17:18:17 GMT (envelope-from pkubaj@FreeBSD.org) Message-Id: <201906271718.x5RHIHKC038374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkubaj set sender to pkubaj@FreeBSD.org using -f From: Piotr Kubaj Date: Thu, 27 Jun 2019 17:18:17 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r505212 - in head/math/openblas: . files X-SVN-Group: ports-head X-SVN-Commit-Author: pkubaj X-SVN-Commit-Paths: in head/math/openblas: . files X-SVN-Commit-Revision: 505212 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5A17E8E921 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jun 2019 17:18:19 -0000 Author: pkubaj Date: Thu Jun 27 17:18:17 2019 New Revision: 505212 URL: https://svnweb.freebsd.org/changeset/ports/505212 Log: math/openblas: fix build on powerpc64 This port needs a patch (modified for kernel/power/*.S which differ) from https://github.com/xianyi/OpenBLAS/pull/2169 to build on powerpc64. Since optimizing for PPC970 ends with an error, optimize for POWER6 on powerpc64. PR: 238825 Approved by: phd_kimberlite@yahoo.co.jp (maintainer), mat (mentor) Differential Revision: https://reviews.freebsd.org/D20777 Added: head/math/openblas/files/patch-common__power.h (contents, props changed) Modified: head/math/openblas/Makefile Modified: head/math/openblas/Makefile ============================================================================== --- head/math/openblas/Makefile Thu Jun 27 17:17:36 2019 (r505211) +++ head/math/openblas/Makefile Thu Jun 27 17:18:17 2019 (r505212) @@ -17,8 +17,6 @@ COMMENT= Optimized BLAS library based on GotoBLAS2 LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN_powerpc64= fails to compile: gemm.c:403: 'SGEMM_DEFAULT_Q' undeclared (first use in this function) - USES= fortran gmake perl5 USE_GITHUB= yes @@ -56,6 +54,10 @@ AVX2_DESC= Support Advanced Vector Extensions 2 (AVX2 .include +.if ${ARCH} == powerpc64 +TARGET_CPU_ARCH= POWER6 +.endif + .if defined(TARGET_CPU_ARCH) BUILDFLAGS+= TARGET=${TARGET_CPU_ARCH} .endif @@ -84,6 +86,8 @@ BUILDFLAGS+= INTERFACE64=1 .if ${PORT_OPTIONS:MOPENMP} USES+= compiler:openmp BUILDFLAGS_THREAD+= USE_OPENMP=1 +.else +USES+= compiler:c11 .endif .if ! ${PORT_OPTIONS:MAVX} @@ -131,6 +135,10 @@ post-patch: -e 's+$${CROSS_SUFFIX}+${LOCALBASE}/bin/+' \ -e '/Clang.*OpenMP/g' \ ${WRKSRC}/Makefile.system + ${REINPLACE_CMD} \ + -e 's/defined(linux)/(defined(linux) || defined(__FreeBSD__))/g' \ + -e 's/ifdef linux/if defined(linux) || defined(__FreeBSD__)/g' \ + ${WRKSRC}/kernel/power/*.S post-patch-OPENMP-on: ${REINPLACE_CMD} -e "s+OPENBLAS_NUM_THREADS+OMP_NUM_THREADS+g" \ Added: head/math/openblas/files/patch-common__power.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/math/openblas/files/patch-common__power.h Thu Jun 27 17:18:17 2019 (r505212) @@ -0,0 +1,29 @@ +--- common_power.h.orig 2019-06-26 10:25:04 UTC ++++ common_power.h +@@ -499,7 +499,7 @@ static inline int blas_quickdivide(blasint x, blasint + + #if defined(ASSEMBLER) && !defined(NEEDPARAM) + +-#ifdef OS_LINUX ++#if defined(OS_LINUX) || defined(OS_FREEBSD) + #ifndef __64BIT__ + #define PROLOGUE \ + .section .text;\ +@@ -774,7 +774,7 @@ Lmcount$lazy_ptr: + + #define HALT mfspr r0, 1023 + +-#ifdef OS_LINUX ++#if defined(OS_LINUX) || defined(OS_FREEBSD) + #if defined(PPC440) || defined(PPC440FP2) + #undef MAX_CPU_NUMBER + #define MAX_CPU_NUMBER 1 +@@ -819,7 +819,7 @@ Lmcount$lazy_ptr: + #define MAP_ANONYMOUS MAP_ANON + #endif + +-#ifdef OS_LINUX ++#if defined(OS_LINUX) || defined(OS_FREEBSD) + #ifndef __64BIT__ + #define FRAMESLOT(X) (((X) * 4) + 8) + #else