diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-03-08 00:17:27 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-03-08 00:17:27 +0000 |
commit | 07037eeb43ca1e0ac2802e3a1492cecf869c63c6 (patch) | |
tree | 83e74c69cd8497be987abe3e2e058fb3a62cb278 /aclocal.m4 | |
parent | af6a1e37554a1245d468ffe44d2c981998a4e0eb (diff) | |
download | glibc-07037eeb43ca1e0ac2802e3a1492cecf869c63c6.zip glibc-07037eeb43ca1e0ac2802e3a1492cecf869c63c6.tar.gz glibc-07037eeb43ca1e0ac2802e3a1492cecf869c63c6.tar.bz2 |
Fix .ctors/.dtors header configure test for bootstrapping.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -113,3 +113,17 @@ AC_CACHE_CHECK(whether $LD is GNU ld, libc_cv_prog_ld_gnu, [LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)]) gnu_ld=$libc_cv_prog_ld_gnu ]) + +dnl Run a static link test with -nostdlib -nostartfiles. +dnl LIBC_TRY_LINK_STATIC([code], [action-if-true], [action-if-false]) +AC_DEFUN([LIBC_TRY_LINK_STATIC], +[cat > conftest.c <<EOF +int _start (void) { return 0; } +int __start (void) { return 0; } +$1 +EOF +AS_IF([AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest + conftest.c -static -nostartfiles -nostdlib + 1>&AS_MESSAGE_LOG_FD])], + [$2], [$3]) +rm -f conftest*]) |