From owner-svn-src-all@FreeBSD.ORG Sun Mar 24 18:48:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AEF05C41; Sun, 24 Mar 2013 18:48:02 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx1.freebsd.org (Postfix) with ESMTP id 7BD57E89; Sun, 24 Mar 2013 18:48:02 +0000 (UTC) Received: by mail-pd0-f181.google.com with SMTP id q10so2204410pdj.40 for ; Sun, 24 Mar 2013 11:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=017UlZHTF4ncXz8OGbpHl9WkSL2+sWuYuXTT8icuNY0=; b=gLUNzRE3h6ru4EeGTtZTBiVr1n3wdLRmthHB23ZHPdZlfmb6eB/enQV6o9PbYVWCw/ za/ObFOH/qs0x3DO+aEq753eYjr2EwaRi5OF+TrRaAyQchi1QumHFY2lozXqF1xU5zdQ Hh/19UxYGqs8SKoo8k1vGb534ebHZdI3fNs3gTcuvacYEjvzLb7sitfpNWcB/bV5myKo dHs4uTQWi547zoBU0K6QDIbCyAtxsC17KZzfRXQiLJGGh2S5ZD9MOhBSbYSES8J5jMjM gi5J9/se3hW05P7tTYv9cie7R47cnyQsrgeUzwfDrvNDqRk7XZESGx0OswoPuHI+gZ+G vT+Q== X-Received: by 10.66.164.6 with SMTP id ym6mr3973215pab.92.1364150876165; Sun, 24 Mar 2013 11:47:56 -0700 (PDT) Received: from localhost (c-67-160-248-74.hsd1.ca.comcast.net. [67.160.248.74]) by mx.google.com with ESMTPS id rl3sm10385986pbb.28.2013.03.24.11.47.54 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Mar 2013 11:47:55 -0700 (PDT) Sender: Gleb Kurtsou Date: Sun, 24 Mar 2013 11:47:57 -0700 From: Gleb Kurtsou To: Mark Johnston Subject: Re: svn commit: r244915 - head/share/mk Message-ID: <20130324184756.GA3874@reks> References: <201212312154.qBVLsh4v014794@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201212312154.qBVLsh4v014794@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2013 18:48:02 -0000 On (31/12/2012 21:54), Mark Johnston wrote: > Author: markj > Date: Mon Dec 31 21:54:43 2012 > New Revision: 244915 > URL: http://svnweb.freebsd.org/changeset/base/244915 > > Log: > Explicitly specify that the beforelinking target depends on the > generated object files, ensuring that the beforelinking recipe won't be > executed until compilation has finished. > > Also define SHLIB_NAME_FULL to denote ${SHLIB_NAME}.debug if > DEBUG_FILES is set and ${SHLIB_NAME} otherwise, which helps avoid > obfuscating the compilation and linking rules. Shouldn't ${SHLIB_NAME}.debug and ${SHLIB_NAME}.symbols be added to CLEANFILES? Thanks, Gleb. > > Reviewed by: emaste > Approved by: emaste (co-mentor) > > Modified: > head/share/mk/bsd.lib.mk > head/share/mk/bsd.prog.mk > > Modified: head/share/mk/bsd.lib.mk > ============================================================================== > --- head/share/mk/bsd.lib.mk Mon Dec 31 21:19:44 2012 (r244914) > +++ head/share/mk/bsd.lib.mk Mon Dec 31 21:54:43 2012 (r244915) > @@ -165,19 +165,22 @@ SOBJS+= ${OBJS:.o=.So} > .if defined(SHLIB_NAME) > _LIBS+= ${SHLIB_NAME} > > +.if defined(DEBUG_FLAGS) > +SHLIB_NAME_FULL=${SHLIB_NAME}.debug > +.else > +SHLIB_NAME_FULL=${SHLIB_NAME} > +.endif > + > SOLINKOPTS= -shared -Wl,-x > .if !defined(ALLOW_SHARED_TEXTREL) > SOLINKOPTS+= -Wl,--fatal-warnings -Wl,--warn-shared-textrel > .endif > > .if target(beforelinking) > -${SHLIB_NAME}: beforelinking > -.endif > -.if defined(DEBUG_FLAGS) > -${SHLIB_NAME}.debug: ${SOBJS} > -.else > -${SHLIB_NAME}: ${SOBJS} > +beforelinking: ${SOBJS} > +${SHLIB_NAME_FULL}: beforelinking > .endif > +${SHLIB_NAME_FULL}: ${SOBJS} > @${ECHO} building shared library ${SHLIB_NAME} > @rm -f ${SHLIB_NAME} ${SHLIB_LINK} > .if defined(SHLIB_LINK) > @@ -197,12 +200,12 @@ ${SHLIB_NAME}: ${SOBJS} > .endif > > .if defined(DEBUG_FLAGS) > -${SHLIB_NAME}: ${SHLIB_NAME}.debug ${SHLIB_NAME}.symbols > +${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.symbols > ${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.symbols \ > - ${SHLIB_NAME}.debug ${.TARGET} > + ${SHLIB_NAME_FULL} ${.TARGET} > > -${SHLIB_NAME}.symbols: ${SHLIB_NAME}.debug > - ${OBJCOPY} --only-keep-debug ${SHLIB_NAME}.debug ${.TARGET} > +${SHLIB_NAME}.symbols: ${SHLIB_NAME_FULL} > + ${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET} > .endif > .endif > > > Modified: head/share/mk/bsd.prog.mk > ============================================================================== > --- head/share/mk/bsd.prog.mk Mon Dec 31 21:19:44 2012 (r244914) > +++ head/share/mk/bsd.prog.mk Mon Dec 31 21:54:43 2012 (r244915) > @@ -46,6 +46,7 @@ PROG= ${PROG_CXX} > OBJS+= ${SRCS:N*.h:R:S/$/.o/g} > > .if target(beforelinking) > +beforelinking: ${OBJS} > ${PROG}: beforelinking > .endif > ${PROG}: ${OBJS} > @@ -75,6 +76,7 @@ SRCS= ${PROG}.c > OBJS= ${PROG}.o > > .if target(beforelinking) > +beforelinking: ${OBJS} > ${PROG}: beforelinking > .endif > ${PROG}: ${OBJS}