File: configure.ac

package info (click to toggle)
glibc 2.41-12
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 300,384 kB
  • sloc: ansic: 1,050,583; asm: 238,243; makefile: 20,379; python: 13,537; sh: 11,827; cpp: 5,197; awk: 1,795; perl: 317; yacc: 292; pascal: 182; sed: 19
file content (37 lines) | stat: -rw-r--r-- 1,421 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/sparc/sparc32

# Test if compiler targets at least sparcv8.
AC_CACHE_CHECK([for at least sparcv8 support],
  [libc_cv_sparcv8],
  [AC_EGREP_CPP(yes,[#if defined (__sparc_v8__) || defined (__sparc_v9__)
                      yes
                     #endif
  ], libc_cv_sparcv8=yes, libc_cv_sparcv8=no)])
if test $libc_cv_sparcv8 = no; then
  AC_MSG_ERROR([no support for pre-v8 sparc])
fi

# Test if compiler generates external calls to libatomic for CAS operation.
# It is suffice to check for int only and the test is similar of C11
# atomic_compare_exchange_strong using GCC builtins.
AC_CACHE_CHECK(for external libatomic calls,
	       libc_cv_cas_uses_libatomic,
	       [cat > conftest.c <<EOF
	       _Bool foo (int *ptr, int *expected, int desired)
	       {
		 return __atomic_compare_exchange_n (ptr, expected, desired, 0,
						     __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
	       }
EOF
	       libc_cv_cas_uses_libatomic=no
	       if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
		 if grep '__atomic_compare_exchange_4' conftest.s >/dev/null; then
		   libc_cv_cas_uses_libatomic=yes
		 fi
	       fi
	       rm -f conftest.c conftest.s
	       ])
if test $libc_cv_cas_uses_libatomic = yes; then
  AC_MSG_ERROR([external dependency of libatomic is not supported])
fi