[Bug bootstrap/78616] [7 regression] bootstrap fails for x86_64-darwin at stage1 after 243030 when the bootstrap compiler doesn't have strndup
iains at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 30 17:12:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78616
--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
trying this (after regnerating gcc/configure and gcc/config.in)
$ git diff gcc/configure.ac include/libiberty.h
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 703250f..ece1ffa 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1306,7 +1306,7 @@ AC_CHECK_DECLS([basename(const char*), strstr(const
char*,const char*)], , ,[
#include "system.h"])
gcc_AC_CHECK_DECLS(getenv atol atoll asprintf sbrk abort atof getcwd getwd \
- madvise stpcpy strnlen strsignal strverscmp \
+ madvise stpcpy strnlen strndup strsignal strverscmp \
strtol strtoul strtoll strtoull setenv unsetenv \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
free getopt clock getpagesize ffs gcc_UNLOCKED_FUNCS, , ,[
diff --git a/include/libiberty.h b/include/libiberty.h
index 605ff56..0401dac 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -670,6 +670,10 @@ extern int vsnprintf (char *, size_t, const char *,
va_list) ATTRIBUTE_PRINTF(3,
extern size_t strnlen (const char *, size_t);
#endif
+#if defined (HAVE_DECL_STRNDUP) && !HAVE_DECL_STRNDUP
+extern size_t strndup (const char *, size_t);
+#endif
+
#if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP
/* Compare version strings. */
extern int strverscmp (const char *, const char *);
More information about the Gcc-bugs
mailing list