From owner-freebsd-ports@FreeBSD.ORG Wed Sep 1 04:32:02 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 218EF10656BA; Wed, 1 Sep 2010 04:32:02 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 817098FC1A; Wed, 1 Sep 2010 04:32:01 +0000 (UTC) Received: by fxm4 with SMTP id 4so5226722fxm.13 for ; Tue, 31 Aug 2010 21:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=iR8C8WAS6ioWsg97vi6mbfWE17aBzLZc14UesfdJJHo=; b=mBxcUfl/jg+7MrwKaScwDrmd3am4AN94nI+dn2k/w1xYFa376kPsve0CGubkoT7+Xq yd/TsWxxMiPRSE0QevcW3+O9FqiTA0bmegyhtu296yNGi/28tj7a65Kn00aJGI6GfG4R dKVtCxkhtqO6ABTOKyhTBjqpPTOjbpPi/X4qQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=A0TNGr7UdirXd7yMB4RsTpIM8c9Cl0Bg9ExRgNbbRcWWqD8P37CfaP18npL1XjHYTK rGCMWzMFfGAENrGQAHLUK9bf32gIm5acy4Z8I+2xNvLM0fVVAhxx6ckNT3eYcAp8LO8x 8WPmqcRa8fajw9/Q+zB5dGsuqRx2ifVvgTLVQ= MIME-Version: 1.0 Received: by 10.239.155.69 with SMTP id h5mr492115hbc.61.1283314208869; Tue, 31 Aug 2010 21:10:08 -0700 (PDT) Received: by 10.239.155.129 with HTTP; Tue, 31 Aug 2010 21:10:08 -0700 (PDT) In-Reply-To: References: <4C7D76A6.7080401@DataIX.net> Date: Tue, 31 Aug 2010 23:10:08 -0500 Message-ID: From: Scot Hetzel To: bf1783@gmail.com, maho@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-ports@freebsd.org Subject: Re: math/blas linking to gfortran with LDADD?= -lgfortran X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 04:32:02 -0000 On Tue, Aug 31, 2010 at 10:06 PM, b. f. wrote: > On 8/31/10, jhell wrote: >> Looking closer at the math/blas & math/lapack ports: >> >> This statement does not make any sense. The logic is backwards for every >> instance. And WITH_PROFILE would do. >> .if !(defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFI= LE)) >> PLIST_FILES+=3D =A0 lib/libblas_p.a >> .endif >> >> Which is basically saying: >> Add that profile lib if NOPROFILE is not defined "_p is a profiled lib >> why would you want to install this if the admin has NOT defined NOPROFIL= E? >> > > Er, I'm not sure what you're getting at here. No means no. =A0Really. > The default, as I explained, is to build and install the profiling > libraries, unless one or more of three disabling variables has been > defined. And that's the default because users of these ports often use > the profiled libraries when analyzing performance of their programs, > which are usually computationally-intensive. =A0Why the three variables? > =A0Because they control whether the profiling libraries are actually > built via bsd.compat.mk and bsd.lib.mk. > Actually there are only 2 *_PROFILE variables (WITH_PROFILE and WITHOUT_PROFILE) that are user visible for the FreeBSD sources. The NOPROFILE variable is depreceiated, and the NO_PROFILE variable is only supposed to be used in Makefiles according to bsd.own.mk: # Define MK_* variables (which are either "yes" or "no") for users # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the # make(1) environment. # These should be tested with `=3D=3D "no"' or `!=3D "no"' in makefiles. # The NO_* variables should only be set by makefiles. So according to bsd.own.mk, this is the correct test for the math/blas port to determine if profiling libraries should be built: .if !defined(WITHOUT_PROFILE) PLIST_FILES+=3D lib/libblas_p.a .endif I also tested how these variables responded: vbox# cd /usr/src/lib/libcam vbox# make -V WITH_PROFILE -V MK_PROFILE -V NO_PROFILE -V WITHOUT_PROFILE yes vbox# make -V WITH_PROFILE -V MK_PROFILE -V NO_PROFILE -V WITHOUT_PROFILE WITH_PROFILE=3Dyes yes yes vbox# make -V WITH_PROFILE -V MK_PROFILE -V NO_PROFILE -V WITHOUT_PROFILE NO_PROFILE=3Dyes no yes vbox# make -V WITH_PROFILE -V MK_PROFILE -V NO_PROFILE -V WITHOUT_PROFILE WITHOUT_PROFILE=3Dyes no yes vbox# make -V WITH_PROFILE -V MK_PROFILE -V NO_PROFILE -V WITHOUT_PROFILE NOPROFILE=3Dyes "/usr/share/mk/bsd.compat.mk", line 35: warning: NOPROFILE is deprecated in favour of NO_PROFILE no yes As can be seen, NOPROFILE is deprecated. NOTE: WITHOUT_PROFILE would need to be set in /etc/make.conf (instead of /etc/src.conf) to disable building profiled libraries in the FreeBSD sources and the math/blas port. Scot