aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2013-11-25 08:46:14 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2013-11-28 15:37:10 +0100
commit0673ede985a6560e7efb86dab1c58fb7f95ce587 (patch)
treed3e07b6cadf1621cc52f3679406c0d21fb9cb7f8 /configure
parent873379939299046b30cdec26a837171029ef8099 (diff)
downloadffmpeg-0673ede985a6560e7efb86dab1c58fb7f95ce587.tar.gz
configure: add strip flags checks
This will check if -wN '..@*' is available and fall back on -x if not; when none are available, do not run strip at all to prevent removing functions that might be actually needed.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure b/configure
index 6dcfd1b7fa..6135e8a779 100755
--- a/configure
+++ b/configure
@@ -659,6 +659,10 @@ add_ldflags(){
append LDFLAGS $($ldflags_filter "$@")
}
+add_stripflags(){
+ append STRIPFLAGS "$@"
+}
+
add_extralibs(){
prepend extralibs $($ldflags_filter "$@")
}
@@ -804,6 +808,20 @@ check_ldflags(){
test_ldflags "$@" && add_ldflags "$@"
}
+test_stripflags(){
+ log test_stripflags "$@"
+ # call check_cc to get a fresh TMPO
+ check_cc <<EOF
+int main(void) { return 0; }
+EOF
+ check_cmd $strip $STRIPFLAGS "$@" $TMPO
+}
+
+check_stripflags(){
+ log check_stripflags "$@"
+ test_stripflags "$@" && add_stripflags "$@"
+}
+
check_header(){
log check_header "$@"
header=$1
@@ -3969,6 +3987,10 @@ check_ldflags -Wl,--warn-common
check_ldflags -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
+# add some strip flags
+# -wN '..@*' is more selective than -x, but not available everywhere.
+check_stripflags -wN \'..@*\' || check_stripflags -x || strip='true'
+
enabled xmm_clobber_test &&
check_ldflags -Wl,--wrap,avcodec_open2 \
-Wl,--wrap,avcodec_decode_audio4 \
@@ -4245,6 +4267,7 @@ LD_PATH=$LD_PATH
DLLTOOL=$dlltool
LDFLAGS=$LDFLAGS
SHFLAGS=$(echo $($ldflags_filter $SHFLAGS))
+STRIPFLAGS=$STRIPFLAGS
YASMFLAGS=$YASMFLAGS
BUILDSUF=$build_suffix
FULLNAME=$FULLNAME