tech-misc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Building netbsd-8 and netbsd-9 with modern gcc



(Moving to tech-toolchain which seems more appropriate to me)

On Mon, May 29, 2023 at 09:51:45PM +0100, David Brownlee wrote:
  | 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

I've tried to reproduce these issues on the tip of the netbsd-8 and netbsd-9
branches and it doesn't fail for me.

This is using host CC compiler: gcc (nb1 20220722) 10.4.0
on NetBSD 9.99.101 (built around 2022-10-21).

Do you have more details?


I am working on improving tools/compat and its generation of defs.mk,
to allow for more robust detection of supported host compiler flags
for the tools build (e.g., -fcommon if it's still required).
This should also allow for future fixing of tools warnings such as:
  warning: unknown warning option '-Wno-stringop-truncation'; did you mean
  '-Wno-string-concatenation'? [-Wunknown-warning-option]
  warning: unknown warning option '-Wno-stringop-overflow'; did you mean
  '-Wno-shift-overflow'? [-Wunknown-warning-option]


Luke.


Home | Main Index | Thread Index | Old Index