[FFmpeg-devel] [Patch] Alternative OS/2 patch
Diego Biurrun
diego
Mon Nov 5 01:29:23 CET 2007
On Sun, Nov 04, 2007 at 02:07:54PM -0800, Dave Yeo wrote:
> On 11/03/07 06:19 pm, Diego Biurrun wrote:
>> On Mon, Oct 29, 2007 at 04:27:40PM -0700, Dave Yeo wrote:
>>> On 10/24/07 10:10 pm, Dave Yeo wrote:
> ...
>>> + echo EXPORTS >> \$(FULLNAME).def; \
>>> + emxexp -o \$(SHARED_OBJS) >> \$(FULLNAME).def"
>>> + SLIB_EXTRA_CMD='emximp -o $(LIBPREF)$(FULLNAME)_dll.a
>>> $(FULLNAME).def; emximp -o $(LIBPREF)$(FULLNAME)_dll.lib $(FULLNAME).def'
>> I think it should be just SLIB_EXTRA_CMD unless SLIB_CREATE_DEF_CMD gets
>> reused on another platform.
>
> The problem is that SLIB_CREATE_DEF_CMD needs to be run before linking so
> we have a def file to link.
Can you point me at some place that explains what the def file is for so
I can understand all of this a bit better?
> I'm not sure about the use of SLIB_EXTRA_CMD in mingw. It looks like it is
> just appending some more linker flags in which case they could perhaps be
> moved to SHFLAGS and SLIB_EXTRA_CMD moved to prelinking or replaced by
> SLIB_CREATE_DEF_CMD. The SLIB_EXTRA_CMD here could easily be rolled into
> SLIB_CREATE_DEF_CMD as well.
I'm not sure what the lib command does either, but since it is run after
installation it cannot add linker flags unless I misunderstand what you
mean by "adding linker flags".
Doesn't the lib command create some sort of def file as well?
>>> + SLIB_INSTALL_EXTRA_CMD='install -m 644 $(LIBPREF)$(FULLNAME)_dll.lib
>>> $(LIBPREF)$(FULLNAME)_dll.a $(LIBDIR)'
>>> + SLIB_UNINSTALL_EXTRA_CMD='rm -f
>>> $(LIBDIR)/$(LIBPREF)$(FULLNAME)_dll.lib; rm -f
>>> $(LIBDIR)/$(LIBPREF)$(FULLNAME)_dll.a'
>> Both of these need quoting, $(LIBDIR) might contain spaces.
> Fixed though I notice right now make uninstall does not remove the binaries
> and manpages if $PREFIX contains spaces due to lack of quoting. I'll look
> into this when time permits.
No need to look into this, I fixed it, thanks for pointing this out.
> ps also added creation of map files to assist in debugging.
Where?
> --- configure (revision 10924)
> +++ configure (working copy)
> @@ -1210,6 +1212,33 @@
> + os/2)
> + SLIB_CREATE_DEF_CMD="echo LIBRARY \$(FULLNAME) INITINSTANCE TERMINSTANCE > \$(FULLNAME).def; \
> + echo DESCRIPTION '\"\$(SLIBNAME_WITH_VERSION)\"' >> \$(FULLNAME).def; \
> + echo PROTMODE >> \$(FULLNAME).def; \
> + echo CODE PRELOAD MOVEABLE DISCARDABLE >> \$(FULLNAME).def; \
> + echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> \$(FULLNAME).def; \
> + echo EXPORTS >> \$(FULLNAME).def; \
> + emxexp -o \$(OBJS) >> \$(FULLNAME).def"
Try using 'cat << EOF', that should simplify things a lot.
> + SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(FULLNAME)_dll.lib; rm -f "$(LIBDIR)"/$(LIBPREF)$(FULLNAME)_dll.a'
Nit: Put the double quotes around the complete filename.
Diego
More information about the ffmpeg-devel
mailing list