Browse Source

backport symbol versioning patch

Originally committed as revision 21595 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
tags/v0.5.1
Reinhard Tartler 16 years ago
parent
commit
a9785f58c6
10 changed files with 44 additions and 5 deletions
  1. +5
    -1
      common.mak
  2. +13
    -3
      configure
  3. +3
    -0
      libavcodec/libavcodec.v
  4. +4
    -0
      libavdevice/libavdevice.v
  5. +4
    -0
      libavfilter/libavfilter.v
  6. +3
    -0
      libavformat/libavformat.v
  7. +4
    -0
      libavutil/libavutil.v
  8. +4
    -0
      libpostproc/libpostproc.v
  9. +3
    -0
      libswscale/libswscale.v
  10. +1
    -1
      subdir.mak

+ 5
- 1
common.mak View File

@@ -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_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \

%$(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,$(ALLHEADERS:.h=.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



+ 13
- 3
configure View File

@@ -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}-$$-${RANDOM}${EXESUF}"
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"


+ 3
- 0
libavcodec/libavcodec.v View File

@@ -0,0 +1,3 @@
LIBAVCODEC_$MAJOR {
global: *;
};

+ 4
- 0
libavdevice/libavdevice.v View File

@@ -0,0 +1,4 @@
LIBAVDEVICE_$MAJOR {
global: avdevice_*;
local: *;
};

+ 4
- 0
libavfilter/libavfilter.v View File

@@ -0,0 +1,4 @@
LIBAVFILTER_$MAJOR {
global: avfilter_*; av_*;
local: *;
};

+ 3
- 0
libavformat/libavformat.v View File

@@ -0,0 +1,3 @@
LIBAVFORMAT_$MAJOR {
global: *;
};

+ 4
- 0
libavutil/libavutil.v View File

@@ -0,0 +1,4 @@
LIBAVUTIL_$MAJOR {
global: av_*; ff_*; avutil_*;
local: *;
};

+ 4
- 0
libpostproc/libpostproc.v View File

@@ -0,0 +1,4 @@
LIBPOSTPROC_$MAJOR {
global: postproc_*; pp_*;
local: *;
};

+ 3
- 0
libswscale/libswscale.v View File

@@ -0,0 +1,3 @@
LIBSWSCALE_%MAJOR% {
global: *;
};

+ 1
- 1
subdir.mak View File

@@ -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)


Loading…
Cancel
Save