From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by sourceware.org (Postfix) with ESMTPS id 195933844044; Tue, 28 Jul 2020 10:46:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 195933844044 Received: by mail-io1-xd42.google.com with SMTP id k23so20183973iom.10; Tue, 28 Jul 2020 03:46:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0FtltSMba1lL8y6XO4U5kOYEBqBuDQbgdaYvpWkVz/o=; b=hxx/p6ILva+w2KRg36fo47HuZOC0FGDWPrHQ2xezuexNf9aSC+VkpI6xNWbQQkZOj1 XxVQw7FV67OouEi07nDadJ9dmO4xCafdCiY8/U98muXcP4QRtqTPboglwr4S47XM9HAr UqohxAtPGmvwGjVV/vPYHWl3a6zIYwpCjDeBS7rGtA/5Nf54Vw4w0jHfQUA9ZoneZdTO bB4nH/evKIxJaKGxYuyHeeuHKXuP2BeVU80TvFj7aNvfqNDG1W/8xZnOoSj7Ky6zrYEP wnh0gI1YrWlmvjpuKt87BCqipmSa29fuQvpNTFD6e9NMAfNTZ2oakl+RlK6N5/vZRUAj snvQ== X-Gm-Message-State: AOAM5339RJQX//ok7lQFOD6Yz+e51rgd64VTum3vkk8wk7GlpT9zJN48 E2W9Xowv9mI2AG73ApZj9l1a8KmVCvVhjHrgzVc= X-Google-Smtp-Source: ABdhPJxIn65LBMO+jXMLKIV8Ex16SsJaTKua5yYuFf4rsxpZySRnc3JSqyyqdnU5wV88JYXqvAPO2XvGwb8Tn4VKd+E= X-Received: by 2002:a02:7419:: with SMTP id o25mr31637670jac.4.1595933190615; Tue, 28 Jul 2020 03:46:30 -0700 (PDT) MIME-Version: 1.0 References: <20200502022903.175852-1-amerey@redhat.com> <3d9da16939fa6b503188033b56d30531e03d5d2a.camel@redhat.com> <87a72ino27.fsf@tromey.com> <64517fee-8b8f-84b2-a116-c3d146ff1119@simark.ca> <87eep4hp3s.fsf@tromey.com> In-Reply-To: From: "H.J. Lu" Date: Tue, 28 Jul 2020 03:45:54 -0700 Message-ID: Subject: Re: V2 [PATCH] PKG_CHECK_MODULES: Check if $pkg_cv_[]$1[]_LIBS works To: Aaron Merey Cc: Tom Tromey , Simon Marchi , GCC Patches , Aaron Merey via Binutils , GDB Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2020 10:46:32 -0000 On Mon, Jul 27, 2020 at 12:32 PM H.J. Lu wrote: > > On Mon, Jul 27, 2020 at 12:14 PM H.J. Lu wrote: > > > > On Mon, Jul 27, 2020 at 9:11 AM Aaron Merey wrote: > > > > > > On Mon, Jul 27, 2020 at 11:32 AM H.J. Lu wrote: > > > > > > > > On Sat, Jul 25, 2020 at 9:01 AM H.J. Lu wrote: > > > > > This caused: > > > > > > > > > > https://sourceware.org/bugzilla/show_bug.cgi?id=26301 > > > > > > > > > > > > > It is quite normal to have debuginfod headers without libdebuginfod on > > > > multilib OSes. Restore AC_CHECK_LIB to check if libdebuginfod exists. > > > > And always define HAVE_LIBDEBUGINFOD to 0 or 1 for > > > > > > > > binutils/dwarf.c:#if HAVE_LIBDEBUGINFOD > > > > binutils/dwarf.c:#if HAVE_LIBDEBUGINFOD > > > > binutils/dwarf.c:#if HAVE_LIBDEBUGINFOD > > > > binutils/dwarf.h:#if HAVE_LIBDEBUGINFOD > > > > binutils/objdump.c:#if HAVE_LIBDEBUGINFOD > > > > binutils/objdump.c:#endif /* HAVE_LIBDEBUGINFOD */ > > > > binutils/readelf.c:#if HAVE_LIBDEBUGINFOD > > > > binutils/readelf.c:#endif /* HAVE_LIBDEBUGINFOD */ > > > > gdb/top.c:#if HAVE_LIBDEBUGINFOD > > > > > > > > OK for master? > > > > > > Thanks for spotting this. Normally PKG_CHECH_MODULES would correctly > > > detect whether the .so and header are installed and build accordingly, > > > but when cross compiling the AC_CHECK_LIB may be needed. > > > > I am not cross compiling. I am simply using "gcc -m32". The problem > > is PKG_CHECK_MODULES which doesn't check if $pkg_cv_[]$1[]_LIBS > > actually works. Here is the updated patch to fix PKG_CHECK_MODULES. > > Any comments or objections? > > > > > > HAVE_LIBDEBUGINFOD is a separate issue. Here is the updated patch > which only adds AC_TRY_LINK to PKG_CHECK_MODULES to check if > $pkg_cv_[]$1[]_LIBS works. > I am checking it in. -- H.J.