diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2017-11-13 23:43:51 +0100 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2017-11-16 17:39:39 +0100 |
commit | 4fb20d4e3a48b2008a13fc11ba75015ded2c2fc2 (patch) | |
tree | 4b004b15637a7ac55a8d83becd35792030b023ac /configure | |
parent | edef07569ccc4e10151c676bfd440412c8592f31 (diff) | |
download | ffmpeg-4fb20d4e3a48b2008a13fc11ba75015ded2c2fc2.tar.gz |
configure: call flatten_extralibs in a subshell
By putting the call in a subshell, the problem of it spilling
cleanup-decision from a previous library to other libraries is avoided.
For example, it could have already cleaned up cuda_extralibs in a
previous library that depended on cuda. Then when it gets to avutil, it
will never pick up the dependency of avutil to cuda, which depends on
libdl, which in turn results in a missing -ldl extralib, resulting in
link failures in certain configurations.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -6495,6 +6495,15 @@ flatten_extralibs(){ fi } +flatten_extralibs_wrapper(){ + list_name=$1 + flatten_extralibs $list_name + unique $list_name + resolve $list_name + eval $list_name=\$\(\$ldflags_filter \$$list_name\) + eval printf \''%s'\' \""\$$list_name"\" +} + for linkunit in $LIBRARY_LIST; do unset current_extralibs eval components=\$$(toupper ${linkunit})_COMPONENTS_LIST @@ -6507,10 +6516,7 @@ for linkunit in $LIBRARY_LIST; do done for linkunit in $LIBRARY_LIST $PROGRAM_LIST $EXTRALIBS_LIST; do - flatten_extralibs ${linkunit}_extralibs - unique ${linkunit}_extralibs - resolve ${linkunit}_extralibs - eval ${linkunit}_extralibs=\$\(\$ldflags_filter \$${linkunit}_extralibs\) + eval ${linkunit}_extralibs=\$\(flatten_extralibs_wrapper ${linkunit}_extralibs\) done map 'enabled $v && intrinsics=${v#intrinsics_}' $INTRINSICS_LIST |