Skip to content

Commit

Permalink
x86/x86-64 now needs <cpuid.h> from gcc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrich Drepper committed Aug 2, 2009
1 parent 9663bb3 commit 5192104
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 44 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2009-08-02 Ulrich Drepper <drepper@redhat.com>

* sysdeps/i386/configure.in: Add test for <cpuid.h>.

2009-07-31 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S (longjmp_msg): Yet
Expand Down
100 changes: 56 additions & 44 deletions sysdeps/i386/configure
Original file line number Diff line number Diff line change
@@ -1,42 +1,54 @@
as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/i386.


{ echo "$as_me:$LINENO: checking if gcc provides <cpuid.h>" >&5
echo $ECHO_N "checking if gcc provides <cpuid.h>... $ECHO_C" >&6; }
if test "${libc_cv_gcc_cpuid+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#include <cpuid.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
libc_cv_gcc_cpuid=yes
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$1;
case $arg in
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

libc_cv_gcc_cpuid=no
fi

# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/i386.
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $libc_cv_gcc_cpuid" >&5
echo "${ECHO_T}$libc_cv_gcc_cpuid" >&6; }
if test $libc_cv_gcc_cpuid != yes; then
{ { echo "$as_me:$LINENO: error: gcc must provide the <cpuid.h> header" >&5
echo "$as_me: error: gcc must provide the <cpuid.h> header" >&2;}
{ (exit 1); exit 1; }; }
fi

{ $as_echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5
$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
{ echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5
echo $ECHO_N "checking if -g produces usable source locations for assembler-with-cpp... $ECHO_C" >&6; }
if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then
$as_echo_n "(cached) " >&6
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat > conftest.S <<EOF
#include "confdefs.h"
Expand All @@ -59,15 +71,15 @@ if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } && {
ac_pattern='conftest\.S'
{ ac_try='readelf --debug-dump=line conftest.o |
grep $ac_pattern 1>&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }
}; then
libc_cv_cpp_asm_debuginfo=yes
Expand All @@ -76,33 +88,33 @@ else
fi
rm -f conftest*
fi
{ $as_echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5
$as_echo "$libc_cv_cpp_asm_debuginfo" >&6; }
{ echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5
echo "${ECHO_T}$libc_cv_cpp_asm_debuginfo" >&6; }
if test $libc_cv_cpp_asm_debuginfo = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_CPP_ASM_DEBUGINFO 1
_ACEOF

fi

{ $as_echo "$as_me:$LINENO: checking for SSE4 support" >&5
$as_echo_n "checking for SSE4 support... " >&6; }
{ echo "$as_me:$LINENO: checking for SSE4 support" >&5
echo $ECHO_N "checking for SSE4 support... $ECHO_C" >&6; }
if test "${libc_cv_cc_sse4+set}" = set; then
$as_echo_n "(cached) " >&6
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
libc_cv_cc_sse4=yes
else
libc_cv_cc_sse4=no
fi
fi
{ $as_echo "$as_me:$LINENO: result: $libc_cv_cc_sse4" >&5
$as_echo "$libc_cv_cc_sse4" >&6; }
{ echo "$as_me:$LINENO: result: $libc_cv_cc_sse4" >&5
echo "${ECHO_T}$libc_cv_cc_sse4" >&6; }
if test $libc_cv_cc_sse4 = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_SSE4_SUPPORT 1
Expand Down
7 changes: 7 additions & 0 deletions sysdeps/i386/configure.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/i386.

AC_CACHE_CHECK([if gcc provides <cpuid.h>], libc_cv_gcc_cpuid, [dnl
AC_COMPILE_IFELSE([#include <cpuid.h>], libc_cv_gcc_cpuid=yes,
libc_cv_gcc_cpuid=no)])
if test $libc_cv_gcc_cpuid != yes; then
AC_MSG_ERROR([gcc must provide the <cpuid.h> header])
fi

AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
libc_cv_cpp_asm_debuginfo, [dnl
cat > conftest.S <<EOF
Expand Down

0 comments on commit 5192104

Please sign in to comment.