Summary: | net-dns/bind-tools-9.14.4: Error: Architecture mismatch on "pause ". (Requires v9e|v9v|v9m|m8; requested architecture is v9b.) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Rolf Eike Beer <eike> |
Component: | Current packages | Assignee: | Christian Ruppert (idl0r) <idl0r> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | slyfox, zlogene |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | Sparc64 | ||
OS: | Linux | ||
URL: | https://gitlab.isc.org/isc-projects/bind9/merge_requests/2243 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Rolf Eike Beer
2019-08-07 18:24:39 UTC
Posting the find on #gentoo-sparc here: The error is: {standard input}: Assembler messages: {standard input}:11: Error: Architecture mismatch on "pause ". {standard input}:11: (Requires v9e|v9v|v9m|m8; requested architecture is v9b.) 23:41:28 <@slyfox> bind's rwlock uses "pause" instruction. 23:42:04 <@slyfox> lib/isc/rwlock.c-#elif defined(__sparc) || defined(__sparc__) 23:42:05 <@slyfox> lib/isc/rwlock.c:# define isc_rwlock_pause() __asm__ __volatile__ ("pause") 23:42:40 <@slyfox> i think it needs an extra guard for the v9b ISA 23:42:51 <@slyfox> and fallback to 'lib/isc/rwlock.c-# define isc_rwlock_pause()' busy loop 23:44:01 <@slyfox> https://gitlab.isc.org/isc-projects/bind9/issues/816 23:47:50 <@mattst88> yeah, looks like pause is only on T4 and later CPUs -mcpu=niagara4 or upper would work but unfortunately gcc does not export any defines to make a distinction: $ cat bug.c a() { __asm__("pause"); } $ sparc-unknown-linux-gnu-gcc -mcpu=niagara3 -c bug.c bug.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int] 1 | a() { __asm__("pause"); } | ^ /tmp/cc0FYKQS.s: Assembler messages: /tmp/cc0FYKQS.s:11: Error: Architecture mismatch on "pause ". /tmp/cc0FYKQS.s:11: (Requires v9e|v9v|v9m|m8; requested architecture is v9d.) $ sparc-unknown-linux-gnu-gcc -mcpu=niagara4 -c bug.c bug.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int] 1 | a() { __asm__("pause"); } | ^ $ diff -U0 <(sparc-unknown-linux-gnu-gcc -O2 -mcpu=niagara3 -dM -E - </dev/null) <(sparc-unknown-linux-gnu-gcc -O2 -mcpu=niagara4 -dM -E - </dev/null) Proposed https://gitlab.isc.org/isc-projects/bind9/merge_requests/2243 upstream. Ping? I can't build the only secure version now. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25be2b1ffdcbf50bf28d89f8987f853f9bdca79c commit 25be2b1ffdcbf50bf28d89f8987f853f9bdca79c Author: Mikle Kolyada <zlogene@gentoo.org> AuthorDate: 2019-08-22 11:09:27 +0000 Commit: Mikle Kolyada <zlogene@gentoo.org> CommitDate: 2019-08-22 11:10:02 +0000 net-dns/bind-tools: detect sparc pause instruction properly Closes: https://bugs.gentoo.org/691708 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org> net-dns/bind-tools/bind-tools-9.14.4.ebuild | 2 + .../bind-tools/files/sparc-pause-instruction.patch | 135 +++++++++++++++++++++ 2 files changed, 137 insertions(+) |