From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4826 invoked by alias); 14 Apr 2009 13:30:36 -0000 Received: (qmail 4792 invoked by uid 22791); 14 Apr 2009 13:30:31 -0000 X-SWARE-Spam-Status: No, hits=0.6 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_73,J_CHICKENPOX_92,RCVD_IN_JMF_BL,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout3.012.net.il (HELO mtaout3.012.net.il) (84.95.2.7) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Apr 2009 13:30:24 +0000 Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KI300700EU4K900@i_mtaout3.012.net.il> for gdb-patches@sources.redhat.com; Tue, 14 Apr 2009 16:30:21 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.229.34.97]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KI300GZ8EUKC890@i_mtaout3.012.net.il>; Tue, 14 Apr 2009 16:30:21 +0300 (IDT) Date: Tue, 14 Apr 2009 13:30:00 -0000 From: Eli Zaretskii Subject: libiberty configuration for DJGPP To: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: DJ Delorie , gdb-patches@sources.redhat.com Reply-to: Eli Zaretskii Message-id: <83zlejmkgb.fsf@gnu.org> 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: 2009-04/txt/msg00248.txt.bz2 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 * 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