+2013-03-20 Joseph Myers <joseph@codesourcery.com>
+
+ * aclocal.m4 (LIBC_CONFIG_VAR): New autoconf macro.
+ * config.make.in (config-cflags-sse4): Remove variable.
+ (config-cflags-avx): Likewise.
+ (config-cflags-sse2avx): Likewise.
+ (config-cflags-novzeroupper): Likewise.
+ (config-asflags-i686): Likewise.
+ (have-mfma4): Likewise.
+ (have-as-vis3): Likewise.
+ (MIG): Likewise.
+ * configure.in (MIG): Do not AC_SUBST.
+ (libc_cv_cc_nofma): Move AC_SUBST next to configure test.
+ (libc_cv_cc_sse4): Do not AC_SUBST.
+ (libc_cv_cc_avx): Likewise.
+ (libc_cv_cc_sse2avx): Likewise.
+ (libc_cv_cc_novzeroupper): Likewise.
+ (libc_cv_cc_fma4): Likewise.
+ (libc_cv_as_i686): Likewise.
+ (libc_cv_sparc_as_vis3): Likewise.
+ * sysdeps/i386/configure.in (config-cflags-sse4): Set using
+ LIBC_CONFIG_VAR.
+ (config-asflags-i686): Likewise.
+ (config-cflags-avx): Likewise.
+ (config-cflags-sse2avx): Likewise.
+ (have-mfma4): Likewise.
+ (config-cflags-novzeroupper): Likewise.
+ * sysdeps/mach/configure.in (MIG): Likewise.
+ * sysdeps/sparc/configure.in (have-as-vis3): Likewise.
+ * sysdeps/x86_64/configure.in (config-cflags-sse4): Set using
+ LIBC_CONFIG_VAR.
+ (config-cflags-avx): Likewise.
+ (config-cflags-sse2avx): Likewise.
+ (have-mfma4): Likewise.
+ (config-cflags-novzeroupper): Likewise.
+ * configure: Regenerated.
+ * sysdeps/i386/configure: Likewise.
+ * sysdeps/mach/configure: Likewise.
+ * sysdeps/sparc/configure: Likewise.
+ * sysdeps/x86_64/configure: Likewise.
+
2013-03-20 Roland McGrath <roland@hack.frob.com>
[BZ #14812]
$4
fi
AC_MSG_RESULT($libc_linker_feature)])
+
+dnl Add a makefile variable, with value set from a shell string
+dnl (expanded by the shell inside double quotes), to config.make.
+dnl LIBC_CONFIG_VAR(make-variable, shell-value)
+AC_DEFUN([LIBC_CONFIG_VAR],
+[config_vars="$config_vars
+$1 = $2"])
asflags-cpu = @libc_cv_cc_submachine@
config-extra-cflags = @libc_extra_cflags@
-config-cflags-sse4 = @libc_cv_cc_sse4@
-config-cflags-avx = @libc_cv_cc_avx@
-config-cflags-sse2avx = @libc_cv_cc_sse2avx@
-config-cflags-novzeroupper = @libc_cv_cc_novzeroupper@
config-cflags-nofma = @libc_cv_cc_nofma@
-config-asflags-i686 = @libc_cv_as_i686@
defines = @DEFINES@
sysheaders = @sysheaders@
unwind-find-fde = @libc_cv_gcc_unwind_find_fde@
have-forced-unwind = @libc_cv_forced_unwind@
have-fpie = @libc_cv_fpie@
-have-mfma4 = @libc_cv_cc_fma4@
-have-as-vis3 = @libc_cv_sparc_as_vis3@
gnu89-inline-CFLAGS = @gnu89_inline@
have-ssp = @libc_cv_ssp@
have-selinux = @have_selinux@
NM = @NM@
MAKEINFO = @MAKEINFO@
AS = $(CC) -c
-MIG = @MIG@
BISON = @BISON@
AUTOCONF = @AUTOCONF@
OBJDUMP = @OBJDUMP@
static
ldd_rewrite_script
use_ldconfig
-libc_cv_sparc_as_vis3
-libc_cv_as_i686
-libc_cv_cc_nofma
-libc_cv_cc_fma4
-libc_cv_cc_novzeroupper
-libc_cv_cc_sse2avx
-libc_cv_cc_avx
-libc_cv_cc_sse4
libc_cv_forced_unwind
libc_cv_rootsbindir
libc_cv_localstatedir
have_libaudit
LIBGD
libc_cv_cc_submachine
+libc_cv_cc_nofma
exceptions
gnu89_inline
libc_cv_ssp
MAKE
LD
AS
-MIG
OBJCOPY
OBJDUMP
AR
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_nofma" >&5
$as_echo "$libc_cv_cc_nofma" >&6; }
+
if test -n "$submachine"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option for CPU variant" >&5
$as_echo_n "checking for compiler option for CPU variant... " >&6; }
-
-
-
-
-
-
-
-
-
if test x$use_ldconfig = xyes; then
$as_echo "#define USE_LDCONFIG 1" >>confdefs.h
AC_PROG_LN_S
LIBC_PROG_BINUTILS
-AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in
# Accept binutils 2.20 or newer.
AC_CHECK_PROG_VER(AS, $AS, --version,
for opt in -ffp-contract=off -mno-fused-madd; do
LIBC_TRY_CC_OPTION([$opt], [libc_cv_cc_nofma=$opt; break])
done])
+AC_SUBST(libc_cv_cc_nofma)
if test -n "$submachine"; then
AC_CACHE_CHECK([for compiler option for CPU variant],
AC_SUBST(libc_cv_rootsbindir)
AC_SUBST(libc_cv_forced_unwind)
-dnl sysdeps/CPU/configure.in checks set this via arch-specific asm tests
-AC_SUBST(libc_cv_cc_sse4)
-AC_SUBST(libc_cv_cc_avx)
-AC_SUBST(libc_cv_cc_sse2avx)
-AC_SUBST(libc_cv_cc_novzeroupper)
-AC_SUBST(libc_cv_cc_fma4)
-AC_SUBST(libc_cv_cc_nofma)
-AC_SUBST(libc_cv_as_i686)
-AC_SUBST(libc_cv_sparc_as_vis3)
-
if test x$use_ldconfig = xyes; then
AC_DEFINE(USE_LDCONFIG)
fi
$as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h
fi
+config_vars="$config_vars
+config-cflags-sse4 = $libc_cv_cc_sse4"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler -mtune=i686 support" >&5
$as_echo_n "checking for assembler -mtune=i686 support... " >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_as_i686" >&5
$as_echo "$libc_cv_as_i686" >&6; }
+config_vars="$config_vars
+config-asflags-i686 = $libc_cv_as_i686"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
$as_echo_n "checking for AVX support... " >&6; }
$as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h
fi
+config_vars="$config_vars
+config-cflags-avx = $libc_cv_cc_avx"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5
$as_echo_n "checking for AVX encoding of SSE instructions... " >&6; }
$as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
fi
+config_vars="$config_vars
+config-cflags-sse2avx = $libc_cv_cc_sse2avx"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
$as_echo_n "checking for FMA4 support... " >&6; }
$as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
fi
+config_vars="$config_vars
+have-mfma4 = $libc_cv_cc_fma4"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
$as_echo_n "checking for -mno-vzeroupper support... " >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
$as_echo "$libc_cv_cc_novzeroupper" >&6; }
+config_vars="$config_vars
+config-cflags-novzeroupper = $libc_cv_cc_novzeroupper"
$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
if test $libc_cv_cc_sse4 = yes; then
AC_DEFINE(HAVE_SSE4_SUPPORT)
fi
+LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4])
dnl Check if -Wa,-mtune=i686 works.
AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl
[libc_cv_as_i686=yes],
[libc_cv_as_i686=no])
])
+LIBC_CONFIG_VAR([config-asflags-i686], [$libc_cv_as_i686])
dnl Check if -mavx works.
AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl
if test $libc_cv_cc_avx = yes; then
AC_DEFINE(HAVE_AVX_SUPPORT)
fi
+LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx])
dnl Check if -msse2avx works.
AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
if test $libc_cv_cc_sse2avx = yes; then
AC_DEFINE(HAVE_SSE2AVX_SUPPORT)
fi
+LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx])
dnl Check if -mfma4 works.
AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
if test $libc_cv_cc_fma4 = yes; then
AC_DEFINE(HAVE_FMA4_SUPPORT)
fi
+LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4])
dnl Check if -mno-vzeroupper works.
AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl
[libc_cv_cc_novzeroupper=yes],
[libc_cv_cc_novzeroupper=no])
])
+LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper])
dnl It is always possible to access static and hidden symbols in an
dnl position independent way.
if test "x$MIG" = xMISSING; then
as_fn_error $? "cannot find required build tool mig" "$LINENO" 5
fi
+config_vars="$config_vars
+MIG = $MIG"
### Sanity checks for Mach header installation
if test "x$MIG" = xMISSING; then
AC_MSG_ERROR([cannot find required build tool mig])
fi
+LIBC_CONFIG_VAR([MIG], [$MIG])
### Sanity checks for Mach header installation
AC_CHECK_HEADER(mach/mach_types.h,,
$as_echo "#define HAVE_AS_VIS3_SUPPORT 1" >>confdefs.h
fi
+config_vars="$config_vars
+have-as-vis3 = $libc_cv_sparc_as_vis3"
# Check for a GCC emitting GOTDATA relocations.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc gcc GOTDATA reloc support" >&5
if test $libc_cv_sparc_as_vis3 = yes; then
AC_DEFINE(HAVE_AS_VIS3_SUPPORT)
fi
+LIBC_CONFIG_VAR([have-as-vis3], [$libc_cv_sparc_as_vis3])
# Check for a GCC emitting GOTDATA relocations.
AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl
$as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h
fi
+config_vars="$config_vars
+config-cflags-sse4 = $libc_cv_cc_sse4"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
$as_echo_n "checking for AVX support... " >&6; }
$as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h
fi
+config_vars="$config_vars
+config-cflags-avx = $libc_cv_cc_avx"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5
$as_echo_n "checking for AVX encoding of SSE instructions... " >&6; }
$as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
fi
+config_vars="$config_vars
+config-cflags-sse2avx = $libc_cv_cc_sse2avx"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
$as_echo_n "checking for FMA4 support... " >&6; }
$as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
fi
+config_vars="$config_vars
+have-mfma4 = $libc_cv_cc_fma4"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
$as_echo_n "checking for -mno-vzeroupper support... " >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
$as_echo "$libc_cv_cc_novzeroupper" >&6; }
+config_vars="$config_vars
+config-cflags-novzeroupper = $libc_cv_cc_novzeroupper"
$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
if test $libc_cv_cc_sse4 = yes; then
AC_DEFINE(HAVE_SSE4_SUPPORT)
fi
+LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4])
dnl Check if -mavx works.
AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl
if test $libc_cv_cc_avx = yes; then
AC_DEFINE(HAVE_AVX_SUPPORT)
fi
+LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx])
dnl Check if -msse2avx works.
AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
if test $libc_cv_cc_sse2avx = yes; then
AC_DEFINE(HAVE_SSE2AVX_SUPPORT)
fi
+LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx])
dnl Check if -mfma4 works.
AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
if test $libc_cv_cc_fma4 = yes; then
AC_DEFINE(HAVE_FMA4_SUPPORT)
fi
+LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4])
dnl Check if -mno-vzeroupper works.
AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl
[libc_cv_cc_novzeroupper=yes],
[libc_cv_cc_novzeroupper=no])
])
+LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper])
dnl It is always possible to access static and hidden symbols in an
dnl position independent way.