[FFmpeg-cvslog] r21595 - in branches/0.5: . common.mak configure libavcodec/libavcodec.v libavdevice/libavdevice.v libavfilter/libavfilter.v libavformat/libavformat.v libavutil/libavutil.v libpostproc/libpostproc....

Andreas Öman andreas
Mon Feb 1 22:50:03 CET 2010


siretart wrote:
> Author: siretart
> Date: Mon Feb  1 17:00:09 2010
> New Revision: 21595
> 
> Log:
> backport symbol versioning patch

Hm, This does not seem to work for me. ''libavutil.ver'' is nowhere
to be found.

This is just from a clean checkout of 0.5 with ./configure && make

gcc -rdynamic -export-dynamic -Wl,--warn-common -Wl,--as-needed 
-Wl,-rpath-link,"/tmp/0.5"/libpostproc 
-Wl,-rpath-link,"/tmp/0.5"/libswscale 
-Wl,-rpath-link,"/tmp/0.5"/libavfilter 
-Wl,-rpath-link,"/tmp/0.5"/libavdevice 
-Wl,-rpath-link,"/tmp/0.5"/libavformat 
-Wl,-rpath-link,"/tmp/0.5"/libavcodec 
-Wl,-rpath-link,"/tmp/0.5"/libavutil -Wl,-Bsymbolic -o vhook/fish.so 
-shared -Wl,-soname,fish.so -Wl,--version-script,libavutil/libavutil.ver 
vhook/fish.o
/usr/bin/ld: cannot open linker script file libavutil/libavutil.ver: No 
such file or directory
collect2: ld returned 1 exit status


> 
> Added:
>    branches/0.5/libavcodec/libavcodec.v
>       - copied unchanged from r21236, trunk/libavcodec/libavcodec.v
>    branches/0.5/libavdevice/libavdevice.v
>       - copied unchanged from r21236, trunk/libavdevice/libavdevice.v
>    branches/0.5/libavfilter/libavfilter.v
>       - copied unchanged from r21236, trunk/libavfilter/libavfilter.v
>    branches/0.5/libavformat/libavformat.v
>       - copied unchanged from r21236, trunk/libavformat/libavformat.v
>    branches/0.5/libavutil/libavutil.v
>       - copied unchanged from r21236, trunk/libavutil/libavutil.v
>    branches/0.5/libpostproc/libpostproc.v
>       - copied unchanged from r21236, trunk/libpostproc/libpostproc.v
>    branches/0.5/libswscale/libswscale.v
> Modified:
>    branches/0.5/   (props changed)
>    branches/0.5/common.mak
>    branches/0.5/configure
>    branches/0.5/subdir.mak
> 
> Modified: branches/0.5/common.mak
> ==============================================================================
> --- branches/0.5/common.mak	Mon Feb  1 16:51:05 2010	(r21594)
> +++ branches/0.5/common.mak	Mon Feb  1 17:00:09 2010	(r21595)
> @@ -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 = .
> @@ -43,6 +44,9 @@ CFLAGS := -DHAVE_AV_CONFIG_H -D_FILE_OFF
>  
>  %$(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 @@ checkheaders: $(filter-out %_template.ho
>  DEPS := $(OBJS:.o=.d)
>  depend dep: $(DEPS)
>  
> -CLEANSUFFIXES = *.o *~ *.ho
> +CLEANSUFFIXES = *.o *~ *.ho *.ver
>  LIBSUFFIXES   = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map
>  DISTCLEANSUFFIXES = *.d *.pc
>  
> 
> Modified: branches/0.5/configure
> ==============================================================================
> --- branches/0.5/configure	Mon Feb  1 16:51:05 2010	(r21594)
> +++ branches/0.5/configure	Mon Feb  1 17:00:09 2010	(r21595)
> @@ -566,13 +566,18 @@ int x;
>  EOF
>  }
>  
> -check_ldflags(){
> -    log check_ldflags "$@"
> -    check_ld "$@" <<EOF && add_ldflags "$@"
> +test_ldflags(){
> +    log test_ldflags "$@"
> +    check_ld "$@" <<EOF
>  int main(void){ return 0; }
>  EOF
>  }
>  
> +check_ldflags(){
> +    log check_ldflags "$@"
> +    test_ldflags "$@" && add_ldflags "$@"
> +}
> +
>  check_header(){
>      log check_header "$@"
>      header=$1
> @@ -1356,6 +1361,7 @@ TMPE="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$
>  TMPH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
>  TMPO="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
>  TMPS="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
> +TMPV="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.ver"
>  TMPSH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
>  
>  # make sure we can execute files in $TMPDIR
> @@ -2160,6 +2166,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: branches/0.5/libswscale/libswscale.v
> ==============================================================================
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ branches/0.5/libswscale/libswscale.v	Mon Feb  1 17:00:09 2010	(r21595)
> @@ -0,0 +1,3 @@
> +LIBSWSCALE_%MAJOR% {
> +        global: *;
> +};
> 
> Modified: branches/0.5/subdir.mak
> ==============================================================================
> --- branches/0.5/subdir.mak	Mon Feb  1 16:51:05 2010	(r21594)
> +++ branches/0.5/subdir.mak	Mon Feb  1 17:00:09 2010	(r21595)
> @@ -27,7 +27,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)
>  	$(CC) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter-out $(DEP_LIBS),$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
>  	$(SLIB_EXTRA_CMD)
> _______________________________________________
> ffmpeg-cvslog mailing list
> ffmpeg-cvslog at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-cvslog




More information about the ffmpeg-cvslog mailing list