Author: sepotvin
Date: Fri Jan 22 14:05:48 2010
New Revision: 202807
URL: http://svn.freebsd.org/changeset/base/202807

Log:
  Introduce two new flags PO_CFLAGS and PO_CXXFLAGS to make it possible
  to have different flags when building profiled objects.
  
  MFC after:    1 month

Modified:
  head/share/mk/bsd.lib.mk
  head/share/mk/sys.mk

Modified: head/share/mk/bsd.lib.mk
==============================================================================
--- head/share/mk/bsd.lib.mk    Fri Jan 22 11:52:12 2010        (r202806)
+++ head/share/mk/bsd.lib.mk    Fri Jan 22 14:05:48 2010        (r202807)
@@ -67,7 +67,7 @@ PO_FLAG=-pg
 .endif
 
 .c.po:
-       ${CC} ${PO_FLAG} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
+       ${CC} ${PO_FLAG} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 .if defined(CTFCONVERT)
        ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
 .endif
@@ -79,7 +79,7 @@ PO_FLAG=-pg
 .endif
 
 .cc.po .C.po .cpp.po .cxx.po:
-       ${CXX} ${PO_FLAG} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
+       ${CXX} ${PO_FLAG} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 
 .cc.So .C.So .cpp.So .cxx.So:
        ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@@ -115,7 +115,7 @@ PO_FLAG=-pg
 .endif
 
 .asm.po:
-       ${CC} -x assembler-with-cpp -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
+       ${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o 
${.TARGET}
 .if defined(CTFCONVERT)
        ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
 .endif
@@ -128,7 +128,7 @@ PO_FLAG=-pg
 .endif
 
 .S.po:
-       ${CC} -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
+       ${CC} -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
 .if defined(CTFCONVERT)
        ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
 .endif

Modified: head/share/mk/sys.mk
==============================================================================
--- head/share/mk/sys.mk        Fri Jan 22 11:52:12 2010        (r202806)
+++ head/share/mk/sys.mk        Fri Jan 22 14:05:48 2010        (r202807)
@@ -44,6 +44,7 @@ CFLAGS                ?=      -O2 -pipe
 CFLAGS         +=      -fno-strict-aliasing
 .endif
 .endif
+PO_CFLAGS      ?=      ${CFLAGS}
 
 # Turn CTF conversion off by default for now. This default could be
 # changed later if DTrace becomes popular.
@@ -66,6 +67,7 @@ CFLAGS                +=      -g
 
 CXX            ?=      c++
 CXXFLAGS       ?=      
${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign}
+PO_CXXFLAGS    ?=      ${CXXFLAGS}
 
 CPP            ?=      cpp
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to