glibc/sysdeps/unix/sysv/linux/mips/configure.ac
Joseph Myers d95ffd4cfd Refactor handling of /lib64 etc. cases, move out of sysdeps/gnu/configure.ac.
This patch continues removing architecture-specific cases from
non-architecture-specific files by moving the logic to use directories
such as /lib64 out of sysdeps/gnu/configure.ac.

A new macro LIBC_SLIBDIR_RTLDDIR is created that sysdeps configure
scripts can use to declare the library directories to be used; the
logic was previously duplicated in configure fragments for aarch64,
mips and x32 as well as in sysdeps/gnu/configure.ac.  This macro is
used directly in sysdeps/gnu/configure.ac only to provide the /lib
default (the logic saying that with --prefix=/usr shared libraries go
in /lib not /usr/lib); the architecture cases formerly there are moved
into various new or existing configure.ac files.  The new macro is
also used in the various architecture fragments that already had such
logic.  In the x32 there was previously a configure fragment, but it
was a directly written one without a .ac file; now a .ac file is used
there instead to generate configure.

Tested x86_64 that the installed shared libraries, and the directory
structure of the installation, are unchanged by this patch.

There is an old bug report - bug 6441 - about library directories
changing after reconfiguring.  If this is still applicable - and I
haven't attempted to confirm it or review the old patch pointed to in
that bug - then this patch should reduce the number of places needing
changing in any fix.

	* aclocal.m4 (LIBC_SLIBDIR_RTLDDIR): New macro.
	* sysdeps/gnu/configure.ac: Use LIBC_SLIBDIR_RTLDDIR.  Remove
	cases for individual architectures.
	* sysdeps/gnu/configure: Regenerated.
	* sysdeps/unix/sysv/linux/aarch64/configure.ac: Use
	LIBC_SLIBDIR_RTLDDIR.
	* sysdeps/unix/sysv/linux/aarch64/configure: Regenerated.
	* sysdeps/unix/sysv/linux/mips/configure.ac: Use
	LIBC_SLIBDIR_RTLDDIR.
	* sysdeps/unix/sysv/linux/mips/configure: Regenerated.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac: Use
	LIBC_SLIBDIR_RTLDDIR.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure:
	Regenerated.
	* sysdeps/unix/sysv/linux/s390/s390-64/configure.ac: New file.
	* sysdeps/unix/sysv/linux/s390/s390-64/configure: New generated
	file.
	* sysdeps/unix/sysv/linux/sparc/sparc64/configure.ac: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc64/configure: New generated
	file.
	* sysdeps/unix/sysv/linux/x86_64/64/configure.ac: New file.
	* sysdeps/unix/sysv/linux/x86_64/64/configure: New generated file.
	* sysdeps/unix/sysv/linux/x86_64/x32/configure.ac: New file.
	* sysdeps/unix/sysv/linux/x86_64/x32/configure: Generate.
2014-07-17 14:35:48 +00:00

80 lines
2.0 KiB
Plaintext

sinclude(./aclocal.m4)dnl Autoconf lossage
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/mips.
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([
#if (_MIPS_SIM != _ABIO32)
#error Not O32 ABI
#endif])],
[libc_mips_abi=o32],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([
#if (_MIPS_SIM != _ABIN32)
#error Not N32 ABI
#endif])],
[libc_mips_abi=n32],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([
#if (_MIPS_SIM != _ABI64)
#error Not 64 ABI
#endif])],
[libc_mips_abi=n64],
[])])])
if test -z "$libc_mips_abi"; then
AC_MSG_ERROR([could not determine what ABI the compiler is using])
fi
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([
#if !defined(__mips_soft_float)
#error Not soft ABI
#endif])],
[libc_mips_float=soft],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([
#if !defined(__mips_hard_float)
#error Not hard ABI
#endif])],
[libc_mips_float=hard],
[])])
if test -z "$libc_mips_float"; then
AC_MSG_ERROR([could not determine if compiler is using hard or soft floating point ABI])
fi
AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding],
libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl
#ifdef __mips_nan2008
yes
#endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)])
libc_mips_nan=
if test x"$libc_cv_mips_nan2008" = xyes; then
libc_mips_nan=_2008
fi
LIBC_CONFIG_VAR([default-abi],
[${libc_mips_abi}_${libc_mips_float}${libc_mips_nan}])
case $machine in
mips/mips64/n64/*)
LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
;;
mips/mips64/n32/*)
LIBC_SLIBDIR_RTLDDIR([lib32], [lib32])
;;
esac
libc_cv_gcc_unwind_find_fde=yes
if test -z "$arch_minimum_kernel"; then
if test x$libc_cv_mips_nan2008 = xyes; then
# FIXME: Adjust this setting to the actual first upstream kernel
# version to support the 2008 NaN encoding and then remove this
# comment.
arch_minimum_kernel=10.0.0
fi
fi