From owner-svn-src-head@FreeBSD.ORG Sun Dec 12 20:38:45 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3339106564A; Sun, 12 Dec 2010 20:38:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 751758FC14; Sun, 12 Dec 2010 20:38:45 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:6456:15d6:3f8:ec76] (unknown [IPv6:2001:7b8:3a7:0:6456:15d6:3f8:ec76]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A5F6B5C43; Sun, 12 Dec 2010 21:38:44 +0100 (CET) Message-ID: <4D0532DC.4040506@FreeBSD.org> Date: Sun, 12 Dec 2010 21:38:52 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.14pre) Gecko/20101211 Lanikai/3.1.8pre MIME-Version: 1.0 To: Kostik Belousov References: <201012081430.oB8EUP8J006067@svn.freebsd.org> <5A7A3A47-18EF-4634-AA83-1501EF433A57@gmail.com> <4D04E7D3.3060308@FreeBSD.org> <20101212200640.GY33073@deviant.kiev.zoral.com.ua> In-Reply-To: <20101212200640.GY33073@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, ed@freebsd.org, Garrett Cooper , syrinx@freebsd.org, svn-src-head@freebsd.org, Pawel Worach , rdivacky@freebsd.org Subject: Re: svn commit: r216295 - in head/usr.sbin/bsnmpd: . tools tools/bsnmptools tools/libbsnmptools X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 12 Dec 2010 20:38:45 -0000 On 2010-12-12 21:06, Kostik Belousov wrote: >> -LDFLAGS= -export-dynamic >> +LDFLAGS= -Wl,-export-dynamic >> >> .if ${MK_OPENSSL} != "no" >> CFLAGS+= -DHAVE_LIBCRYPTO > > I believe this was already discussed ? Traditional cc driver behaviour > is to pass all unparsed flags and potential file names to the linker > as is. That may be the case, but at least for unknown flags, that behaviour itself is rather braindead, in my opinion. How would you ever be able to add support for a new flag using this model? You would never know whether the flag is 'silently' ignored and passed to the linker, or used by the driver itself. Another problem is flag shadowing. For example, the ld flag in question, '--export-dynamic', has a much easier short equivalent, '-E'. However, you cannot use that equivalent directly on gcc's command line, since it conflicts with gcc's own interpretation of that flag. (I guess this is the original reason for using the long option name instead of the short one.) The -Wl flag is specified to pass ld-specific flags to ld, so what is the harm in using it for its intended purpose? It is used in GNU's own autoconf scripts, and throughout the FreeBSD tree, even before clang's introduction. In fact, I think you could argue to replace all such ambiguous flags with unambiguous ones.