https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114839
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >From gcc/config/freebsd.h: #if defined(HAVE_LD_EH_FRAME_HDR) #define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} " #endif The !static part comes from r0-95899-g2208d2ac9546de .