Rafael Ávila de Espíndola wrote:
I noticed that in the config.h generated for libiberty has HAVE_DECL_ASPRINTF
defined as 0. This hapens because _GNU_SOURCE is not used when running the
test programs.
Another long-staying bug in the libiberty configure system is that it
claims newlib missing 'asprintf()', 'strdup()' and 'vasprintf()' and
therefore tries to produce these although one has used the
'--with-newlib' in the GCC configure ! AFAIK, only those functions
which are missing from the C library, should be built into libiberty.
The result from this has been the GCC build crashing with the clashing
newlib headers prototypes and the function reimplementations in
libiberty. Sometimes I even made diffs for the fixes in 'configure.ac':
*** configure.ac.orig 2004-01-10 04:17:41.000000000 +0200
--- configure.ac 2005-05-02 18:36:18.000000000 +0300
***************
*** 265,280 ****
# newlib provide and which ones we will be expected to provide.
if test "x${with_newlib}" = "xyes"; then
- AC_LIBOBJ([asprintf])
AC_LIBOBJ([basename])
AC_LIBOBJ([insque])
AC_LIBOBJ([random])
- AC_LIBOBJ([strdup])
- AC_LIBOBJ([vasprintf])
for f in $funcs; do
case "$f" in
! asprintf | basename | insque | random | strdup | vasprintf)
;;
*)
n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
--- 265,277 ----
# newlib provide and which ones we will be expected to provide.
if test "x${with_newlib}" = "xyes"; then
AC_LIBOBJ([basename])
AC_LIBOBJ([insque])
AC_LIBOBJ([random])
for f in $funcs; do
case "$f" in
! basename | insque | random)
;;
*)
n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`