Building netbsd-8 and netbsd-9 with modern gcc
David Brownlee <[email protected]> Mon, 29 May 2023 21:51:45 +0100
| Newsgroups | gmane.os.netbsd.devel.general |
|---|---|
| Message-ID | <CAGN_6pb+GD3Oy3qjORenRppd6=HuJMkB7ROjLM-_fCwZ9oaMsw@mail.gmail.com> |
More recent gcc versions (including the gcc-10 in netbsd-10) default to -fno-common, which breaks building netbsd-8 and netbsd-9. This is an... unwelcoming initial experience for anyone downloading the latest netbsd release and trying to build it. It breaks quite quickly - when building nbmake (IIRC). A workaround is relatively simple - pass "-V HOST_CFLAGS=-fcommon" to build.sh, but does not appear to be directly documented anywhere. What would be the best way to fix this - adjust tools/make/configure so if "ac_compiler_gnu = yes" -fcommon would be added to HOST_CFLAGS? David