Skip to content

main fails to compile with gcc 15 #60566

@richardlau

Description

@richardlau

Attempting to build the main branch with gcc 15 (tested on Fedora 42 and Ubuntu 25.10 (container)) fails to compile with

cc1plus: error: attribute 'target' argument 'avx10.2-512' is unknown

This appears to have started after the V8 14.2 update -- possibly highway (which is version sniffing the compiler)?

#ifndef HWY_BROKEN_AVX10_2 // allow override
// AVX10_2 requires clang >= 20.1 (postpone to 23 due to "avx10.2-512" remnant,
// only removed in https://github.com/llvm/llvm-project/pull/157034) or
// gcc >= 15.2 with binutils 2.44.
#if (HWY_COMPILER_CLANG < 2300) && (HWY_COMPILER_GCC_ACTUAL < 1502)
#define HWY_BROKEN_AVX10_2 HWY_AVX10_2
#else
#define HWY_BROKEN_AVX10_2 0
#endif
#endif // HWY_BROKEN_AVX10_2

Switching to clang (on Fedora, clang 20.1.8) or gcc 14 (Ubuntu) succeeds without the error (both of which would cause HWY_BROKEN_AVX10_2 to be defined according to the above snippet).

$ gcc --version
gcc (GCC) 15.2.1 20250808 (Red Hat 15.2.1-1)
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$
$ gcc --version
gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions