Blame sysdeps/aarch64/configure.ac

Packit 6c4009
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
Packit 6c4009
# Local configure fragment for sysdeps/aarch64.
Packit 6c4009
Packit 6c4009
# We check to see if the compiler and flags are
Packit 6c4009
# selecting the big endian ABI and if they are then
Packit 6c4009
# we set libc_cv_aarch64_be to yes which causes
Packit 6c4009
# HAVE_AARCH64_BE to be defined in config.h and
Packit 6c4009
# in include/libc-symbols.h and thus available to
Packit 6c4009
# shlib-versions to select the appropriate name for
Packit 6c4009
# the dynamic linker via %ifdef.
Packit 6c4009
AC_CACHE_CHECK([for big endian],
Packit 6c4009
  [libc_cv_aarch64_be],
Packit 6c4009
  [AC_EGREP_CPP(yes,[#ifdef __AARCH64EB__
Packit 6c4009
                      yes
Packit 6c4009
                     #endif
Packit 6c4009
  ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)])
Packit 6c4009
if test $libc_cv_aarch64_be = yes; then
Packit 6c4009
  AC_DEFINE(HAVE_AARCH64_BE)
Packit 6c4009
  LIBC_CONFIG_VAR([default-abi], [lp64_be])
Packit 6c4009
else
Packit 6c4009
  LIBC_CONFIG_VAR([default-abi], [lp64])
Packit 6c4009
fi
Packit Service 399ab1
Packit Service 399ab1
# Check if binutils supports variant PCS symbols.
Packit Service 399ab1
AC_CACHE_CHECK([for variant PCS support], [libc_cv_aarch64_variant_pcs], [dnl
Packit Service 399ab1
  cat > conftest.S <
Packit Service 399ab1
.global foo
Packit Service 399ab1
.type foo, %function
Packit Service 399ab1
.variant_pcs foo
Packit Service 399ab1
foo:
Packit Service 399ab1
	ret
Packit Service 399ab1
.global bar
Packit Service 399ab1
.type bar, %function
Packit Service 399ab1
bar:
Packit Service 399ab1
	b foo
Packit Service 399ab1
EOF
Packit Service 399ab1
  libc_cv_aarch64_variant_pcs=no
Packit Service 399ab1
  if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles $no_ssp -shared -fPIC -o conftest.so conftest.S]) \
Packit Service 399ab1
     && AC_TRY_COMMAND([$READELF -dW conftest.so | grep -q AARCH64_VARIANT_PCS])
Packit Service 399ab1
  then
Packit Service 399ab1
    libc_cv_aarch64_variant_pcs=yes
Packit Service 399ab1
  fi
Packit Service 399ab1
  rm -rf conftest.*])
Packit Service 399ab1
LIBC_CONFIG_VAR([aarch64-variant-pcs], [$libc_cv_aarch64_variant_pcs])