diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-10-08 15:30:24 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-10-18 18:56:35 +0300 |
commit | 021d242f9ce8e6cd804af0c1eb4179b8c83fd470 (patch) | |
tree | e2808ac0eb31a44aa7aa67bd2e92b7f555c1d38f /docs/markdown | |
parent | a050db5e306aa01cdc7ace561e6d53b1220a3a32 (diff) | |
download | meson-021d242f9ce8e6cd804af0c1eb4179b8c83fd470.zip meson-021d242f9ce8e6cd804af0c1eb4179b8c83fd470.tar.gz meson-021d242f9ce8e6cd804af0c1eb4179b8c83fd470.tar.bz2 |
build: use PIE objects for static libraries if b_staticpic=false but b_pie=true
If static_library is used as a convenience library (e.g. for link_whole)
it should in principle not need position independent code.
However, if the executables that the libraries is linked to are PIE,
the non-PIC objects in the static library will cause linker errors.
To avoid this, obey b_pie for static libraries if either b_staticpic=false
or they use "pic: false".
Without this patch, QEMU cannot use b_staticpic, which causes a slowdown
on some QEMU benchmarks up to 20%.
Diffstat (limited to 'docs/markdown')
0 files changed, 0 insertions, 0 deletions