Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* libiberty configuration for DJGPP
@ 2009-04-14 13:30 Eli Zaretskii
  2009-04-14 14:24 ` Ian Lance Taylor
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2009-04-14 13:30 UTC (permalink / raw)
  To: gcc, gcc-patches; +Cc: DJ Delorie, gdb-patches

The current libiberty misconfigures itself for native DJGPP builds,
because it tries to avoid compiling and linking test programs, for
cross-compilation's sake.  But the necessary bits that tell the
configure script what functions are available in the DJGPP library are
in the wrong place: the one that is run during the native build as
well, and there's no reason to avoid linking in that case.  The result
is that the native DJGPP build of GDB is unnecessarily broken, because
GDB needs several functions from libiberty that are unavailable in the
DJGPP library, but are not auto-detected.

The suggested patch below fixes that by moving the explicit list of
known functions to a place that only gets run when cross-compiling.
While at that, I also added to that part the functions needed by GDB
which need to be provided by libiberty.  The native build will now
auto-detect all the required functions.

2009-04-14  Eli Zaretskii  <eliz@gnu.org>

	* configure.ac  (setobjs, msdosdjgpp): Move a-priori setting of
	existing and required library functions to with_target_subdir
	section, so that the native build does detect them at configure
	time.

--- configure.a~0	2009-04-08 22:42:57.000000000 +0300
+++ configure.ac	2009-04-14 15:14:46.000000000 +0300
@@ -469,6 +469,28 @@
     setobjs=yes
     ;;
 
+  *-*-msdosdjgpp)
+    AC_LIBOBJ([vasprintf])
+    AC_LIBOBJ([vsnprintf])
+    AC_LIBOBJ([snprintf])
+    AC_LIBOBJ([asprintf])
+
+    for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \
+             getcwd getpagesize getrusage gettimeofday \
+             index insque memchr memcmp memcpy memmove memset psignal \
+             putenv random rename rindex sbrk setenv stpcpy strcasecmp \
+             strchr strdup strerror strncasecmp strrchr strstr strtod \
+             strtol strtoul sysconf times tmpnam vfprintf vprintf \
+             vsprintf waitpid
+    do
+      n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      AC_DEFINE_UNQUOTED($n)
+    done
+
+
+    setobjs=yes
+    ;;
+
   esac
 
   # We may wish to install the target headers somewhere.
@@ -548,23 +570,6 @@
     setobjs=yes
     ;;
 
-  *-*-msdosdjgpp)
-    for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \
-             getcwd getpagesize getrusage gettimeofday \
-             index insque memchr memcmp memcpy memmove memset psignal \
-             putenv random rename rindex sbrk setenv stpcpy strcasecmp \
-             strchr strdup strerror strncasecmp strrchr strstr strtod \
-             strtol strtoul sysconf times tmpnam vfprintf vprintf \
-             vsprintf waitpid
-    do
-      n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-      AC_DEFINE_UNQUOTED($n)
-    done
-
-
-    setobjs=yes
-    ;;
-
   esac
 fi
 


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

end of thread, other threads:[~2009-04-14 19:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-14 13:30 libiberty configuration for DJGPP Eli Zaretskii
2009-04-14 14:24 ` Ian Lance Taylor
2009-04-14 14:33   ` Eli Zaretskii
2009-04-14 14:56     ` Ian Lance Taylor
2009-04-14 15:45       ` Eli Zaretskii
2009-04-14 15:45       ` [RFC] change sources.redhat.com to sourceware.org in gdbadmin/ss dir (was: libiberty configuration for DJGPP) Pierre Muller
2009-04-14 16:06         ` Joel Brobecker
2009-04-14 18:26           ` Pierre Muller
2009-04-14 16:25       ` Pierre Muller
2009-04-14 19:21         ` Christopher Faylor
2009-04-14 17:46       ` libiberty configuration for DJGPP DJ Delorie
2009-04-14 17:58         ` Eli Zaretskii

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