[FFmpeg-devel] [PATCH] fix darwin EBX check in configure

Alexander Strange astrange
Sun Aug 9 19:57:05 CEST 2009


On Aug 9, 2009, at 5:38 AM, M?ns Rullg?rd wrote:

> Alexander Strange <astrange at ithinksw.com> writes:
>
>> check_as uses ASFLAGS instead of CFLAGS, and -mdynamic-no-pic (which
>> makes EBX available) is only in CFLAGS, so the test fails.
>> This adds it to ASFLAGS too. Of course, on darwin ASFLAGS isn't even
>> used for anything except check_as, but other fixes seemed like they
>> might break something else.
>>
>> Note that -mdynamic-no-pic works fine with shared libraries with a
>> recent linker, but prints 6500+ warnings about textrels.
>>
>>
>> Index: configure
>> ===================================================================
>> --- configure	(revision 19609)
>> +++ configure	(working copy)
>> @@ -1871,7 +1871,15 @@
>>         FFSERVERLDFLAGS=-Wl,-bind_at_load
>>         objformat="macho"
>>         enabled x86_64 && objformat="macho64"
>> -        enabled shared || check_cflags -mdynamic-no-pic
>> +        if ! enabled shared; then
>> +            check_cc -mdynamic-no-pic <<EOF
>> +            int x;
>> +EOF
>> +            if test "$?" == 0; then
>> +                add_cflags -mdynamic-no-pic
>> +                add_asflags -mdynamic-no-pic
>> +            fi
>> +        fi
>
> enabled shared ||
>    { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }

That works too.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dynamic_no_pic.diff
Type: text/x-diff
Size: 523 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090809/bca10f95/attachment.diff>



More information about the ffmpeg-devel mailing list