[FFmpeg-devel] PIC and YASM

Reimar Döffinger Reimar.Doeffinger
Mon Nov 9 18:02:54 CET 2009


On Mon, Nov 09, 2009 at 03:43:34PM +0000, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> > @@ -1919,7 +1917,6 @@
> >          ;;
> >      openbsd)
> >          enable malloc_aligned
> > -        enable pic
> 
> OpenBSD builds fail without that currently.  Does your new __PIC__
> check fix that?

I expect, however that is one of the things I have not yet tested (I really
ought to buy a bigger hard drive some time instead of deleting my
VMs all the time).

> > @@ -2235,7 +2232,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; }
> 
> I don't understand this one, but if it works, go for it.  Deleting
> weird stuff is always good.

It works together with my PIC check, which correctly set pic to enabled,
thus -DPIC is added. MacOSX is fully PIC/PIE in principle (somewhat like
OpenBSD and hardened Gentoo), though it can free up ebx in some cases
(probably not quite right, but somewhere in that ballpark).



More information about the ffmpeg-devel mailing list