]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - aclocal.m4
posix/glob.c: update from gnulib
[thirdparty/glibc.git] / aclocal.m4
index abc34d231535048e2e18473b3c6a8fb484b43596..3e0bcdd12b77a3f1ae975afe0f7fe8981b753c10 100644 (file)
@@ -34,6 +34,7 @@ AC_PROVIDE([AS_SHELL_FN_as_fn_set_status])dnl
 AC_PROVIDE([AS_SHELL_FN_as_fn_exit])dnl
 AC_PROVIDE([AS_SHELL_FN_as_fn_arith])dnl
 AC_PROVIDE([AS_SHELL_FN_ac_fn_c_try_compile])dnl
+AC_PROVIDE([AS_SHELL_FN_ac_fn_c_try_cpp])dnl
 define([AS_MESSAGE_LOG_FD],5)dnl
 define([AS_MESSAGE_FD],6)dnl
 dnl Ripped out of AS_INIT, which does more cruft we do not want.
@@ -113,14 +114,20 @@ if test -n "$path_binutils"; then
     path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'`
     CC="$CC -B$path_binutils"
 fi
+case "$CC" in
+    *fuse-ld=lld*) LDNAME=ld.lld;;
+    *)             LDNAME=ld;;
+esac
 AS=`$CC -print-prog-name=as`
-LD=`$CC -print-prog-name=ld`
+LD=`$CC -print-prog-name=$LDNAME`
 AR=`$CC -print-prog-name=ar`
 AC_SUBST(AR)
 OBJDUMP=`$CC -print-prog-name=objdump`
 AC_SUBST(OBJDUMP)
 OBJCOPY=`$CC -print-prog-name=objcopy`
 AC_SUBST(OBJCOPY)
+GPROF=`$CC -print-prog-name=gprof`
+AC_SUBST(GPROF)
 
 # Determine whether we are using GNU binutils.
 AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu,
@@ -141,7 +148,7 @@ int _start (void) { return 0; }
 int __start (void) { return 0; }
 $1
 EOF
-AS_IF([AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest
+AS_IF([AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -o conftest
                       conftest.c -static -nostartfiles -nostdlib
                       1>&AS_MESSAGE_LOG_FD])],
       [$2], [$3])
@@ -221,20 +228,23 @@ AC_DEFUN([LIBC_LINKER_FEATURE],
 [AC_MSG_CHECKING([for linker that supports $1])
 libc_linker_feature=no
 if test x"$gnu_ld" = x"yes"; then
-  libc_linker_check=`$LD -v --help 2>/dev/null | grep "\$1"`
-  if test -n "$libc_linker_check"; then
-    cat > conftest.c <<EOF
+  cat > conftest.c <<EOF
 int _start (void) { return 42; }
 EOF
-    if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-                               $2 -nostdlib -nostartfiles
-                               -fPIC -shared -o conftest.so conftest.c
-                               1>&AS_MESSAGE_LOG_FD])
-    then
+  if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
+                   $2 -nostdlib -nostartfiles
+                   -fPIC -shared -o conftest.so conftest.c
+                   1>&AS_MESSAGE_LOG_FD])
+  then
+    if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp $2 -nostdlib \
+       -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \
+       | grep "warning: $1 ignored" > /dev/null 2>&1; then
+      true
+    else
       libc_linker_feature=yes
     fi
-    rm -f conftest*
   fi
+  rm -f conftest*
 fi
 if test $libc_linker_feature = yes; then
   $3
@@ -268,7 +278,7 @@ libc_compiler_builtin_inlined=no
 cat > conftest.c <<EOF
 int _start (void) { $2 return 0; }
 EOF
-if ! AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+if ! AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
                     $3 -nostdlib -nostartfiles
                     -S conftest.c -o - | fgrep "$1"
                     1>&AS_MESSAGE_LOG_FD])
@@ -291,12 +301,12 @@ AC_DEFUN([LIBC_SLIBDIR_RTLDDIR],
 [test -n "$libc_cv_slibdir" ||
 case "$prefix" in
 /usr | /usr/)
-  libc_cv_slibdir=/$1
-  libc_cv_rtlddir=/$2
+  libc_cv_slibdir='/$1'
+  libc_cv_rtlddir='/$2'
   if test "$libdir" = '${exec_prefix}/lib'; then
     libdir='${exec_prefix}/$1';
     # Locale data can be shared between 32-bit and 64-bit libraries.
-    libc_cv_localedir='${exec_prefix}/lib/locale'
+    libc_cv_complocaledir='${exec_prefix}/lib/locale'
   fi
   ;;
 esac])