diff options
author | Andreas Jaeger <aj@suse.de> | 2012-03-14 16:36:17 +0100 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2012-03-14 16:36:17 +0100 |
commit | 356a10ee3ee36bec0af7e8a1c61e353e0af45904 (patch) | |
tree | 421de93f9f53c04d796ccd31102baf135dc55ed8 /aclocal.m4 | |
parent | a20026128cef2e95ffd15fb293dd6b1e9bf3ae1e (diff) | |
parent | e456826d7a539fb322bb9719297bd386eded8e32 (diff) | |
download | glibc-356a10ee3ee36bec0af7e8a1c61e353e0af45904.tar.gz glibc-356a10ee3ee36bec0af7e8a1c61e353e0af45904.tar.xz glibc-356a10ee3ee36bec0af7e8a1c61e353e0af45904.zip |
Merge branch 'master' into bug13658-branch
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index dafa97244d..02ff9bc359 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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*]) |