[FFmpeg-cvslog] r21236 - in trunk: common.mak configure libavcodec/libavcodec.v libavdevice/libavdevice.v libavfilter/libavfilter.v libavformat/libavformat.v libavutil/libavutil.v libpostproc/libpostproc.v subdir.mak
mru
subversion
Sat Jan 16 05:49:02 CET 2010
Author: mru
Date: Sat Jan 16 05:49:02 2010
New Revision: 21236
Log:
Add symbol versioning for shared libraries
Based on patch by Reinhard Tartler <siretart tauware de>
Added:
trunk/libavcodec/libavcodec.v
trunk/libavdevice/libavdevice.v
trunk/libavfilter/libavfilter.v
trunk/libavformat/libavformat.v
trunk/libavutil/libavutil.v
trunk/libpostproc/libpostproc.v
Modified:
trunk/common.mak
trunk/configure
trunk/subdir.mak
Modified: trunk/common.mak
==============================================================================
--- trunk/common.mak Sat Jan 16 05:48:58 2010 (r21235)
+++ trunk/common.mak Sat Jan 16 05:49:02 2010 (r21236)
@@ -9,6 +9,7 @@ vpath %.c $(SRC_DIR)
vpath %.h $(SRC_DIR)
vpath %.S $(SRC_DIR)
vpath %.asm $(SRC_DIR)
+vpath %.v $(SRC_DIR)
ifeq ($(SRC_DIR),$(SRC_PATH_BARE))
BUILD_ROOT_REL = .
@@ -33,6 +34,9 @@ CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD
%$(EXESUF): %.c
+%.ver: %.v
+ sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
+
SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries
ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES))
$(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES)
@@ -77,7 +81,7 @@ $(HOSTPROGS): %$(HOSTEXESUF): %.o
DEPS := $(OBJS:.o=.d)
depend dep: $(DEPS)
-CLEANSUFFIXES = *.d *.o *~ *.ho *.map
+CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
DISTCLEANSUFFIXES = *.pc
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
Modified: trunk/configure
==============================================================================
--- trunk/configure Sat Jan 16 05:48:58 2010 (r21235)
+++ trunk/configure Sat Jan 16 05:49:02 2010 (r21236)
@@ -1561,6 +1561,7 @@ tmpfile TMPE $EXESUF
tmpfile TMPH .h
tmpfile TMPO .o
tmpfile TMPS .S
+tmpfile TMPV .ver
tmpfile TMPSH .sh
unset -f mktemp
@@ -2568,6 +2569,10 @@ check_ldflags -Wl,--as-needed
check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavfilter -Wl,-rpath-link,\$(BUILD_ROOT)/libavdevice -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
check_ldflags -Wl,-Bsymbolic
+echo "X{};" > $TMPV
+test_ldflags -Wl,--version-script,$TMPV &&
+ append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
+
if enabled small; then
check_cflags -Os # not all compilers support -Os
optimizations="small"
Added: trunk/libavcodec/libavcodec.v
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/libavcodec/libavcodec.v Sat Jan 16 05:49:02 2010 (r21236)
@@ -0,0 +1,3 @@
+LIBAVCODEC_$MAJOR {
+ global: *;
+};
Added: trunk/libavdevice/libavdevice.v
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/libavdevice/libavdevice.v Sat Jan 16 05:49:02 2010 (r21236)
@@ -0,0 +1,4 @@
+LIBAVDEVICE_$MAJOR {
+ global: avdevice_*;
+ local: *;
+};
Added: trunk/libavfilter/libavfilter.v
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/libavfilter/libavfilter.v Sat Jan 16 05:49:02 2010 (r21236)
@@ -0,0 +1,4 @@
+LIBAVFILTER_$MAJOR {
+ global: avfilter_*; av_*;
+ local: *;
+};
Added: trunk/libavformat/libavformat.v
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/libavformat/libavformat.v Sat Jan 16 05:49:02 2010 (r21236)
@@ -0,0 +1,3 @@
+LIBAVFORMAT_$MAJOR {
+ global: *;
+};
Added: trunk/libavutil/libavutil.v
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/libavutil/libavutil.v Sat Jan 16 05:49:02 2010 (r21236)
@@ -0,0 +1,4 @@
+LIBAVUTIL_$MAJOR {
+ global: av_*; ff_*; avutil_*;
+ local: *;
+};
Added: trunk/libpostproc/libpostproc.v
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/libpostproc/libpostproc.v Sat Jan 16 05:49:02 2010 (r21236)
@@ -0,0 +1,4 @@
+LIBPOSTPROC_$MAJOR {
+ global: postproc_*; pp_*;
+ local: *;
+};
Modified: trunk/subdir.mak
==============================================================================
--- trunk/subdir.mak Sat Jan 16 05:48:58 2010 (r21235)
+++ trunk/subdir.mak Sat Jan 16 05:49:02 2010 (r21236)
@@ -51,7 +51,7 @@ install-libs: install-lib$(NAME)-shared
$(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS)
+$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver
$(SLIB_CREATE_DEF_CMD)
$(LD) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
$(SLIB_EXTRA_CMD)
More information about the ffmpeg-cvslog
mailing list