From owner-freebsd-ports@freebsd.org Sat Feb 27 01:30:43 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0789AB690F for ; Sat, 27 Feb 2016 01:30:43 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 8D3811C56 for ; Sat, 27 Feb 2016 01:30:43 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: by mailman.ysv.freebsd.org (Postfix) id 8CE3AAB690E; Sat, 27 Feb 2016 01:30:43 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C8A9AB690D for ; Sat, 27 Feb 2016 01:30:43 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from nschwmtas01p.mx.bigpond.com (nschwmtas01p.mx.bigpond.com [61.9.189.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "InterMail Test Certificate", Issuer "Certificate Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EFB31C52; Sat, 27 Feb 2016 01:30:42 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from nschwcmgw07p ([61.9.190.167]) by nschwmtas01p.mx.bigpond.com with ESMTP id <20160227013034.SITD2067.nschwmtas01p.mx.bigpond.com@nschwcmgw07p>; Sat, 27 Feb 2016 01:30:34 +0000 Received: from ghanamia.reilly.home ([121.211.74.3]) by nschwcmgw07p with BigPond Outbound id PDWa1s00104FjAp01DWasS; Sat, 27 Feb 2016 01:30:34 +0000 X-Authentication-Info: Submitted using ID areilly@bigpond.net.au X-Authority-Analysis: v=2.0 cv=AdUz7grG c=1 sm=1 a=3jNtSoK4IhUy2m3FAQj8ZQ==:17 a=YQk0uSD5uXIAojWJrUcA:9 a=QEXdDO2ut3YA:10 a=3jNtSoK4IhUy2m3FAQj8ZQ==:117 From: Andrew Reilly Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: openblas 0.2.15,1 port broke build for BARCELONA AMD core Message-Id: <7251C627-A9CC-49F8-A12D-1412D77493EF@bigpond.net.au> Date: Sat, 27 Feb 2016 12:30:33 +1100 To: rakuco@freebsd.org, ports@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) X-Mailer: Apple Mail (2.3112) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Feb 2016 01:30:43 -0000 Hi there, My portmsaster run just broke on the recent openblas upgrade, with = version stamp in head/math/openblas/Makefile 409114 26-02-18 16:35:48Z = rakuco. Now that I=E2=80=99ve hacked on this to make it build, I = remember having done something like this the last time, so perhaps = nothing has actually changed in this respect, there=E2=80=99s just been = a version increase that still doesn=E2=80=99t know about my CPU. My build/target machine is, according to sysctl: hw.machine: amd64 hw.model: AMD A6-3500 APU with Radeon(tm) HD Graphics hw.ncpu: 3 The auto-config system for openblas has determined that this is (in = config.h): #define AMD_UNKNOWN but also #define CORE_BARCELONA #define CHAR_CORENAME =E2=80=9CBARCELONA=E2=80=9D So on the assumption that the AMD_UNKNOWN should be BARCELONA, I have = tweaked cpuid_x86.c to add case 3 along with case 1 and case 10 in the = switch(exfamily) to return CPUTYPE_BARCELONA. I=E2=80=99m not sure if it wouldn=E2=80=99t have been better to slide = that in with case 6, because model=3D1 and support_avx()->0, so that = would have worked too. the full set of get_cputype() values for my machine are: family=3D0xf, exfamily=3D0x3, model=3D0x1, exmodel=3D0x0, support_avx=3D0 The code in cpuid_x86.c thinks that NUM_CORES is 1, despite the sysctl = information above, so I guess that only one core is going to be used, = but since this is not a high performance machine and is generally = thermally challenged, I=E2=80=99m not too concerned about that. Just = want it to build at all. With this couple of tweaks the math/openblas port seems to have built = OK, so I hope that this change can be included in the port or the = up-stream so that I don=E2=80=99t have to remember to do this all again = next time! Cheers, =E2=80=94=20 Andrew