Thread (21 messages) 21 messages, 7 authors, 2013-10-28

RE: [PATCH] [RFC] Emulate "lwsync" to run standard user land on e500 cores

From: David Laight <hidden>
Date: 2013-10-25 10:00:54

This is not a distro issue. It's a libstdc++ portability issue. =
libstdc++
hardcodes lwsync unless __NO_LWSYNC__ is explicitly defined,
which you only get with -mcpu=3D8540/-mcpu=3D8548.  When compiled
for any powerpc target other than -mcpu=3D8540/-mcpu=3D8548, including
the default -mcpu=3Dcommon,  libstdc++ will end up containing lwsync.
There is no way to explicitly request libstdc++ to be built without =
lwsync
with an -mcpu target other than 8540/8548.
=20
The issue is easily demonstrated by running a program that throws a
C++ exception: __cxa_throw() is called, which has an lwsync.  This
results in an illegal instruction exception when run on an =
e500v1/e500v2.

Perhaps libstc++ should be working out at run time whether lwsync is =
valid?

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help