NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-amd64/60519: netbsd-11 fails to build with -march=native for modern processors (x86)
>Number: 60519
>Category: port-amd64
>Synopsis: netbsd-11 fails to build with -march=native for modern processors (x86)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-amd64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 30 17:40:00 +0000 2026
>Originator: William Green
>Release: netbsd-11
>Organization:
>Environment:
NetBSD aaa.supposedly.org 11.0_RC7 NetBSD 11.0_RC7 (GENERIC) #0: Thu Jul 23 17:23:58 PPT 2026 aaa%aaa.supposedly.org@localhost:/home/aaa/src/netbsd11/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
`/build.sh build` with -march=native (see more on cpu-type below) fails while building OpenSSH in crypto/external/bsd/openssh/dist/kexmlkem768x25519.c. Building on Linux with -m amd64 -V "CPUFLAGS= -march=skylake" (etc.) also fails.
Trying to manually compile this file with the same options used by build.sh gives this error:
In file included from /home/aaa/src/netbsd11/src/crypto/external/bsd/openssh/dist/kexmlkem768x25519.c:46: /home/aaa/src/netbsd11/src/crypto/external/bsd/openssh/dist/libcrux_mlkem768_sha3.h: In function 'libcrux_ml_kem_ind_cpa_unpacked_default_8b_1b': /home/aaa/src/netbsd11/src/crypto/external/bsd/openssh/dist/libcrux_mlkem768_sha3.h:8112:11: error: array subscript '<unnamed-unsigned:256>[0]' is partly outside array bounds of 'uint8_t[2]' {aka 'unsigned char[2]'} [-Werror=array-bounds] 8112 | uint8_t uu____1[32U] = {0U};
| ^~~~~~~
cc1: all warnings being treated as errors
Trying various values for -march showed this occurs on GCC cpu-types that enable AVX (i.e. this error is generated with -march=sandybridge but not -march=nehalem and ditto for bdver1/barcelona).
Compiling with the base system gcc on 11.0_RC7 (i.e. 12.5.0) instead of the build.sh-built tooldir gcc gives the same error. However gcc15 from pkgsrc compiles without error/warning.
>How-To-Repeat:
Build netbsd-11 sources with CPUFLAGS= -march=sandybridge (or any cpu-type that enables AVX).
>Fix:
Unknown
Home |
Main Index |
Thread Index |
Old Index