To work around it is sufficient to simply add a "-O0" to the CXXFLAGS, for example by adding this line to src_configure (i added it above the line that sets debug for CXXFLAGS): tc-is-gcc && [[ $(gcc-major-version) -ge 6 ]] && CXXFLAGS+=" -O0" This is similar to, but i think not the same as, #566462 All credit for diagnosing the problem and providing the fix goes to eroen. He found that the problem occurs with -O1, too.
(In reply to Steffen Schaumburg from comment #0) > To work around it is sufficient to simply add a "-O0" to the CXXFLAGS, for > example by adding this line to src_configure (i added it above the line that > sets debug for CXXFLAGS): > > tc-is-gcc && [[ $(gcc-major-version) -ge 6 ]] && CXXFLAGS+=" -O0" > > > This is similar to, but i think not the same as, #566462 > > All credit for diagnosing the problem and providing the fix goes to eroen. > He found that the problem occurs with -O1, too. I am also experiencing this. I am using GCC 5.4, which seems to indicate that this is not a gcc 6 specific problem. Adding "-O0" to the CXXFLAGS fixed the issue for me too.
I believe the correct solution is to use LDFLAGS=-rdynamic. please test adding this line after the "CXXFLAGS+=" line.
should be LDFLAGS+=" -rdynamic"