From owner-svn-src-head@FreeBSD.ORG Wed Oct 22 18:11:11 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03AB7FF3; Wed, 22 Oct 2014 18:11:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4A74D9C; Wed, 22 Oct 2014 18:11:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9MIBAUE089986; Wed, 22 Oct 2014 18:11:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9MIBAlb089985; Wed, 22 Oct 2014 18:11:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410221811.s9MIBAlb089985@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 22 Oct 2014 18:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273478 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2014 18:11:11 -0000 Author: ngie Date: Wed Oct 22 18:11:10 2014 New Revision: 273478 URL: https://svnweb.freebsd.org/changeset/base/273478 Log: Fix linking static test binaries with atf.test.mk Check for -static in LDFLAGS or LDFLAGS., then pass in the appropriate dependency (LIBATF or LDATF) This unbreaks the build with some of the NetBSD tests that need to be compiled statically Reviewed by: imp, jmmv Phabric: D991 Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/atf.test.mk Modified: head/share/mk/atf.test.mk ============================================================================== --- head/share/mk/atf.test.mk Wed Oct 22 17:09:12 2014 (r273477) +++ head/share/mk/atf.test.mk Wed Oct 22 18:11:10 2014 (r273478) @@ -71,7 +71,11 @@ BINDIR.${_T}= ${TESTSDIR} MAN.${_T}?= # empty SRCS.${_T}?= ${_T}.c DPADD.${_T}+= ${LIBATF_C} +.if empty(LDFLAGS:M-static) && empty(LDFLAGS.${_T}:M-static) LDADD.${_T}+= ${LDATF_C} +.else +LDADD.${_T}+= ${LIBATF_C} +.endif USEPRIVATELIB+= atf-c TEST_INTERFACE.${_T}= atf .endfor @@ -85,7 +89,11 @@ BINDIR.${_T}= ${TESTSDIR} MAN.${_T}?= # empty SRCS.${_T}?= ${_T}${CXX_SUFFIX:U.cc} DPADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C} +.if empty(LDFLAGS:M-static) && empty(LDFLAGS.${_T}:M-static) LDADD.${_T}+= ${LDATF_CXX} ${LDATF_C} +.else +LDADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C} +.endif USEPRIVATELIB+= atf-c++ TEST_INTERFACE.${_T}= atf .endfor