[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About GCC-5.5.0
From: |
Ludovic Courtès |
Subject: |
Re: About GCC-5.5.0 |
Date: |
Mon, 28 May 2018 11:48:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello Rene,
Rene <address@hidden> skribis:
> configure:6227: checking whether i586-pc-gnu-gcc implicitly enables
> -fstack-protector
> configure:6244: i586-pc-gnu-gcc -c -g -O2 conftest.c >&5
> configure:6244: $? = 0
> libc_undefs=''
> configure:6263: error: unexpected symbols in test:
This comes from this code in the configure.ac file of the glibc 2.23ish
package that’s used in Guix for GNU/Hurd (this code is absent in the
2.26ish glibc used for GNU/Linux):
--8<---------------cut here---------------start------------->8---
AC_CACHE_CHECK([whether $CC implicitly enables -fstack-protector],
libc_cv_predef_stack_protector, [
AC_TRY_COMPILE([extern void foobar (char *);],
[char large_array[2048]; foobar (large_array);], [
libc_undefs=`$NM -u conftest.o |
LC_ALL=C $AWK '$1 == "U" { print $2 | "sort -u"; next } { exit(1) }' \
2>&AS_MESSAGE_LOG_FD` || {
AC_MSG_ERROR([confusing output from $NM -u])
}
echo >&AS_MESSAGE_LOG_FD "libc_undefs='$libc_undefs'"
# On some architectures, there are architecture-specific undefined
# symbols (resolved by the linker), so filter out unknown symbols.
# This will fail to produce the correct result if the compiler
# defaults to -fstack-protector but this produces an undefined symbol
# other than __stack_chk_fail. However, compilers like that have not
# been encountered in practice.
libc_undefs=`echo "$libc_undefs" | egrep '^(foobar|__stack_chk_fail)$'`
case "$libc_undefs" in
foobar) libc_cv_predef_stack_protector=no ;;
'__stack_chk_fail
foobar') libc_cv_predef_stack_protector=yes ;;
*) AC_MSG_ERROR([unexpected symbols in test: $libc_undefs]) ;;
esac],
[AC_MSG_ERROR([test compilation failed])])
])
--8<---------------cut here---------------end--------------->8---
So it looks like the right-hand size of the ‘libc_undefs’ assignment
expands to the empty string.
Could you check the value of $NM in there? Could it be that it got it
wrong?
HTH,
Ludo’.