On Sun, 3 Nov 2013, Vittorio Giovara wrote:
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.
---
Removed strip functionality when no flags are available.
Vittorio
configure | 20 ++++++++++++++++++++
library.mak | 2 +-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 4aa66c0..f78fd54 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,16 @@ check_ldflags(){
test_ldflags "$@" && add_ldflags "$@"
}
+test_stripflags(){
+ log test_stripflags "$@"
+ check_cmd $strip $STRIPFLAGS "$@" $TMPO
+}
Hmm, I guess this assumes that $TMPO exists and is a valid object file?
Just checking - can we rely on that? What if the last compile test prior
to this test failed?
+
+check_stripflags(){
+ log check_stripflags "$@"
+ test_stripflags "$@" && add_stripflags "$@"
+}
+
check_header(){
log check_header "$@"
header=$1
@@ -3931,6 +3945,11 @@ 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
+# however when both are unavailable do not strip at all
+check_stripflags -wN '..@*' || check_stripflags -x || strip='true'
Should we do some compile test that is guaranteed to succeed here before
these tests perhaps?
Otherwise I think the patch probably should be good to go.
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel