Skip to content

Use CXX when trying to link a c++ object against a c++ library.

Moritz Angermann requested to merge wip/angerman/fix-configure into master

Using CC instead of CXX here, easily results in fun failures like:

ld: warning: libm.so.6, needed by libstdc++.so, not found (try using -rpath or -rpath-link)
ld: libstdc++.so: undefined reference to `fesetround@GLIBC_2.2.5'
ld: libstdc++.so: undefined reference to `fegetround@GLIBC_2.2.5'

best part is, that we don't see them as we 2>/dev/null the result. And as such we are left with the rather confusing configure log of

checking C++ standard library flavour... libstdc++
checking for linkage against 'stdc++'... failed
checking for linkage against 'stdc++ supc++'... failed
configure: error: Failed to find C++ standard library

Merge request reports