Created attachment 152418 [details] Patch to fix mutexes on armv6 The databases/db5 port uses it's own mutex implementation. Unfortunately on ARM it uses the deprecated swp instruction for these. On some hardware supported by the armv6 FreeBSD target architecture this instruction is unavailable so we disallow it here where possible. The attached patch fixes this by using POSIX mutexes in this case.
Auto-assigned to maintainer mandree@FreeBSD.org
Hi Andrew, I approve of the patch - be sure to commit a version you have tested though. Do we need this on db48 and db6, too?
(In reply to Matthias Andree from comment #2) unpatched armv6 builds running here: http://tasty.ysv.freebsd.org/build.html?mastername=11armv6-default&build=2015-02-13_21h52m43s db48, db5 and db6.
Hrm. All three built with no error. I assume that this is a runtime, not a compile issue then?
I have a local patch to llvm to not allow the bad instructions, unfortunately it's not able to be sent upstream as it breaks using them on earlier arm platforms where they are valid. I can test the other ports with these patches when I've cleared out my current patch queue.
(In reply to Andrew Turner from comment #5) Andrew: Should I commit this to the db ports?
Wait ... db48/db5/db6 all build for armv6 now. This patch isn't needed anymore apparently.
(In reply to Sean Bruno from comment #7) No, this is a runtime not a buildtime failure. Still needed and should be committed.
A commit references this bug: Author: sbruno Date: Thu May 7 17:35:35 UTC 2015 New revision: 385644 URL: https://svnweb.freebsd.org/changeset/ports/385644 Log: enable posix-mutexes by default for armv6 targets as db will crash and burn when using the internal mutex implementation via unsupported instructions. PR: 197227 Submitted by: andrew@ Approved by: mandree@ Changes: head/databases/db48/Makefile head/databases/db5/Makefile head/databases/db6/Makefile