[Ffmpeg-devel] [PATCH] Build Darwin dynamic/shared libraries

Dan Villiom Podlaski Christiansen danchr
Fri Jul 15 11:57:03 CEST 2005

Michael Niedermayer wrote:
> something is wrong here, global variables must be initalized to 0 accoriding 
> to the c standard, now if we initalize them explicitly to 0 that doesnt change
> anything and if gcc outputs different code here thats very odd, i would have
> expected gcc to be able to optimize this away
> without knowing gccs internals i feel that assuming that future versions of
> gcc will not optimize this away is risky furthermore such things would need
> to be documented it cant be expected that the reader knows that a global x=0;
> is needed by gcc-darwin-mach-o

I believe this has to do with the Mach-O binary format specification 
which treats initialized variables different from uninitialized:

I have added a comment which explains why the variables must be initialised.

> then why not add another variable for that hardcoded dir? hardcoded_libdir or
> so? 
> putting DESTDIR before every occurance of libdir, bindir and mandir is not 
> acceptable

Why, may I ask? I used DESTDIR to follow the convention used by GNU 
autotools, so that FFmpeg nicely integrates with them. Very useful and 
neat for packagers and porters, IMHO.

>> ifeq ($(CONFIG_DARWIN), yes)
>> SHFLAGS+=-install_name $(libdir)/$(SLIB) -compatibility_version 
> $(SLIB_VERSION) -current_version $(SLIB_VERSION)
>> endif

Yes, I noticed that one shortly after having posted my reply to you :)

Here's an updated patch, which also adds a --disable-static flag, as 
well as making --disable-debug  and --disable-strip affect whether 
additional libraries with debug symbols are installed. Also, I've 
changed --enable-shared-pp to be autodetected by default depending on 
whether --enable-shared and --enable-pp is specified.

- Dan Christiansen
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg-dynamic-darwin-5.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050715/fafa4837/attachment.txt>

More information about the ffmpeg-devel mailing list