Skip to content

configure: Always make shared imply PIC

Jessica Clarke requested to merge jrtc27/x264:configure-pic into master

Building a shared library without -fPIC does not make sense. On most architectures, especially recent ones, doing so will give link-time errors due to relocations in read-only sections like .text. On some legacy architectures, including i386, it is allowed by default, but will warn, and is highly discouraged due to the overheads it adds at library load time. Most architectures were already listed here as having shared imply PIC, but not all, such as i386 which ends up with unwanted text relocations, as well as architectures not known to the build system currently like RISC-V, which does not permit text relocations by default. There is no good reason to want shared without PIC on any architecture, so just remove the architecture list.

Merge request reports