versatica / mediasoup

Cutting Edge WebRTC Video Conferencing
https://mediasoup.org
ISC License
6.18k stars 1.12k forks source link

meson: remove -Db_pie=true -Db_staticpic=true args #1293

Closed ibc closed 8 months ago

ibc commented 8 months ago

More details

In https://mesonbuild.com/Builtin-options.html#base-options:

The following options are available. Note that they may not be available on all platforms or with all compilers: [...]

  • b_staticpic: Build static libraries as position independent
  • b_pie: Build position-independent executables (since 0.49.0)

Somewhere else:

Position-independent code is not tied to a specific address. This independence allows the code to execute efficiently at a different address in each process that uses the code. Position-independent code is recommended for the creation of shared objects.

On some architectures, including x86, -fPIC generates much worse code (i.e. a function call) for loads/stores of data. While this is tolerable for libraries, it is undesirable for executables.

If the object is to be linked as a shared library, or a static library that will in turn be linked in a shared library, use -fPIC. If the object is to be linked as a position indenpendent executable, or astatic library that will in turn be linked in position independent executable, use -fPIE.

blablabla