[FFmpeg-cvslog] Merge commit '3794062ab1a13442b06f6d76c54dce51ffa54697'
Clément Bœsch
git at videolan.org
Sun Apr 9 15:56:06 EEST 2017
ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sun Apr 9 14:52:00 2017 +0200| [210678d3c5176d594bc9407cd73815944212fb9b] | committer: Clément Bœsch
Merge commit '3794062ab1a13442b06f6d76c54dce51ffa54697'
* commit '3794062ab1a13442b06f6d76c54dce51ffa54697':
Remove Plan 9 support
Merged-by: Clément Bœsch <u at pkh.me>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=210678d3c5176d594bc9407cd73815944212fb9b
---
Makefile | 4 +--
compat/plan9/head | 10 --------
compat/plan9/main.c | 34 --------------------------
compat/plan9/printf | 2 --
configure | 19 +--------------
doc/platform.texi | 63 ------------------------------------------------
libavformat/os_support.h | 2 +-
library.mak | 2 +-
tests/api/Makefile | 2 +-
tests/checkasm/Makefile | 2 +-
10 files changed, 7 insertions(+), 133 deletions(-)
diff --git a/Makefile b/Makefile
index 4fe0cdae35..aa23251c6e 100644
--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,7 @@ FF_STATIC_DEP_LIBS := $(STATIC_DEP_LIBS)
all: $(AVPROGS)
-$(TOOLS): %$(EXESUF): %.o $(EXEOBJS)
+$(TOOLS): %$(EXESUF): %.o
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS)
tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
@@ -116,7 +116,7 @@ $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
include $(SRC_PATH)/doc/Makefile
define DOPROG
-OBJS-$(1) += $(1).o $(EXEOBJS) $(OBJS-$(1)-yes)
+OBJS-$(1) += $(1).o $(OBJS-$(1)-yes)
$(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
$(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
diff --git a/compat/plan9/head b/compat/plan9/head
deleted file mode 100755
index 2840b2d50f..0000000000
--- a/compat/plan9/head
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-n=10
-
-case "$1" in
- -n) n=$2; shift 2 ;;
- -n*) n=${1#-n}; shift ;;
-esac
-
-exec sed ${n}q "$@"
diff --git a/compat/plan9/main.c b/compat/plan9/main.c
deleted file mode 100644
index d46f96d170..0000000000
--- a/compat/plan9/main.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-int plan9_main(int argc, char **argv);
-
-#undef main
-int main(int argc, char **argv)
-{
- /* The setfcr() function in lib9 is broken, must use asm. */
-#ifdef __i386
- short fcr;
- __asm__ volatile ("fstcw %0 \n"
- "or $63, %0 \n"
- "fldcw %0 \n"
- : "=m"(fcr));
-#endif
-
- return plan9_main(argc, argv);
-}
diff --git a/compat/plan9/printf b/compat/plan9/printf
deleted file mode 100755
index 1a70a9e91a..0000000000
--- a/compat/plan9/printf
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec awk "BEGIN { for (i = 2; i < ARGC; i++) printf \"$1\", ARGV[i] }" "$@"
diff --git a/configure b/configure
index 66ef12da1e..df9890d68b 100755
--- a/configure
+++ b/configure
@@ -1423,7 +1423,7 @@ EOF
cp_if_changed(){
cmp -s "$1" "$2" && { test "$quiet" != "yes" && echo "$2 is unchanged"; } && return
mkdir -p "$(dirname $2)"
- $cp_f "$1" "$2"
+ cp -f "$1" "$2"
}
# CONFIG_LIST contains configurable options, while HAVE_LIST is for
@@ -3236,7 +3236,6 @@ ar_default="ar"
cc_default="gcc"
cxx_default="g++"
host_cc_default="gcc"
-cp_f="cp -f"
doxygen_default="doxygen"
install="install"
ln_s_default="ln -s -f"
@@ -4984,18 +4983,6 @@ case $target_os in
;;
minix)
;;
- plan9)
- add_cppflags -D_C99_SNPRINTF_EXTENSION \
- -D_REENTRANT_SOURCE \
- -D_RESEARCH_SOURCE \
- -DFD_SETSIZE=96 \
- -DHAVE_SOCK_OPTS
- add_compat strtod.o strtod=avpriv_strtod
- network_extralibs='-lbsd'
- exeobjs=compat/plan9/main.o
- disable ffserver
- cp_f='cp'
- ;;
none)
;;
*)
@@ -6374,9 +6361,6 @@ case $target_os in
osf1)
enabled ccc && add_ldflags '-Wl,-expect_unresolved,*'
;;
- plan9)
- add_cppflags -Dmain=plan9_main
- ;;
esac
enable frame_thread_encoder
@@ -6745,7 +6729,6 @@ ZLIB=$($ldflags_filter -lz)
LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
EXTRALIBS=$extralibs
COMPAT_OBJS=$compat_objs
-EXEOBJS=$exeobjs
INSTALL=$install
LIBTARGET=${LIBTARGET}
SLIBNAME=${SLIBNAME}
diff --git a/doc/platform.texi b/doc/platform.texi
index 0cce470393..576c295313 100644
--- a/doc/platform.texi
+++ b/doc/platform.texi
@@ -343,67 +343,4 @@ and for a build with shared libraries
./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
@end example
- at chapter Plan 9
-
-The native @uref{http://plan9.bell-labs.com/plan9/, Plan 9} compiler
-does not implement all the C99 features needed by FFmpeg so the gcc
-port must be used. Furthermore, a few items missing from the C
-library and shell environment need to be fixed.
-
- at itemize
-
- at item GNU awk, grep, make, and sed
-
-Working packages of these tools can be found at
- at uref{http://code.google.com/p/ports2plan9/downloads/list, ports2plan9}.
-They can be installed with @uref{http://9front.org/, 9front's} @code{pkg}
-utility by setting @code{pkgpath} to
- at code{http://ports2plan9.googlecode.com/files/}.
-
- at item Missing/broken @code{head} and @code{printf} commands
-
-Replacements adequate for building FFmpeg can be found in the
- at code{compat/plan9} directory. Place these somewhere they will be
-found by the shell. These are not full implementations of the
-commands and are @emph{not} suitable for general use.
-
- at item Missing C99 @code{stdint.h} and @code{inttypes.h}
-
-Replacement headers are available from
- at url{http://code.google.com/p/plan9front/issues/detail?id=152}.
-
- at item Missing or non-standard library functions
-
-Some functions in the C library are missing or incomplete. The
- at code{@uref{http://ports2plan9.googlecode.com/files/gcc-apelibs-1207.tbz,
-gcc-apelibs-1207}} package from
- at uref{http://code.google.com/p/ports2plan9/downloads/list, ports2plan9}
-includes an updated C library, but installing the full package gives
-unusable executables. Instead, keep the files from @code{gccbin.tgz}
-under @code{/386/lib/gnu}. From the @code{libc.a} archive in the
- at code{gcc-apelibs-1207} package, extract the following object files and
-turn them into a library:
-
- at itemize
- at item @code{strerror.o}
- at item @code{strtoll.o}
- at item @code{snprintf.o}
- at item @code{vsnprintf.o}
- at item @code{vfprintf.o}
- at item @code{_IO_getc.o}
- at item @code{_IO_putc.o}
- at end itemize
-
-Use the @code{--extra-libs} option of @code{configure} to inform the
-build system of this library.
-
- at item FPU exceptions enabled by default
-
-Unlike most other systems, Plan 9 enables FPU exceptions by default.
-These must be disabled before calling any FFmpeg functions. While the
-included tools will do this automatically, other users of the
-libraries must do it themselves.
-
- at end itemize
-
@bye
diff --git a/libavformat/os_support.h b/libavformat/os_support.h
index caf1a2fab4..6e245a88d8 100644
--- a/libavformat/os_support.h
+++ b/libavformat/os_support.h
@@ -76,7 +76,7 @@ static inline int is_dos_path(const char *path)
return 0;
}
-#if defined(__OS2__) || defined(__Plan9__)
+#if defined(__OS2__)
#define SHUT_RD 0
#define SHUT_WR 1
#define SHUT_RDWR 2
diff --git a/library.mak b/library.mak
index 837b3600a9..266176f1ae 100644
--- a/library.mak
+++ b/library.mak
@@ -28,7 +28,7 @@ define RULES
$(TOOLS): THISLIB = $(FULLNAME:%=$(LD_LIB))
$(TESTPROGS): THISLIB = $(SUBDIR)$(LIBNAME)
-$(TESTPROGS) $(TOOLS): %$(EXESUF): %.o $(EXEOBJS)
+$(TESTPROGS) $(TOOLS): %$(EXESUF): %.o
$$(LD) $(LDFLAGS) $(LDEXEFLAGS) $$(LD_O) $$(filter %.o,$$^) $$(THISLIB) $(FFEXTRALIBS) $$(ELIBS)
$(SUBDIR)lib$(NAME).ver: $(SUBDIR)lib$(NAME).v $(OBJS)
diff --git a/tests/api/Makefile b/tests/api/Makefile
index ec0e125c01..759dd9d243 100644
--- a/tests/api/Makefile
+++ b/tests/api/Makefile
@@ -14,7 +14,7 @@ $(APITESTOBJS): | $(sort $(dir $(APITESTOBJS)))
$(APITESTOBJS) $(APITESTOBJS:.o=.i): CPPFLAGS += -DTEST
$(APITESTOBJS) $(APITESTOBJS:.o=.i): CFLAGS += -Umain
-$(APITESTPROGS): %$(EXESUF): %.o $(EXEOBJS) $(FF_DEP_LIBS)
+$(APITESTPROGS): %$(EXESUF): %.o $(FF_DEP_LIBS)
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(filter %.o,$^) $(FF_EXTRALIBS) $(ELIBS)
testclean::
diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
index 6c75388d6c..4e103f43ed 100644
--- a/tests/checkasm/Makefile
+++ b/tests/checkasm/Makefile
@@ -47,7 +47,7 @@ tests/checkasm/checkasm.o: CFLAGS += -Umain
CHECKASM := tests/checkasm/checkasm$(EXESUF)
-$(CHECKASM): $(EXEOBJS) $(CHECKASMOBJS) $(FF_STATIC_DEP_LIBS)
+$(CHECKASM): $(CHECKASMOBJS) $(FF_STATIC_DEP_LIBS)
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(CHECKASMOBJS) $(FF_STATIC_DEP_LIBS) $(EXTRALIBS)
checkasm: $(CHECKASM)
======================================================================
diff --cc Makefile
index 4fe0cdae35,f5bbc8b626..aa23251c6e
--- a/Makefile
+++ b/Makefile
@@@ -116,11 -157,11 +116,11 @@@ $(foreach D,$(FFLIBS),$(eval $(call DOS
include $(SRC_PATH)/doc/Makefile
define DOPROG
- OBJS-$(1) += $(1).o $(EXEOBJS) $(OBJS-$(1)-yes)
+ OBJS-$(1) += $(1).o $(OBJS-$(1)-yes)
-$(1)$(EXESUF): $$(OBJS-$(1))
+$(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
-$(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
-$(1)$(EXESUF): FF_EXTRALIBS += $(LIBS-$(1))
+$(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
+$(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(LIBS-$(1))
-include $$(OBJS-$(1):.o=.d)
endef
diff --cc configure
index 66ef12da1e,1ae4ab2b0a..df9890d68b
--- a/configure
+++ b/configure
@@@ -3234,12 -2490,8 +3234,11 @@@ mandir_default='${prefix}/share/man
# toolchain
ar_default="ar"
cc_default="gcc"
+cxx_default="g++"
host_cc_default="gcc"
- cp_f="cp -f"
-ln_s="ln -s -f"
+doxygen_default="doxygen"
+install="install"
+ln_s_default="ln -s -f"
nm_default="nm -g"
objformat="elf"
pkg_config_default=pkg-config
@@@ -6374,13 -5044,8 +6361,10 @@@ case $target_os i
osf1)
enabled ccc && add_ldflags '-Wl,-expect_unresolved,*'
;;
- plan9)
- add_cppflags -Dmain=plan9_main
- ;;
esac
+enable frame_thread_encoder
+
enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
check_deps $CONFIG_LIST \
@@@ -6745,8 -5303,7 +6729,7 @@@ ZLIB=$($ldflags_filter -lz
LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
EXTRALIBS=$extralibs
COMPAT_OBJS=$compat_objs
- EXEOBJS=$exeobjs
-INSTALL=install
+INSTALL=$install
LIBTARGET=${LIBTARGET}
SLIBNAME=${SLIBNAME}
SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}
diff --cc tests/api/Makefile
index ec0e125c01,0000000000..759dd9d243
mode 100644,000000..100644
--- a/tests/api/Makefile
+++ b/tests/api/Makefile
@@@ -1,21 -1,0 +1,21 @@@
+APITESTPROGS-$(call ENCDEC, FLAC, FLAC) += api-flac
+APITESTPROGS-$(call DEMDEC, H264, H264) += api-h264
+APITESTPROGS-yes += api-seek
+APITESTPROGS-yes += api-codec-param
+APITESTPROGS-$(call DEMDEC, H263, H263) += api-band
+APITESTPROGS-$(HAVE_THREADS) += api-threadmessage
+APITESTPROGS += $(APITESTPROGS-yes)
+
+APITESTOBJS := $(APITESTOBJS:%=$(APITESTSDIR)%) $(APITESTPROGS:%=$(APITESTSDIR)/%-test.o)
+APITESTPROGS := $(APITESTPROGS:%=$(APITESTSDIR)/%-test$(EXESUF))
+-include $(wildcard $(APITESTOBJS:.o=.d))
+
+$(APITESTOBJS): | $(sort $(dir $(APITESTOBJS)))
+$(APITESTOBJS) $(APITESTOBJS:.o=.i): CPPFLAGS += -DTEST
+$(APITESTOBJS) $(APITESTOBJS:.o=.i): CFLAGS += -Umain
+
- $(APITESTPROGS): %$(EXESUF): %.o $(EXEOBJS) $(FF_DEP_LIBS)
++$(APITESTPROGS): %$(EXESUF): %.o $(FF_DEP_LIBS)
+ $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(filter %.o,$^) $(FF_EXTRALIBS) $(ELIBS)
+
+testclean::
+ $(RM) $(addprefix $(APITESTSDIR)/,$(CLEANSUFFIXES) *-test$(EXESUF))
diff --cc tests/checkasm/Makefile
index 6c75388d6c,639a08e0a6..4e103f43ed
--- a/tests/checkasm/Makefile
+++ b/tests/checkasm/Makefile
@@@ -43,11 -32,9 +43,11 @@@ CHECKASMDIRS := $(sort $(dir $(CHECKASM
$(CHECKASMOBJS): | $(CHECKASMDIRS)
OBJDIRS += $(CHECKASMDIRS)
+tests/checkasm/checkasm.o: CFLAGS += -Umain
+
CHECKASM := tests/checkasm/checkasm$(EXESUF)
- $(CHECKASM): $(EXEOBJS) $(CHECKASMOBJS) $(FF_STATIC_DEP_LIBS)
+ $(CHECKASM): $(CHECKASMOBJS) $(FF_STATIC_DEP_LIBS)
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(CHECKASMOBJS) $(FF_STATIC_DEP_LIBS) $(EXTRALIBS)
checkasm: $(CHECKASM)
More information about the ffmpeg-cvslog
mailing list