[4.0] 5c5634d Only override CFLAGS on RHEL6.

Lasse Karstensen lkarsten at varnish-software.com
Thu Oct 16 16:00:12 CEST 2014


commit 5c5634dbd9211c4b784268166709a22177d643de
Author: Lasse Karstensen <lkarsten at varnish-software.com>
Date:   Thu Oct 16 15:57:36 2014 +0200

    Only override CFLAGS on RHEL6.
    
    And also don't disable the default compiler optimization.

diff --git a/redhat/varnish.spec b/redhat/varnish.spec
index 33f418d..6c0e104 100644
--- a/redhat/varnish.spec
+++ b/redhat/varnish.spec
@@ -102,7 +102,9 @@ Documentation files for %name
 	export PCRE_LIBS="`pcre-config --libs`"
 %endif
 
-export CFLAGS="$CFLAGS -Wp,-D_FORTIFY_SOURCE=0"
+%if 0%{?rhel} == 6
+export CFLAGS="$CFLAGS -O2 -g -Wp,-D_FORTIFY_SOURCE=0"
+%endif
 
 # Remove "--disable static" if you want to build static libraries
 # jemalloc is not compatible with Red Hat's ppc64 RHEL kernel :-(



More information about the varnish-commit mailing list