aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2016-09-09 18:12:34 -0500
committerRodger Combs <rodger.combs@gmail.com>2016-10-04 01:11:04 -0500
commit63fbeebf6ecb40b21db84d42f9f18867b3f89dca (patch)
tree47a12a887dd53bbdb7ff1751513234726fe062c8 /configure
parentbe1d32492e58cbba6d69d3ce67545536b15e051d (diff)
downloadffmpeg-63fbeebf6ecb40b21db84d42f9f18867b3f89dca.tar.gz
configure: add linker export script support on Darwin
This isn't a "version script" in the usual sense, since it doesn't set symbol versions directly. Instead, the version for the whole .dylib is set in the linker flags, and we generate a list of symbol patterns to export. This allows us to keep our local symbols (e.g. ff_*) local on the platform. The Darwin linker's exported_symbols_list format is a bit different than the one used by the GNU linker. It doesn't handle local symbols at all, since when a list is provided, all unlisted symbols are local by default; thus, we remove local sections. It doesn't handle per-version sections, so we remove the headers and brackets. It expects symbols to be prefixed with an underscore. It errors if a listed symbol with no wildcards is not present in the output, so we append an asterisk to any symbol that doesn't already end in one.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure b/configure
index 2b141fbf92..ee7e8520ab 100755
--- a/configure
+++ b/configure
@@ -4705,6 +4705,8 @@ case $target_os in
{ check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
check_header dispatch/dispatch.h &&
add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore'
+ version_script='-exported_symbols_list'
+ VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n /global:/,/local:/p | grep ";" | tr ";" "\n" | sed -E "s/(.+)/_\1/g" | sed -E "s/(.+[^*])$$$$/\1*/"'
;;
msys*)
die "Native MSYS builds are discouraged, please use the MINGW environment."