From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9771 invoked by alias); 4 Mar 2011 16:30:06 -0000 Received: (qmail 9747 invoked by uid 22791); 4 Mar 2011 16:30:04 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-bw0-f41.google.com (HELO mail-bw0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Mar 2011 16:29:56 +0000 Received: by bwz17 with SMTP id 17so2541486bwz.0 for ; Fri, 04 Mar 2011 08:29:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.85.8 with SMTP id m8mr751049bkl.139.1299256192860; Fri, 04 Mar 2011 08:29:52 -0800 (PST) Received: by 10.204.7.3 with HTTP; Fri, 4 Mar 2011 08:29:52 -0800 (PST) In-Reply-To: References: Date: Fri, 04 Mar 2011 16:30:00 -0000 Message-ID: Subject: Re: Support for automatic linking via pragma From: Olaf van der Spek To: binutils@sourceware.org Content-Type: text/plain; charset=UTF-8 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/msg00056.txt.bz2 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. #pragma comment(lib, "requiredLibrary.lib") Unfortunately, gold doesn't support this. Could you add it? I assume this needs coordination with gcc. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39437 -- Olaf