[Ffmpeg-devel] [PATCH] Fixes for Darwin/x86
Dan Villiom Podlaski Christiansen
danchr
Fri Feb 17 13:46:40 CET 2006
On 17/02/2006, at 13.36, Dan Villiom Podlaski Christiansen wrote:
> On 08/02/2006, at 13.01, Michael Niedermayer wrote:
>
>>> +if test "$targetos" = "Darwin"; then
>>> + if "$cpu" = "x86"; then
>>> + SHCFLAGS="$CFLAGS -DPIC"
>>> + else
>>> + SHCFLAGS="$CFLAGS"
>>> + fi
>>> + if test "$needmdynamicnopic" = yes; then
>>> + CFLAGS="$CFLAGS -mdynamic-no-pic"
>>> + elif "$cpu" = "x86"; then
>>> + CFLAGS="$CFLAGS -DPIC"
>>> + fi
>>
>> what does -mdynamic-no-pic do? the no-pic in the name suggests to
>> me that no
>> PIC code is generated, if so -DPIC is wrong, but this mess will set
>> SHCFLAGS="$CFLAGS -DPIC" CFLAGS="$CFLAGS -mdynamic-no-pic" in some
>> cases
>
> By default, GCC will generate position-indenpendant code on Darwin,
> and -mdynamic-no-pic is one of the options that disables PIC. I've
> updated the patch to include the simplest possible logic for this:
> Either pass -DPIC or -mdynamic-no-pic to the compiler. I've also
> expanded the comment to explain this.
>
>>> Also, the ASMALIGN() macros where moved into a defined(ARCH_X86) ||
>>> defined(ARCH_X86_64) conditional, to ensure that they weren't
>>> defined
>>> when not needed.
>>
>> rejected, i already said they are not x86 specific
>
> I had a bit of trouble understanding how asm code could be cross-
> platform, but that's because they're macros. I've changed the patch
> to use the same approach as Sam Hocevar did in his submission:
> Change all occurrances to the less explicit, but equally
> valid .p2align macro.
>
> Also included is a change in mpegvideo_mmx.c which was in Sam
> Hocevar's patch, and not mine.
>
> I hope this is acceptable :)
Forgot the actual patch. Attached.
--
- Dan Villiom Podlaski Christiansen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-darwin-i386-fixes.diff
Type: application/applefile
Size: 387 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060217/457b9431/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-darwin-i386-fixes.diff
Type: application/octet-stream
Size: 28338 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060217/457b9431/attachment.obj>
-------------- next part --------------
More information about the ffmpeg-devel
mailing list