I investigated the possibility of just putting the C++ code in
liblua5.1.so: keeping the ABI compatible but adding exception
support.  I think this is feasible for liblua5.1.so but
unfortunately not for liblua5.1.a, because the C++ support needs
several symbols from libsupc++.a and we cannot expect C programs
using liblua5.1.a to link with that.

(This could perhapss be fixed by turning liblua5.1.a into a
linker script like libc.so and libncurses.so are.  It would point
to the real static Lua library and to libsupc++.a from the
version of G++ that was used to compile Lua.  Then, the
liblua5.1-0-dev package would also have to depend on the
corresponding libstdc++6-4.*-dev package.  I think this would
work initially but have rather many steps that can fail later.)

Because supporting exceptions only in liblua5.1.so and not in
liblua5.1.a seems too risky (what happens when someone links with
-static), I guess there should be separate C++ variants of both,
like you already implemented, except with unmangled public symbols.

Attachment: pgpAMn7suXShG.pgp
Description: PGP signature

Reply via email to