[Tarantool-patches] [PATCH v1] Block linker flag '--no-undefined'

Alexander Turenko alexander.turenko at tarantool.org
Wed Jul 8 22:22:00 MSK 2020


> Minor: I reworded the message a bit:
> | Found that OpenSUSE toolchain adds '--no-undefined' linked flag leading

Typo: linked -> linker.

> Strictly saying, I see no reason to fix the problem here. These changes
> are similar and one ought to add this "woodoo magic" line to every
> CMakeLists.txt used for building dynamic libraries using Lua C API.
> Since we are using <build_lualib> to build these extensions can you make
> this change there?

I missed this way. It should work, but we should care about not leaving
a test/foo subdirectory scope. I think it should be verified manually. I
would even add a comment regarding the macro behaviour: it affects
current cmake variable scope and so a user should care to don't use it
in a top level scope.

Sadly, we cannot solve the problem with properties, because flags from
the LINK_FLAGS target property are added before
CMAKE_SHARED_LINKER_FLAGS flags and because there is no --no-undefined
counterpart linker option (there is `--undefined foo` to allow certain
symbols to be undefined, but is not what we need here).

WBR, Alexander Turenko.


More information about the Tarantool-patches mailing list