aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/configure19
-rw-r--r--sysdeps/i386/configure.in8
-rw-r--r--sysdeps/i386/i686/Makefile16
3 files changed, 43 insertions, 0 deletions
diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure
index f0c2758a5e..7814b3b313 100644
--- a/sysdeps/i386/configure
+++ b/sysdeps/i386/configure
@@ -637,3 +637,22 @@ if test $libc_cv_cc_sse4 = yes; then
_ACEOF
fi
+
+{ $as_echo "$as_me:$LINENO: checking for assembler -mtune=i686 support" >&5
+$as_echo_n "checking for assembler -mtune=i686 support... " >&6; }
+if test "${libc_cv_as_i686+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -Wa,-mtune=i686 -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
+ (exit $ac_status); }; }; then
+ libc_cv_as_i686=yes
+else
+ libc_cv_as_i686=no
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_as_i686" >&5
+$as_echo "$libc_cv_as_i686" >&6; }
diff --git a/sysdeps/i386/configure.in b/sysdeps/i386/configure.in
index 12dceaf844..9fc7fa59fe 100644
--- a/sysdeps/i386/configure.in
+++ b/sysdeps/i386/configure.in
@@ -47,3 +47,11 @@ fi])
if test $libc_cv_cc_sse4 = yes; then
AC_DEFINE(HAVE_SSE4_SUPPORT)
fi
+
+dnl Check if -Wa,-mtune=i686 works.
+AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl
+if AC_TRY_COMMAND([${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null]); then
+ libc_cv_as_i686=yes
+else
+ libc_cv_as_i686=no
+fi])
diff --git a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile
index dbcf1c33d3..e6b2924584 100644
--- a/sysdeps/i386/i686/Makefile
+++ b/sysdeps/i386/i686/Makefile
@@ -9,3 +9,19 @@ stack-align-test-flags += -msse
ifeq ($(subdir),string)
sysdep_routines += cacheinfo
endif
+
+ifeq (yes,$(config-asflags-i686))
+CFLAGS-.o += -Wa,-mtune=i686
+CFLAGS-.os += -Wa,-mtune=i686
+CFLAGS-.op += -Wa,-mtune=i686
+CFLAGS-.og += -Wa,-mtune=i686
+CFLAGS-.ob += -Wa,-mtune=i686
+CFLAGS-.oS += -Wa,-mtune=i686
+
+ASFLAGS-.o += -Wa,-mtune=i686
+ASFLAGS-.os += -Wa,-mtune=i686
+ASFLAGS-.op += -Wa,-mtune=i686
+ASFLAGS-.og += -Wa,-mtune=i686
+ASFLAGS-.ob += -Wa,-mtune=i686
+ASFLAGS-.oS += -Wa,-mtune=i686
+endif