[FFmpeg-devel] PIC and YASM

Måns Rullgård mans
Tue Nov 10 01:21:28 CET 2009


Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:

> Ok, after all the discussion I have only one change left to suggest
> (well, actually I had it suggested a few times, but I am not sure if
> someone is against it or not):
> Index: configure
> ===================================================================
> --- configure   (revision 20491)
> +++ configure   (working copy)
> @@ -1876,6 +1876,11 @@
>
>  enable $arch $subarch
>  enabled spic && enable pic
> +# This is the same check as used in libavutil/internal.h

Shouldn't that one go away?

> +# to enable RIP-relative addressing for x86_64 inline asm.
> +# This also makes compilation work out-of-the-box for systems
> +# like hardened Gentoo where the compiler generates PIC/PIE by default.

This comment seems like a roundabout way of saying
# Check if the compiler uses PIC by default

> +check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
>
>  # OS specific
>  case $target_os in
> @@ -2236,7 +2241,6 @@
>      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; }
>

This looks OK.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list