There are a few parts to this:
1) It looks like gc_sections is a public feature, and thus consumers of Core need the same flags as set by mkspecs/features/gc_sections.prf. At least that's what I saw when calling qmake -d on lrelease.
2) Currently qt_internal_add_link_flags_gc_sections only sets link flags, whereas it should also set compile flags per specific compiler / target.
This was discovered while investigating lrelease segfaults in cmake static builds at
and the fix at