[FFmpeg-devel] [PATCH] Building ffmpeg for OpenSolaris/SPARC using GCCFSS 4.2.1

Måns Rullgård mans
Mon Jan 5 22:45:04 CET 2009


Palle Lyckegaard <palle at lyckegaard.dk> writes:

> Hi ffmpeg devlopers.
>
> The attached patch makes it possible to build ffmpeg svn revision
> 16404 on an OpenSolaris/SPARC based system using GCC 4.2.1 for Sun
> Systems (http://cooltools.sunsource.net/gcc).
>
> The patch introduces a variable name for the install command (defaults
> to install, but is overridden to /usr/ucb/install if building on a
> SunOS/Solaris/OpenSolaris host).
> Futhermore the __EXTENSIONS__ define is activated only if building on
> SunOS/Solaris/OpenSolaris.
>
> PATH must be set to
> export PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:PATH_TO_GCCFSS_INSTALL_DIR
> for a succesfull build.
>
> Host info:
> uname -a reports "SunOS odin 5.11 snv_90 sun4u sparc SUNW,Ultra-5_10"
>
> Please consider the patch and apply if ok...
>
> Regards
>
> Index: configure
> ===================================================================
> --- configure	(revision 16404)
> +++ configure	(working copy)
> @@ -1106,6 +1106,7 @@
>  nm_default="nm"
>  ranlib="ranlib"
>  strip="strip"
> +install="install"
>  ln_s="ln -sf"
>  objformat="elf"

If we go this route, the value should be settable from the command
line, and should use the _default mechanism the same way as $cc.

> @@ -1401,6 +1402,8 @@
>          FFSERVERLDFLAGS=""
>          SHFLAGS='-shared -Wl,-h,$$(@F)'
>          network_extralibs="-lsocket -lnsl"
> +        add_cflags "-D__EXTENSIONS__"

This line OK without the unnecessary quotes.

> +        install="/usr/ucb/install"

This will break if cross-compiling for a Solaris target.

>          ;;
>      netbsd)
>          oss_demuxer_extralibs="-lossaudio"
> @@ -1454,8 +1457,8 @@
>          SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
>          SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
>          SLIB_EXTRA_CMD='-lib /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
> -        SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
> -            install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"'
> +        SLIB_INSTALL_EXTRA_CMD='-$(install) -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
> +            $(install) -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"'
>          SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"'
>          SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
>          objformat="win32"
> @@ -1519,7 +1522,7 @@
>            emxexp -o $(OBJS) >> $(SUBDIR)$(NAME).def'
>          SLIB_EXTRA_CMD='emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(NAME).def; \
>            emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;'
> -        SLIB_INSTALL_EXTRA_CMD='install -m 644 $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"'
> +        SLIB_INSTALL_EXTRA_CMD='$(install) -m 644 $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"'
>          SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
>          disable vhook
>          enable dos_paths

These hunks use $(install) (lowercase), ...

> @@ -2236,6 +2239,7 @@
>      echo "STRIP=$strip" >> config.mak ||
>      echo "STRIP=echo ignoring strip" >> config.mak
>
> +echo "INSTALL=$install" >> config.mak

... but this sets INSTALL (uppercase).

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list