delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2007/11/25/10:36:41

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Message-ID: <4749F3D7.9020405@iki.fi>
Date: Sun, 25 Nov 2007 17:14:47 -0500
From: Andris Pavenis <andris DOT pavenis AT iki DOT fi>
User-Agent: Thunderbird 2.0.0.9 (X11/20071115)
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Libiberty problem in gcc-4.3 snapshots
X--MailScanner-Information: Please contact the ISP for more information
X--MailScanner: Found to be clean
X--MailScanner-SpamScore: s
X--MailScanner-From: andris DOT pavenis AT iki DOT fi
X-Spam-Status: No
Reply-To: djgpp-workers AT delorie DOT com

This is a multi-part message in MIME format.
--------------070702080104060801020509
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Tried to build gcc-4.3-20071123 for DJGPP (native build). Run into a following libiberty related 
problem problem:

vasprintf() was not found when building gcc stage 1.

vasprintf() should be provided by libiberty as DJGPP does not have own. Inspecting libiberty 
Makefile and present object files however showed that none of procedures that are missing in DJGPP 
were included in built libiberty.a:

LIBOBJS =

For GCC-4.2.2 I had in libiberty Makefile:

LIBOBJS =  ${LIBOBJDIR}./asprintf$U.o ${LIBOBJDIR}./mempcpy$U.o ${LIBOBJDIR}./mkstemps$U.o 
${LIBOBJDIR}./sigsetmask$U.o ${LIBOBJDIR}./strndup$U.o ${LIBOBJDIR}./strverscmp$U.o 
${LIBOBJDIR}./vasprintf$U.o

and as result no such problem.

As the difference between Makefile.ac versions contains DJGPP related stuff not from me (see 
attachment) , I'm sending this message at first to DJGPP related list

Andris


--------------070702080104060801020509
Content-Type: text/x-patch;
 name="libiberty_configure.ac.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="libiberty_configure.ac.diff"

--- configure.ac.4.2.2	2007-11-25 15:59:52 +0000
+++ configure.ac	2007-07-17 17:52:28 +0000
@@ -109,30 +109,32 @@
 AC_CHECK_TOOL(AR, ar)
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 
+dnl When switching to automake, replace the following with AM_ENABLE_MULTILIB.
+# Add --enable-multilib to configure.
+# Default to --enable-multilib
+AC_ARG_ENABLE(multilib,
+[  --enable-multilib       build many library versions (default)],
+[case "$enableval" in
+  yes) multilib=yes ;;
+  no)  multilib=no ;;
+  *)   AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
+ esac],
+	      [multilib=yes])
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+   && test "x${with_multisubdir}" != x ; then
+   cross_compiling=maybe
+fi
+
 GCC_NO_EXECUTABLES
 AC_PROG_CC
 AC_PROG_CPP_WERROR
 
-# Warn C++ incompatibilities if supported.
-AC_CACHE_CHECK(
-  [whether ${CC} accepts -Wc++-compat],
-  [ac_cv_prog_cc_w_cxx_compat],
-  [save_CFLAGS="$CFLAGS"
-  CFLAGS="-Wc++-compat"
-  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],
-                    [ac_cv_prog_cc_w_cxx_compat=yes],
-                    [ac_cv_prog_cc_w_cxx_compat=no])
-  CFLAGS="$save_CFLAGS"
-  ])
-
-
-if test x$GCC = xyes; then
-  ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes'
-fi
-if test $ac_cv_prog_cc_w_cxx_compat = yes ; then
-  ac_libiberty_warn_cflags="${ac_libiberty_warn_cflags} -Wc++-compat"
-fi
-AC_SUBST(ac_libiberty_warn_cflags)
+ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wc++-compat \
+			  -Wstrict-prototypes], [ac_libiberty_warn_cflags])
+ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([], [ac_libiberty_warn_cflags])
 
 AC_PROG_CC_C_O
 # autoconf is lame and doesn't give us any substitution variable for this.
@@ -545,6 +547,23 @@
     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
 

--------------070702080104060801020509--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019