-------- Original Message --------
Subject: Libiberty problem in gcc-4.3 snapshots
Date: Sun, 25 Nov 2007 17:14:47 -0500
From: Andris Pavenis <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

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


--- 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
 

Reply via email to