From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63980 invoked by alias); 11 Jan 2016 18:28:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 63966 invoked by uid 89); 11 Jan 2016 18:28:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=freebsd, ldl X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 11 Jan 2016 18:28:46 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id A20906365B; Mon, 11 Jan 2016 18:28:45 +0000 (UTC) Received: from localhost.localdomain (vpn1-7-61.ams2.redhat.com [10.36.7.61]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0BIShCB007121; Mon, 11 Jan 2016 13:28:44 -0500 Subject: Re: [patch] libsanitizer To: Andreas Tobler , GCC Patches References: <5642691B.1040803@fgznet.ch> From: Bernd Schmidt Message-ID: <5693F45B.7090009@redhat.com> Date: Mon, 11 Jan 2016 18:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5642691B.1040803@fgznet.ch> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00639.txt.bz2 On 11/10/2015 11:00 PM, Andreas Tobler wrote: > the attached patch removes the hard-coded requirement for the link > operation with -ldl. On FreeBSD we do not need that, it breaks compilation. > > > # Common libraries that we need to link against for all sanitizer libs. > -link_sanitizer_common='-lpthread -ldl -lm' > +link_sanitizer_common='-lpthread -lm' > > # At least for glibc, shm_open is in librt. But don't pull that > # in if it still doesn't give us the function we want. This > @@ -130,6 +130,12 @@ > # Other sanitizers do not override clock_* API > ]) > > +# Do a configure time check for -ldl > +AC_CHECK_LIB(dl, dlsym, > + [link_libasan="-ldl $link_libasan" > +link_libtsan="-ldl $link_libtsan" > +]) > + Why not add this to link_sanitizer_common, just after the similar check for shm_open? I'm not entirely sure how libsanitizer is structured, but I see references to dlsym inside the sanitizer_common directory. Bernd