From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23930 invoked by alias); 27 Nov 2012 13:33:30 -0000 Received: (qmail 23829 invoked by uid 22791); 27 Nov 2012 13:33:28 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Nov 2012 13:33:16 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 03B342E1D6; Tue, 27 Nov 2012 08:33:16 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vAEMmc3Cyp+j; Tue, 27 Nov 2012 08:33:15 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B54DE2E1CA; Tue, 27 Nov 2012 08:33:15 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 10D46C2712; Tue, 27 Nov 2012 14:33:13 +0100 (CET) Date: Tue, 27 Nov 2012 13:33:00 -0000 From: Joel Brobecker To: Pavel Chupin Cc: Kai Tietz , gdb-patches@sourceware.org, "H.J. Lu" Subject: Re: [PATCH] Fix libtool.m4 dlopen lookup for mingw Message-ID: <20121127133312.GB3581@adacore.com> References: <20121127081142.GA3581@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00725.txt.bz2 > Looks like libtool.m4 is the right place to do such sort of checks. > What do you think? I cannot really answer that question authoratively, because the file is maintained by GCC, as far as I can tell. In my opinion, and if I had to write this check today, I'd probably do it differently, yes. For instance, I would do all the dlopen tests, and if those fails, then I would test for LoadLibrary as an alternative, etc. More generally speaking, the recommended way of writing checks is to check for features, rather than setting things up based on the type of system. That being said, the current implementation kind of works, and enhancing libtool.m4 might not be sufficient. I am not sure. -- Joel