From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22269 invoked by alias); 30 Dec 2011 10:19:03 -0000 Received: (qmail 22260 invoked by uid 22791); 30 Dec 2011 10:19:02 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 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; Fri, 30 Dec 2011 10:18:49 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C9E152BB344; Fri, 30 Dec 2011 05:18:48 -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 qfOVUuGZJTmI; Fri, 30 Dec 2011 05:18:48 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5F3632BB2E6; Fri, 30 Dec 2011 05:18:48 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id A6094145615; Fri, 30 Dec 2011 14:18:42 +0400 (RET) Date: Fri, 30 Dec 2011 10:39:00 -0000 From: Joel Brobecker To: Mike Frysinger Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] sim: erc32: fix linking against local readline on modern (ncurses) systems Message-ID: <20111230101842.GA13974@adacore.com> References: <1325238201-7982-1-git-send-email-vapier@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1325238201-7982-1-git-send-email-vapier@gentoo.org> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2011-12/txt/msg00901.txt.bz2 > 2011-12-30 Mike Frysinger > > * configure.ac: Change AC_CHECK_LIB to AC_SEARCH_LIBS, and add > ncurses/curses to the library search list. > * configure: Regenerated. [...] > - AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="") > + AC_SEARCH_LIBS(tputs, ncurses curses termcap, > + [TERMCAP=$ac_cv_search_tputs], [TERMCAP=""]) Is this going to hurt on non-GNU/Linux systems? In particular, you have chosen an order that is different from the order selected in GDB: # These are the libraries checked by Readline. AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses]) On platform providing both termcap and curses, GDB will choose termcap while the sim will likely choose termcap, and we'll end up trying to link with both! Can you try using the same check as in GDB? Do you have to check for tputs, or does checking for tgetent have the same effect? Otherwise, can you try at least checking the libraries in the same order as in GDB? -- Joel