2013-08-09 20:46:46 UTC
Using the attached CT_NG config.
We create a generic PPC toolchain because we want a single toolchain
to create binaries that will run on both an e300 and e500 CPU. We do
realize that we will lose some efficiency but we are willing to deal
The problem is that a test program crashes with Illegal instruction.
Upon researching that, I found that the instruction "lwsync" is used
and one of our CPU's (e500) does not support that instruction. That
lwsync instruction is coming from libstdc++ (verified with "objdump -d
-M ppc libstdc++.so|grep lwsync"). Our 4.2.1 based toolchain does not
have any instances of lwsync in libstdc++. We have tried passing
__NO_LWSYNC__ and _TARGET_NO_LWSYNC in the config, but libstdc++ still
has lwsync in it. Is there a place I am missing to create a toolchain
for generic PPC without any instances of lwsync? Additionally, on the
4.2.1 based toolchain, I don't have to pass "-M ppc" to objdump to
resolve the instruction names, however on the 4.4.6 based toolchain I
have to pass "-M ppc" otherwise I don't get the instruction names in
the disassembler output. I don't know if this is another symptom of
the same root cause. I do have "powerpc" in both the ARCH and CPU
values of the CT-NG configuration.
I have tried to create a test program that exhibits the problem
without company proprietary information but the simple test programs
always run without issue, so the only information I can forward
publicly is the use of objdump.