Alex Vong <alexvong1...@gmail.com> skribis: > l...@gnu.org (Ludovic Courtès) writes: > >> Alex Vong <alexvong1...@gmail.com> skribis: >> > [...] >>> >>> I think you have isolated the problem! This test case does not work for >>> me. >>> >>> >>> I get the following output after building with >>> (g++ -O2 -flto version.cxx): >> >> What if you compile with ‘gcc’ (and rename to foo.c) instead of ‘g++’? >> >> It might be a symbol visibility problem, or name mangling issue. >> >> Ludo’. > > Hmm, I try to build with 'gcc -O2 -flto version.c' and './a.out > --version' still fails with 'unrecognized option'. I check the symbols > using 'nm' and they are not mangled. How should I check for the sign of > a symbol visibility problems?
‘nm’ shows a capital T for exported symbols, and a lowercase t for hidden/private symbols. Maybe you should report a bug against your distro’s package and see what they think? Ludo’.