Skip to content

GCC 7.1 (mingw-w64) has broken -flto and hypot #838

@RedSkotina

Description

@RedSkotina

For future:
GCC 7.1 (mingw-w64)
Just examine problem while compiling tests with unreferenced symbols on Release and MinSizeRel .
-flto have mystic conflicts with -O3 or -Os
Temp solution while gcc developers not fix bug:
Disable -flto flag like this:
cmake .. -G"Ninja" -DPYBIND11_LTO_CXX_FLAGS=""

mingw-w64 headers have conflict with python headers:
error: '::hypot' has not been declared
we can fix it with redefining -D_hypot=hypot
cmake .. -G"Ninja" -DPYBIND11_LTO_CXX_FLAGS="" -DCMAKE_CXX_FLAGS="-D_hypot=hypot"

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