Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > muc.lists.netbsd.tech.misc > #65

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

From Luke Mewburn <lukem@netbsd.org>
Newsgroups muc.lists.netbsd.tech.misc
Subject Re: Building netbsd-8 and netbsd-9 with modern gcc
Date 2023-05-30 09:19 +0000
Organization Newsgate at muc.de e.V.
Message-ID <ZHW/q24iMIZvBmAi@netbsd.org> (permalink)
References <CAGN_6pb+GD3Oy3qjORenRppd6=HuJMkB7ROjLM-_fCwZ9oaMsw@mail.gmail.com>

Show all headers | View raw


(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.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de

Back to muc.lists.netbsd.tech.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Building netbsd-8 and netbsd-9 with modern gcc David Brownlee <abs@absd.org> - 2023-05-29 21:51 +0100
  Re: Building netbsd-8 and netbsd-9 with modern gcc Luke Mewburn <lukem@netbsd.org> - 2023-05-30 09:19 +0000
    Re: Building netbsd-8 and netbsd-9 with modern gcc David Brownlee <abs@absd.org> - 2023-05-30 13:04 +0100
      Re: Building netbsd-8 and netbsd-9 with modern gcc Martin Husemann <martin@duskware.de> - 2023-05-30 15:44 +0200
        Re: Building netbsd-8 and netbsd-9 with modern gcc David Brownlee <abs@absd.org> - 2023-05-30 15:13 +0100
        Re: Building netbsd-8 and netbsd-9 with modern gcc Luke Mewburn <luke@mewburn.net> - 2023-05-31 01:24 +1000

csiph-web