Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,226
    • Issues 3,226
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 10
    • Merge Requests 10
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #17436

Closed
Open
Opened Nov 06, 2017 by Marc Aldorasi@marcContributor

CMake no longer excludes libgcc_eh from the implicit link libraries

Commit d59e3509 removed gcc.* from the list of filtered implicit link libraries. This causes CMake to add -lgcc_eh to the linker flags when compiling a mixed C/C++ project on mingw, which means libgcc_eh.a is statically linked into every binary. This means that each dll has its own copy of exception handling and TLS code, which can cause problems (see https://public.kitware.com/pipermail/cmake/2017-August/066128.html for an example). In addition, the GCC developers recommend against having multiple copies of libgcc_eh at runtime (see https://gcc.gnu.org/ml/gcc/2012-03/msg00104.html).

As a workaround, adding list(REMOVE_ITEM CMAKE_C_IMPLICIT_LINK_LIBRARIES gcc_eh) will stop it from being implicitly linked.

gcc_eh.* should be added to the list of filtered implicit link libraries to fix this problem.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
3.9.6
Milestone
3.9.6 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: cmake/cmake#17436