mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-17 13:04:50 +00:00
Check if PIC is somehow already enabled (e.g. a compiler that enables it by default).
This in particular ensures that -DPIC is set appropriately for YASM, which avoids linking failures on x86_64 for compilers that have PIE enabled by default (e.g. hardened Gentoo). It also makes the macho64 special-case hack adding -DPIC to YASMFLAGS obsolete. Originally committed as revision 20497 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
00fa73f052
commit
5755bc88e5
4
configure
vendored
4
configure
vendored
@ -1876,6 +1876,9 @@ esac
|
||||
|
||||
enable $arch $subarch
|
||||
enabled spic && enable pic
|
||||
# This is the same check as used in libavutil/internal.h
|
||||
# to enable RIP-relative addressing for x86_64 inline asm.
|
||||
check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
|
||||
|
||||
# OS specific
|
||||
case $target_os in
|
||||
@ -2237,7 +2240,6 @@ EOF
|
||||
test -n "$extern_prefix" && append YASMFLAGS "-DPREFIX"
|
||||
case "$objformat" in
|
||||
elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
|
||||
macho64) append YASMFLAGS "-DPIC" ;;
|
||||
esac
|
||||
disabled yasm || { check_yasm "pabsw xmm0, xmm0" && enable yasm; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user