diff options
author | sepotvin <sepotvin@FreeBSD.org> | 2010-01-22 14:05:48 +0000 |
---|---|---|
committer | sepotvin <sepotvin@FreeBSD.org> | 2010-01-22 14:05:48 +0000 |
commit | 409b16e99aff586b761fd71b9a56678a93f83b23 (patch) | |
tree | 355c796f5eab512c86d7b4e08cef904df077284e /share | |
parent | 2b2ffe1ba2a9e7289b5eb83f309741d7d8d76056 (diff) | |
download | FreeBSD-src-409b16e99aff586b761fd71b9a56678a93f83b23.zip FreeBSD-src-409b16e99aff586b761fd71b9a56678a93f83b23.tar.gz |
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
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/bsd.lib.mk | 8 | ||||
-rw-r--r-- | share/mk/sys.mk | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 982ff50..470d9d4 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -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 diff --git a/share/mk/sys.mk b/share/mk/sys.mk index c469a03..e0527e4 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -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 |