Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

ibc
Copy link
Member

@ibc ibc commented Jan 3, 2024

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

- May fix #1292
- `PIC` flag was introduced in previous mediasoup gyp build system: bbc3514, it was needed for mediasoup to build on Ubuntu 18.04: #315.
@ibc ibc requested review from nazar-pc and jmillan January 3, 2024 11:19
@ibc ibc merged commit ddcd72f into v3 Jan 3, 2024
19 checks passed
@ibc ibc deleted the meson-remove-pie-and-staticpic-options branch January 3, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Windows CI jobs failing due to meson
2 participants