On Sun, 24 Mar 2024, 18:01 Yuri Kanivetsky via Gcc, wrote: > Hi, > > It looks like somewhere between gcc-5.3.0 and gcc-6.2.1 --as-needed > became the default: > > https://gist.github.com/x-yuri/1b4c19891be50b2b8801689de1487009 > > In other words it looks like on Alpine Linux 3.4 -lintl always adds > libintl, on >= 3.5 only if some of its symbols are really needed. > > Can you possibly give a link to the commit or a changelog entry? > That's a linker option, and the linker is not part of GCC. Any change in linker behaviour is not because of a change in GCC. The GNU linker can be configured to default to --as-needed or not, and different distros use different defaults.