BIND 9.14.0rc1 fails with system-compiler on OpenBSD powerpc
Summary
The system compiler on OpenBSD powerpc is rather old
$ gcc -v
Reading specs from /usr/lib/gcc-lib/powerpc-unknown-openbsd6.4/4.2.1/specs
Target: powerpc-unknown-openbsd6.4
Configured with: OpenBSD/powerpc system compiler
Thread model: posix
gcc version 4.2.1 20070719
BIND 9.14.0rc1 triggers a bug in this old compiler. There is a known workaround (see below), this workaround might be an addition to the PLATFORM file in the BIND 9 distribution.
BIND 9 also might check for this compiler in the configure script
BIND version used
BIND 9.14.0rc1
Steps to reproduce
1) download bind-9.14.0rc1.tar.gz on OpenBSD 6.4 ppc
2) tar xfz bind-9.14.0rc1.tar.gz
3) cd bind-9.14.0rc1
4) ./configure
5) make
What is the current bug behavior?
gcc quits with an internal compiler error
gcc -std=gnu99 -I/home/cas/src/bind-9.14.0rc1 -I../.. -I./unix/include -I./pthreads/include -I./include -I./include -I/home/cas/src/bind-9.14.0rc1/lib/dns/include -I../../lib/dns/include -I/usr/include -g -O2 -pthread -I/usr/local/include/libxml2 -I/usr/local/include -fPIC -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing -fno-delete-null-pointer-checks -c task.c
task.c: In function 'isc__taskmgr_pause':
task.c:1522: error: unrecognizable insn:
(insn 96 95 97 10 task.c:1508 (parallel [
(set (reg:SI 161)
(ior:SI (and:SI (plus:SI (mem/v:QI (plus:SI (reg/v/f:SI 125 [ manager ])
(const_int 64 [0x40])) [-1 S1 A32])
(reg:SI 157))
(reg:SI 159))
(and:SI (not:SI (reg:SI 159))
(mem/v:QI (plus:SI (reg/v/f:SI 125 [ manager ])
(const_int 64 [0x40])) [-1 S1 A32]))))
(set (reg:SI 160)
(mem/v:QI (plus:SI (reg/v/f:SI 125 [ manager ])
(const_int 64 [0x40])) [-1 S1 A32]))
(set (mem/v:QI (plus:SI (reg/v/f:SI 125 [ manager ])
(const_int 64 [0x40])) [-1 S1 A32])
(unspec:SI [
(ior:SI (and:SI (plus:SI (mem/v:QI (plus:SI (reg/v/f:SI 125 [ manager ])
(const_int 64 [0x40])) [-1 S1 A32])
(reg:SI 157))
(reg:SI 159))
(and:SI (not:SI (reg:SI 159))
(mem/v:QI (plus:SI (reg/v/f:SI 125 [ manager ])
(const_int 64 [0x40])) [-1 S1 A32])))
] 40))
(clobber (scratch:CC))
(clobber (scratch:SI))
]) -1 (nil)
(nil))
task.c:1522: internal compiler error: in extract_insn, at recog.c:2077
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
*** Error 1 in lib/isc (Makefile:271 'task.o')
*** Error 1 in lib (Makefile:87 'subdirs')
*** Error 1 in /home/cas/src/bind-9.14.0rc1 (Makefile:94 'subdirs')
What is the expected correct behavior?
BIND 9 compiles
Relevant configuration files
N/A
Relevant logs and/or screenshots
N/A
Possible fixes
Install gcc 4.9.4 from ports or packages, set the CC environment variable to point to gcc 4.9.4 and compile:
pkg_add gcc
export CC=/usr/local/bin/egcc
./configure
make
doas make install