From fb1836fd7b1b8839815595db08ae740ec7b86347 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Wed, 19 Sep 2012 14:23:54 -0500 Subject: Support code coverage in extended modules. - Reduce optimization (to -Os) to fit when doing coverage profile. - Remove errl storage area from base image. - Add GCC function attributes to sys library functions. RTC: 36933 Change-Id: Ic83011a2444ef5b735db0446a14a0af34187eebf Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1908 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton Reviewed-by: ADAM R. MUHLE Reviewed-by: Daniel M. Crowell Reviewed-by: Melissa J. Connell Reviewed-by: Paul Nguyen Reviewed-by: A. Patrick Williams III --- config.mk | 57 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 23 deletions(-) (limited to 'config.mk') diff --git a/config.mk b/config.mk index c34a8e89b..19194cc25 100644 --- a/config.mk +++ b/config.mk @@ -1,24 +1,24 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: config.mk $ -# -# IBM CONFIDENTIAL -# -# COPYRIGHT International Business Machines Corp. 2010,2012 -# -# p1 -# -# Object Code Only (OCO) source materials -# Licensed Internal Code Source Materials -# IBM HostBoot Licensed Internal Code -# -# The source code for this program is not published or otherwise -# divested of its trade secrets, irrespective of what has been -# deposited with the U.S. Copyright Office. -# -# Origin: 30 -# +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: config.mk $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2010,2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or otherwise +# divested of its trade secrets, irrespective of what has been +# deposited with the U.S. Copyright Office. +# +# Origin: 30 +# # IBM_PROLOG_END_TAG all: ${MAKE} gen_pass @@ -39,9 +39,11 @@ ifdef STRICT EXTRACOMMONFLAGS += -Weffc++ endif CUSTOMFLAGS += -D__HOSTBOOT_MODULE=${MODULE} +ifndef TESTS ifdef HOSTBOOT_PROFILE vpath %.C ${ROOTPATH}/src/sys/prof -OBJS += gcov.o +OBJS := gcov.o ${OBJS} +endif endif LIBS += $(addsuffix .so, $(addprefix lib, ${MODULE})) MODULE_INIT = ${ROOTPATH}/obj/core/module_init.o @@ -77,9 +79,13 @@ endif endif endif +ifndef TESTS ifdef HOSTBOOT_PROFILE +ifndef HOSTBOOT_PROFILE_NO_INSTRUMENT CUSTOMFLAGS += --coverage endif +endif +endif TRACEPP = ${ROOTPATH}/src/build/trace/tracepp CUSTOM_LINKER_EXE = ${ROOTPATH}/src/build/linker/linker @@ -109,7 +115,12 @@ BEAMFLAGS = \ --beam::exit0 \ -o /dev/null -COMMONFLAGS = -O3 -nostdlib ${EXTRACOMMONFLAGS} +ifdef HOSTBOOT_PROFILE +COMMONFLAGS = -Os +else +COMMONFLAGS = -O3 +endif +COMMONFLAGS += -nostdlib ${EXTRACOMMONFLAGS} CFLAGS = ${COMMONFLAGS} -mcpu=power7 -nostdinc -g -mno-vsx -mno-altivec\ -Wall -Werror -mtraceback=no ${CUSTOMFLAGS} ASMFLAGS = ${COMMONFLAGS} -mcpu=power7 -- cgit v1.2.1