Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org
Cc: DJ Delorie <dj@redhat.com>, gdb-patches@sources.redhat.com
Subject: libiberty configuration for DJGPP
Date: Tue, 14 Apr 2009 13:30:00 -0000	[thread overview]
Message-ID: <83zlejmkgb.fsf@gnu.org> (raw)

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
 


             reply	other threads:[~2009-04-14 13:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14 13:30 Eli Zaretskii [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83zlejmkgb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dj@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox