forked from mirrors/nixpkgs
enable-coverage-instrumentation.sh: Fix unbound variable error
https://hydra.nixos.org/build/113299582
This commit is contained in:
parent
74c82056c9
commit
4c0821461e
|
@ -2,18 +2,7 @@ postPhases+=" cleanupBuildDir"
|
||||||
|
|
||||||
# Force GCC to build with coverage instrumentation. Also disable
|
# Force GCC to build with coverage instrumentation. Also disable
|
||||||
# optimisation, since it may confuse things.
|
# optimisation, since it may confuse things.
|
||||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -O0 --coverage"
|
export NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE:-} -O0 --coverage"
|
||||||
|
|
||||||
# FIXME: Handle the case where postUnpack is already set.
|
|
||||||
postUnpack() {
|
|
||||||
# This is an uberhack to prevent libtool from remoaving gcno
|
|
||||||
# files. This has been fixed in libtool, but there are packages
|
|
||||||
# out there with old ltmain.sh scripts. See
|
|
||||||
# http://www.mail-archive.com/libtool@gnu.org/msg10725.html
|
|
||||||
for i in $(find -name ltmain.sh); do
|
|
||||||
substituteInPlace $i --replace '*.$objext)' '*.$objext | *.gcno)'
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get rid of everything that isn't a gcno file or a C source file.
|
# Get rid of everything that isn't a gcno file or a C source file.
|
||||||
# Also strip the `.tmp_' prefix from gcno files. (The Linux kernel
|
# Also strip the `.tmp_' prefix from gcno files. (The Linux kernel
|
||||||
|
|
Loading…
Reference in a new issue