mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-19 05:49:09 +02:00
backport symbol versioning patch
Originally committed as revision 21595 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
This commit is contained in:
parent
7a5e131735
commit
a9785f58c6
@ -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
|
||||
|
||||
|
16
configure
vendored
16
configure
vendored
@ -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
libavcodec/libavcodec.v
Normal file
3
libavcodec/libavcodec.v
Normal file
@ -0,0 +1,3 @@
|
||||
LIBAVCODEC_$MAJOR {
|
||||
global: *;
|
||||
};
|
4
libavdevice/libavdevice.v
Normal file
4
libavdevice/libavdevice.v
Normal file
@ -0,0 +1,4 @@
|
||||
LIBAVDEVICE_$MAJOR {
|
||||
global: avdevice_*;
|
||||
local: *;
|
||||
};
|
4
libavfilter/libavfilter.v
Normal file
4
libavfilter/libavfilter.v
Normal file
@ -0,0 +1,4 @@
|
||||
LIBAVFILTER_$MAJOR {
|
||||
global: avfilter_*; av_*;
|
||||
local: *;
|
||||
};
|
3
libavformat/libavformat.v
Normal file
3
libavformat/libavformat.v
Normal file
@ -0,0 +1,3 @@
|
||||
LIBAVFORMAT_$MAJOR {
|
||||
global: *;
|
||||
};
|
4
libavutil/libavutil.v
Normal file
4
libavutil/libavutil.v
Normal file
@ -0,0 +1,4 @@
|
||||
LIBAVUTIL_$MAJOR {
|
||||
global: av_*; ff_*; avutil_*;
|
||||
local: *;
|
||||
};
|
4
libpostproc/libpostproc.v
Normal file
4
libpostproc/libpostproc.v
Normal file
@ -0,0 +1,4 @@
|
||||
LIBPOSTPROC_$MAJOR {
|
||||
global: postproc_*; pp_*;
|
||||
local: *;
|
||||
};
|
3
libswscale/libswscale.v
Normal file
3
libswscale/libswscale.v
Normal file
@ -0,0 +1,3 @@
|
||||
LIBSWSCALE_%MAJOR% {
|
||||
global: *;
|
||||
};
|
@ -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…
x
Reference in New Issue
Block a user