munt / munt

A multi-platform software synthesiser emulating pre-GM MIDI devices such as the Roland MT-32, CM-32L, CM-64 and LAPC-I. In no way endorsed by or affiliated with Roland Corp.

Home Page:http://munt.sourceforge.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shared libraries should use -fPIC

marzojr opened this issue · comments

The shared libraries should use -fPIC flag. This helps security (by allowing address space layout randomization to be used with the libraries)m but it also helps when building libraries that link to libmt32emu.

This can be easily set on cmake by using the following:

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

at the appropriate location on one of the CMakeLists.txt files.

I don't get why this is an issue. When a shared library is built, position independent code must be generated by default, see CMake documentation. Besides, even in case the default does not apply, the aforementioned variable can be easily set to the required value in cmake command line or via the UI.