From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24427 invoked by alias); 12 Feb 2007 09:19:43 -0000 Received: (qmail 24418 invoked by uid 22791); 12 Feb 2007 09:19:42 -0000 X-Spam-Check-By: sourceware.org Received: from p12018-ipbffx02marunouchi.tokyo.ocn.ne.jp (HELO mail.pizzafactory.jp) (222.147.75.18) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 12 Feb 2007 09:19:36 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.pizzafactory.jp (Postfix) with ESMTP id C25E316EAAE5 for ; Mon, 12 Feb 2007 18:19:33 +0900 (JST) Received: from mail.pizzafactory.jp ([127.0.0.1]) by localhost (ldap.monami-software.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00667-02 for ; Mon, 12 Feb 2007 18:19:28 +0900 (JST) Received: from [10.100.15.255] (s23.gtokyofl12.vectant.ne.jp [222.228.213.23]) by mail.pizzafactory.jp (Postfix) with ESMTP id 0B0A816EAAC7 for ; Mon, 12 Feb 2007 18:19:27 +0900 (JST) Mime-Version: 1.0 (Apple Message framework v752.2) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: gdb-patches@sourceware.org From: Masaki Muranaka Subject: [RFC] Build on OSX Date: Mon, 12 Feb 2007 09:19:00 -0000 X-Mailer: Apple Mail (2.752.2) X-IsSubscribed: yes 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: 2007-02/txt/msg00165.txt.bz2 Hello, I've trying to build cross-gdb on OSX host from CVS head. And the build was failed with following message: /usr/bin/ld: warning multiple definitions of symbol _locale_charset ./../intl/libintl.a(localcharset.o) definition of _locale_charset in section (__TEXT,__text) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libiconv.dylib (localcharset.o) definition of _locale_charset It is well known issue. OSX (maybe also Darwin) hosts need to link 'resolv' library beforge libintl.a. Here is a brute-forced patch. But I don't think this is the good solution. Any comments appreciated. - - - - - - - Index: configure.ac =================================================================== RCS file: /cvs/src/src/gdb/configure.ac,v retrieving revision 1.42 diff -u -p -r1.42 configure.ac --- configure.ac 2 Feb 2007 22:54:09 -0000 1.42 +++ configure.ac 12 Feb 2007 08:55:46 -0000 @@ -1591,6 +1591,13 @@ AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "ISO AM_ICONV +# Darwin (MacOSX Tiger) needs -lresolv before libintl.a. +if test x"$LIBINTL" != x; then + case ${host} in + *darwin*) LIBINTL="-lresolv $LIBINTL"; + esac +fi + AC_OUTPUT(Makefile .gdbinit:gdbinit.in, [ dnl Autoconf doesn't provide a mechanism for modifying definitions -- Masaki Muranaka Monami software