Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] Build on OSX
@ 2007-02-12  9:19 Masaki Muranaka
  2007-02-27 16:57 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Masaki Muranaka @ 2007-02-12  9:19 UTC (permalink / raw)
  To: gdb-patches

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-28 10:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12  9:19 [RFC] Build on OSX Masaki Muranaka
2007-02-27 16:57 ` Daniel Jacobowitz
2007-02-28 10:18   ` Masaki Muranaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox