Closed MeisterEule closed 2 years ago
This issue does not appear when you specify CXX=g++
.
Should be solved by commit f757ee41a90c86e99b3baa775a975816f692d12f
. There was a bug in the protofunctions that not all of them were part of the calling structure. Now all of them are called, thus always linked, independent of the linker flags. You may test it and close this issue.
Can this be closed?
Yes
The symbols tests rely on the assumption that
protofunc.c
is linked in such a way that all symbols in there are included in the test binary. The linking is forced by callingprotofunc_0_0
. However, this function only callsprotofunc_[1-6]_0
functions. This means that most of the symbols are not used. With standard settings, they are included in the symbol table anyhow. However, there exists a linker option to exclude unused symbols:--gc-sections
. The problem is that this has been observed to appear in the linker options that autotools automatically generates for some setups. It is not yet clear to me how it decides which options to use and which not.I think that it's not worthwhile to tinker with autotools so that this option never appears. Instead, I see these alternatives:
--gc-sections
is included inLDFLAGS
and setmmax
accordingly.