From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6608 invoked by alias); 4 Mar 2011 16:44:17 -0000 Received: (qmail 6596 invoked by uid 22791); 4 Mar 2011 16:44:16 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iw0-f169.google.com (HELO mail-iw0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Mar 2011 16:44:10 +0000 Received: by iwl42 with SMTP id 42so2790543iwl.0 for ; Fri, 04 Mar 2011 08:44:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.43.53.208 with SMTP id vr16mr889412icb.245.1299257049036; Fri, 04 Mar 2011 08:44:09 -0800 (PST) Received: by 10.42.60.129 with HTTP; Fri, 4 Mar 2011 08:44:09 -0800 (PST) In-Reply-To: References: Date: Fri, 04 Mar 2011 16:44:00 -0000 Message-ID: Subject: Re: Support for automatic linking via pragma From: "H.J. Lu" To: Olaf van der Spek Cc: binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00058.txt.bz2 On Fri, Mar 4, 2011 at 8:29 AM, Olaf van der Spek wrote: > On Mon, Feb 28, 2011 at 7:17 PM, Olaf van der Spek wrote: >> Hi, >> >> I've submitted a feature request for automatic linking via pragma: >> http://sourceware.org/bugzilla/show_bug.cgi?id=12485 >> What do others think about the idea? > > Somebody? > > Let me quote the request: > MSVC supports the following pragma, which can be used to automatically link a > library when a header file is included. This is used by for example Boost. > > It makes linking with the right lib a lot simpler. No more fiddling > with autoconf to detect the right lib name. > Not necessarily. Unlike DSO, object files don't have ABI/API information. You may not link foo.o compiled with glibc 2.5/libbar 1.3 against glibc 2.13/libbar 1.9 -- H.J.