]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Use name in GCC_CLASSIC as C compiler for coverage testing, if set.
authorMark Adler <madler@alumni.caltech.edu>
Sat, 4 Feb 2012 06:56:16 +0000 (22:56 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Sat, 4 Feb 2012 18:00:48 +0000 (10:00 -0800)
Apple removed support for gcov in the default gcc compiler chain,
when they moved to llvm.  This can be circumvented in XCode 4.2 by
using the gcc chain with gcc-4.2.  This patch allows setting
GCC_CLASSIC to the name of a real gcc executable (e.g. "gcc-4.2")
to allow coverage testing.

configure

index 780317ce400a898b47916e679112688501258ac6..060acb72404a7b07b80f1c4c587087c545ee2246 100755 (executable)
--- a/configure
+++ b/configure
@@ -416,6 +416,9 @@ fi
 
 if test $cover -eq 1; then
   CFLAGS="${CFLAGS} -fprofile-arcs -ftest-coverage"
+  if test -n "$GCC_CLASSIC"; then
+    CC=$GCC_CLASSIC
+  fi
 fi
 
 echo >> configure.log