[Ffmpeg-devel] [patch] Darwin shared object support
Tue Mar 7 14:58:26 CET 2006
On Tue, Mar 07, 2006 at 07:43:43AM +0100, Dan Villiom Podlaski Christiansen wrote:
> On 06/03/2006, at 23.34, Michael Niedermayer wrote:
> >the change of the align stuff is not ok, i think a better patch
> >might have been already posted, dunno ...
> Perhaps this is the one you're thinking of? Posted with the caveat
> that I, unlike Sam, don't have an Intel mac to test the generated
I still don't understand the following part of your patch:
> # SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic, used when
> # building
> -# shared modules on OS/X (vhook/Makefile).
> -if test "$needmdynamicnopic" = yes; then
> - CFLAGS="$CFLAGS -mdynamic-no-pic"
> +# shared modules on Darwin (vhook/Makefile). Also, on Darwin, GCC defaults to
> +# generating PIC, and -mdynamic-no-pic disables it. Hence the logic below.
> +if test "$targetos" = "Darwin"; then
> + SHCFLAGS="$CFLAGS -DPIC"
> + if test "$needmdynamicnopic" = yes; then
> + CFLAGS="$CFLAGS -mdynamic-no-pic"
> + else
> + CFLAGS="$CFLAGS -DPIC"
> + fi
If gcc defaults to PIC on Darwin, why do you have to enable it explicitly?
Furthermore, you are adding -DPIC to CFLAGS in the else case, which will
trigger pretty much everywhere. This is wrong. Patch rejected.
More information about the ffmpeg-devel