diff options
author | Joseph Myers <joseph@codesourcery.com> | 2006-09-29 22:18:51 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2006-09-29 22:18:51 +0100 |
commit | be14fe72cbae6192bfa999ce25e07ecb0e53fc5f (patch) | |
tree | 346dee200c6a0383469b6f2717eb67627098f850 /libssp/configure.ac | |
parent | 4a44c1a228783f56c4c4b7e7aeee102115a6696d (diff) | |
download | gcc-be14fe72cbae6192bfa999ce25e07ecb0e53fc5f.tar.gz |
re PR other/25035 (libssp causes a failure with cross compilers with unified trees)
PR other/25035
* configure.ac (AC_EXEEXT): Remove.
(GCC_NO_EXECUTABLES): Call.
(ssp_use_symver): Default to no if unable to link.
(AC_CHECK_FUNCS): Hardwire results if unable to link.
* aclocal.m4, configure, Makefile.in: Regenerate.
From-SVN: r117318
Diffstat (limited to 'libssp/configure.ac')
-rw-r--r-- | libssp/configure.ac | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/libssp/configure.ac b/libssp/configure.ac index f8ed70c5105..99b4edfe104 100644 --- a/libssp/configure.ac +++ b/libssp/configure.ac @@ -22,7 +22,8 @@ AC_ARG_ENABLE(version-specific-runtime-libs, AC_MSG_RESULT($version_specific_libs) AM_MAINTAINER_MODE -AC_EXEEXT + +GCC_NO_EXECUTABLES AM_ENABLE_MULTILIB(, ..) @@ -78,14 +79,27 @@ FOO_1.0 { EOF save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -fPIC -shared -Wl,--version-script,./conftest.map" -AC_TRY_LINK([int foo;],[],[ssp_use_symver=yes],[ssp_use_symver=no]) +if test x$gcc_no_link = xyes; then + # If we cannot link, we cannot build shared libraries, so do not use + # symbol versioning. + ssp_use_symver=no +else + AC_TRY_LINK([int foo;],[],[ssp_use_symver=yes],[ssp_use_symver=no]) +fi LDFLAGS="$save_LDFLAGS" AC_MSG_RESULT($ssp_use_symver) AM_CONDITIONAL(LIBSSP_USE_SYMVER, [test "x$ssp_use_symver" = xyes]) AC_CHECK_HEADERS(alloca.h paths.h syslog.h string.h unistd.h fcntl.h stdio.h limits.h) -AC_CHECK_FUNCS(mempcpy strncpy strncat) +if test x$gcc_no_link = xyes; then + # Presume the ISO C functions are available; add target-specific + # configuration here if required. + AC_DEFINE(HAVE_STRNCPY) + AC_DEFINE(HAVE_STRNCAT) +else + AC_CHECK_FUNCS(mempcpy strncpy strncat) +fi AC_MSG_CHECKING([whether vsnprintf is usable]) AC_RUN_IFELSE(AC_LANG_PROGRAM([ |