add autoPatchelfIgnoreMissingDeps to auto-patchelf.sh

This commit is contained in:
DavHau 2020-05-20 02:33:41 +00:00 committed by Frederik Rietdijk
parent 9c3a585731
commit c8c09b7dda
2 changed files with 4 additions and 1 deletions

View file

@ -2018,6 +2018,9 @@ addEnvHooks "$hostOffset" myBashFunction
<para>
In certain situations you may want to run the main command (<command>autoPatchelf</command>) of the setup hook on a file or a set of directories instead of unconditionally patching all outputs. This can be done by setting the <varname>dontAutoPatchelf</varname> environment variable to a non-empty value.
</para>
<para>
By default <command>autoPatchelf</command> will fail as soon as any ELF file requires a dependency which cannot be resolved via the given build inputs. In some situations you might prefer to just leave missing dependencies unpatched and continue to patch the rest. This can be achieved by setting the <envar>autoPatchelfIgnoreMissingDeps</envar> environment variable to a non-empty value.
</para>
<para>
The <command>autoPatchelf</command> command also recognizes a <parameter class="command">--no-recurse</parameter> command line flag, which prevents it from recursing into subdirectories.
</para>

View file

@ -141,7 +141,7 @@ autoPatchelfFile() {
# This makes sure the builder fails if we didn't find a dependency, because
# the stdenv setup script is run with set -e. The actual error is emitted
# earlier in the previous loop.
[ $depNotFound -eq 0 ]
[ $depNotFound -eq 0 -o -n "$autoPatchelfIgnoreMissingDeps" ]
if [ -n "$rpath" ]; then
echo "setting RPATH to: $rpath" >&2