From owner-p4-projects@FreeBSD.ORG Wed Oct 30 19:39:33 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D939176; Wed, 30 Oct 2013 19:39:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9749974 for ; Wed, 30 Oct 2013 19:39:32 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [8.8.178.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 68A162DCC for ; Wed, 30 Oct 2013 19:39:32 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.7/8.14.7) with ESMTP id r9UJdWSX036296 for ; Wed, 30 Oct 2013 19:39:32 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.7/8.14.6/Submit) id r9UJdWtU036293 for perforce@freebsd.org; Wed, 30 Oct 2013 19:39:32 GMT (envelope-from brooks@freebsd.org) Date: Wed, 30 Oct 2013 19:39:32 GMT Message-Id: <201310301939.r9UJdWtU036293@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis Subject: PERFORCE change 1187664 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Oct 2013 19:39:33 -0000 http://p4web.freebsd.org/@@1187664?ac=10 Change 1187664 by brooks@brooks_zenith on 2013/10/30 19:38:49 Look forward to the bright day when SOAAP is something you install as a FreeBSD package and change to using SOAAP_INCLUDE_DIR and SOAAP_LIB_DIR instead of SOAAP_SOURCE_DIR/include and SOAAP_BUILD_DIR. Support but warn about the old values. Produce a helpful-ish error instead of a messy clang error when SOAAP_INCLUDE_DIR or SOAAP_LIB_DIR aren't set and can't be set via the deprecated variables. Affected files ... .. //depot/projects/ctsrd/tesla/src/share/mk/bsd.own.mk#15 edit .. //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#18 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/share/mk/bsd.own.mk#15 (text+ko) ==== @@ -647,7 +647,23 @@ .endif .if ${MK_SOAAP} != "no" -CFLAGS+= -DSOAAP -I${SOAAP_SOURCE_DIR}/include +.if !defined(SOAAP_INCLUDE_DIR) +.if !defined(SOAAP_SOURCE_DIR) +.error Must set one of SOAAP_INCLUDE_DIR or SOAAP_SOURCE_DIR with WITH_SOAAP +.else +.warning SOAAP_SOURCE_DIR is deprecated, use SOAAP_INCLUDE_DIR +SOAAP_INCLUDE_DIR=${SOAAP_SOURCE_DIR}/include +.endif +.endif +.if !defined(SOAAP_LIB_DIR) +.if !defined(SOAAP_BUILD_DIR) +.error Must set one of SOAAP_LIB_DIR or SOAAP_BUILD_DIR with WITH_SOAAP +.else +.warning SOAAP_BUILD_DIR is deprecated, use SOAAP_LIB_DIR +SOAAP_LIB_DIR=${SOAAP_BUILD_DIR} +.endif +.endif +CFLAGS+= -DSOAAP -I${SOAAP_INCLUDE_DIR} .if defined(WITHOUT_LLVM_INSTRUMENTED) .error WITHOUT_LLVM_INSTRUMENTED and WITH_SOAAP can't both be set. .else ==== //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#18 (text+ko) ==== @@ -298,22 +298,22 @@ .endif .${LLVM_IR_TYPE}-a.soaap: - ${OPT} -load ${SOAAP_BUILD_DIR}/libsoaap.so -soaap ${SOAAP_FLAGS} \ + ${OPT} -load ${SOAAP_LIB_DIR}/libsoaap.so -soaap ${SOAAP_FLAGS} \ -o /dev/null ${.IMPSRC} .${LLVM_IR_TYPE}-a.bc_cep: - ${OPT} -load ${SOAAP_BUILD_DIR}/libcep.so -insert-call-edge-profiling \ + ${OPT} -load ${SOAAP_LIB_DIR}/libcep.so -insert-call-edge-profiling \ -o ${.TARGET} ${.IMPSRC} .bc_cep.po_cep: ${LLC} -filetype=obj ${LLCFLAGS} -o ${.TARGET} ${.IMPSRC} .po_cep.soaap_cg: - ${CC} ${.IMPSRC} -L${SOAAP_BUILD_DIR} -L${LLVM_BUILD_DIR}/lib \ + ${CC} ${.IMPSRC} -L${SOAAP_LIB_DIR} -L${LLVM_BUILD_DIR}/lib \ -lcep_rt -lprofile_rt ${LDADD} -o ${.TARGET} .${LLVM_IR_TYPE}-a.bc_soaap_perf: - ${OPT} -load ${SOAAP_BUILD_DIR}/libsoaap.so -soaap \ + ${OPT} -load ${SOAAP_LIB_DIR}/libsoaap.so -soaap \ -soaap-emulate-performance ${SOAAP_FLAGS} -o ${.TARGET} ${.IMPSRC} .bc_soaap_perf.po_soaap_perf: