Re: i386 compatibility & libstdc++
Arnd Bergmann <arnd@arndb.de> writes:
> They have to be compiled for i386, as they have always been.
> If they were compiled for i486, they would not run on i386
> anyway, with or without the bug.
But if they are compiled for i386, they won't run on other Linux
systems, thus losing binary compatibility.
> Ok, I probably wasn't clear enough about the actual trick. If you want
> to use foreign binaries or build any debian packages libraries with
> C++ for i486+, you need to install the i486 libstdc++ files.
Not only those, but also all other libraries that the executable links
with.
> For example, we could have these files in libstdc++5_3.3-x_i386.deb:
>
> /usr/lib/i386/libstdc++-i386.so.5 -> libstdc++.so.5.0.3
> /usr/lib/i386/libstdc++.so.5.0.3
> /usr/lib/i486/libstdc++.so.5 -> libstdc++.so.5.0.3
> /usr/lib/i486/libstdc++-i386.so.5 -> libstdc++.so.5.0.3
> /usr/lib/i486/libstdc++.so.5.0.3
You need to add Qt, kde, and many other libraries to that as well.
Essentially, for each C++ library, you should have three versions: the
2.95 version, the c102 version, and the c102-debian version.
> All default packages are built for i386 (as always) and linked
> for with the soname libstdc++-i386.so.5. On i486+ systems,
> the runtime linker will automatically use
> /usr/lib/i486/libstdc++-i386.so.5, which resolve the
> __exchange_and_add() function to the trivial assembly version.
Isn't the __exchange_and_add function inline, so that the dynamic
linker can't change its implementation, anyway?
Regards,
Martin
Reply to: