openblas 0.2.15,1 port broke build for BARCELONA AMD core

Raphael Kubo da Costa rakuco at
Sat Mar 5 20:22:34 UTC 2016

Andrew Reilly <areilly at> writes:
> 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’ve 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’s just been a version increase that still doesn’t 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
> 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)
> I’m not sure if it wouldn’t have been better to slide that in with case 6,
> because model=1 and support_avx()->0, so that would have worked too.
> the full set of get_cputype() values for my machine are:
> family=0xf, exfamily=0x3, model=0x1, exmodel=0x0, support_avx=0
> 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’m 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’t have to remember to do this all again next time!

Hi Andrew,

I don't maintain the openblas port, I just committed a patch for it that
was sent to Bugzilla.

This looks like a problem that should be reported upstream
(, it's even possible it's
already been fixed in their git repository.

You can also file a bug in our bug tracker so the port maintainer can
take a look at this, but I don't think there's much he can do besides
relaying that information upstream.

More information about the freebsd-ports mailing list