public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-03-31 19:06 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:06 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=fc75f369633a37ea874fc308c42a4b45c9b77599

commit fc75f369633a37ea874fc308c42a4b45c9b77599
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2024-04-17 20:07 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:07 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cc579bf118a04c9e3322cf44712b776fe9434d57

commit cc579bf118a04c9e3322cf44712b776fe9434d57
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 24 ++++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 07bdd40a37..f22ea7c548 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -134,6 +134,30 @@ fi
 config_vars="$config_vars
 enable-cet = $enable_cet"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+printf %s "checking -msse2avx... " >&6; }
+if test ${libc_cv_cc_msse2avx+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_msse2avx=-msse2avx
+else $as_nop
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+printf "%s\n" "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 # Check if -mamx-tile works properly.
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mamx-tile works properly" >&5
 printf %s "checking whether -mamx-tile works properly... " >&6; }
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index c7b68544a2..78157222b8 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -61,6 +61,15 @@ elif test $enable_cet = permissive; then
 fi
 LIBC_CONFIG_VAR([enable-cet], [$enable_cet])
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 # Check if -mamx-tile works properly.
 AC_CACHE_CHECK(whether -mamx-tile works properly,
 	       libc_cv_x86_have_amx_tile, [dnl
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index cbe09d49f4..6fccf73d99 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -123,13 +123,13 @@ CFLAGS-s_sin-fma4.c = -mfma4
 CFLAGS-s_tan-fma4.c = -mfma4
 CFLAGS-s_sincos-fma4.c = -mfma4
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2024-04-02 15:53 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:53 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f240cca84edf08da02d8f896ded94d27c5e9e576

commit f240cca84edf08da02d8f896ded94d27c5e9e576
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 24 ++++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 04a534fa12..47cb31a37f 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -134,6 +134,30 @@ fi
 config_vars="$config_vars
 enable-cet = $enable_cet"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+printf %s "checking -msse2avx... " >&6; }
+if test ${libc_cv_cc_msse2avx+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_msse2avx=-msse2avx
+else $as_nop
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+printf "%s\n" "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 # Check if -mamx-tile works properly.
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mamx-tile works properly" >&5
 printf %s "checking whether -mamx-tile works properly... " >&6; }
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index c714c47351..3cd3006da8 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -61,6 +61,15 @@ elif test $enable_cet = permissive; then
 fi
 LIBC_CONFIG_VAR([enable-cet], [$enable_cet])
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 # Check if -mamx-tile works properly.
 AC_CACHE_CHECK(whether -mamx-tile works properly,
 	       libc_cv_x86_have_amx_tile, [dnl
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 6ddd50240c..f9710a75ae 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -119,13 +119,13 @@ CFLAGS-s_sin-fma4.c = -mfma4
 CFLAGS-s_tan-fma4.c = -mfma4
 CFLAGS-s_sincos-fma4.c = -mfma4
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2024-02-09 17:31 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:31 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7322a2fa46f25e930094837e57ee445857993066

commit 7322a2fa46f25e930094837e57ee445857993066
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 24 ++++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 418cc4a9b8..da6698e0cb 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -134,6 +134,30 @@ fi
 config_vars="$config_vars
 enable-cet = $enable_cet"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+printf %s "checking -msse2avx... " >&6; }
+if test ${libc_cv_cc_msse2avx+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_msse2avx=-msse2avx
+else $as_nop
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+printf "%s\n" "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
 
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index d1f803c02e..b299e85b59 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -61,5 +61,14 @@ elif test $enable_cet = permissive; then
 fi
 LIBC_CONFIG_VAR([enable-cet], [$enable_cet])
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 0253edf027..2346a5a27a 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -117,13 +117,13 @@ libm-sysdep_routines += \
   s_tan-avx \
 # libm-sysdep_routines
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2024-02-07 14:07 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:07 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=54b7b32800b28c99244459279d0d2636150a3d3c

commit 54b7b32800b28c99244459279d0d2636150a3d3c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 24 ++++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 418cc4a9b8..da6698e0cb 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -134,6 +134,30 @@ fi
 config_vars="$config_vars
 enable-cet = $enable_cet"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+printf %s "checking -msse2avx... " >&6; }
+if test ${libc_cv_cc_msse2avx+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_msse2avx=-msse2avx
+else $as_nop
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+printf "%s\n" "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
 
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index d1f803c02e..b299e85b59 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -61,5 +61,14 @@ elif test $enable_cet = permissive; then
 fi
 LIBC_CONFIG_VAR([enable-cet], [$enable_cet])
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 0253edf027..2346a5a27a 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -117,13 +117,13 @@ libm-sysdep_routines += \
   s_tan-avx \
 # libm-sysdep_routines
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2024-01-29 17:57 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 17:57 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4d47ccf34acde1c97a425c81d29f2bcedad995a5

commit 4d47ccf34acde1c97a425c81d29f2bcedad995a5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 24 ++++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 418cc4a9b8..da6698e0cb 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -134,6 +134,30 @@ fi
 config_vars="$config_vars
 enable-cet = $enable_cet"
 
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+printf %s "checking -msse2avx... " >&6; }
+if test ${libc_cv_cc_msse2avx+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  libc_cv_cc_msse2avx=-msse2avx
+else $as_nop
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+printf "%s\n" "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
 
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index d1f803c02e..b299e85b59 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -61,5 +61,14 @@ elif test $enable_cet = permissive; then
 fi
 LIBC_CONFIG_VAR([enable-cet], [$enable_cet])
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 0253edf027..2346a5a27a 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -117,13 +117,13 @@ libm-sysdep_routines += \
   s_tan-avx \
 # libm-sysdep_routines
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2023-12-21 18:53 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:53 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8ecbe80b4f804ee3c5894be84db4b7e2d98305a5

commit 8ecbe80b4f804ee3c5894be84db4b7e2d98305a5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index e307467afa..5b4984e5f6 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -29,6 +29,28 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
 
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 0253edf027..2346a5a27a 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -117,13 +117,13 @@ libm-sysdep_routines += \
   s_tan-avx \
 # libm-sysdep_routines
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2023-09-28 17:52 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:52 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3ad5d1c9ed2f1499691c943520089d7c3bacb8f4

commit 3ad5d1c9ed2f1499691c943520089d7c3bacb8f4
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index e307467afa..5b4984e5f6 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -29,6 +29,28 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
 
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 0253edf027..2346a5a27a 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -117,13 +117,13 @@ libm-sysdep_routines += \
   s_tan-avx \
 # libm-sysdep_routines
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2023-08-30 12:36 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:36 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5e88a335f16a24ed79965c3528bad34c962a2421

commit 5e88a335f16a24ed79965c3528bad34c962a2421
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index e307467afa..5b4984e5f6 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -29,6 +29,28 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
 
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 0253edf027..2346a5a27a 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -117,13 +117,13 @@ libm-sysdep_routines += \
   s_tan-avx \
 # libm-sysdep_routines
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2023-02-09 19:48 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:48 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e8f673b63a7c9cf4c6744f4732f429b92fbb00d2

commit e8f673b63a7c9cf4c6744f4732f429b92fbb00d2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index caa1ec82fb..90719085b6 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -57,13 +57,13 @@ libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx \
 			s_sincos-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-10-28 17:41 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:41 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=981e7ade4c76ea100b3867d0e56ae3f06e706075

commit 981e7ade4c76ea100b3867d0e56ae3f06e706075
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index caa1ec82fb..90719085b6 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -57,13 +57,13 @@ libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx \
 			s_sincos-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-10-04 12:59 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 12:59 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8c9ff449e5dc38882c43b9e89d0a0ef49a66f7e4

commit 8c9ff449e5dc38882c43b9e89d0a0ef49a66f7e4
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index caa1ec82fb..90719085b6 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -57,13 +57,13 @@ libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx \
 			s_sincos-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-06-09 21:19 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:19 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=647e080a2c107a33de7b6bcba5a7e48208095b15

commit 647e080a2c107a33de7b6bcba5a7e48208095b15
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 248162525b..66b519b242 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -55,13 +55,13 @@ libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx \
 			s_sincos-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-06-09 13:16 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:16 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=647e080a2c107a33de7b6bcba5a7e48208095b15

commit 647e080a2c107a33de7b6bcba5a7e48208095b15
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 248162525b..66b519b242 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -55,13 +55,13 @@ libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx \
 			s_sincos-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-06-03 14:05 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:05 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ad0b78dcc8e947ddca868b007c8b0cc45999cfd0

commit ad0b78dcc8e947ddca868b007c8b0cc45999cfd0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 14 +++++++-------
 3 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index 248162525b..66b519b242 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -55,13 +55,13 @@ libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx \
 			s_sincos-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sincos-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sincos-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-05-13 14:19 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:19 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=507ba0c8c2be81e4e1886627687f49fd8f32dcbd

commit 507ba0c8c2be81e4e1886627687f49fd8f32dcbd
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-05-12 19:33 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:33 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2bd7fb11d1de69bd1c77fbbf496778ed1ffbfe4e

commit 2bd7fb11d1de69bd1c77fbbf496778ed1ffbfe4e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-05-10 18:23 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:23 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c673fd98a028e3d832f1e67aaefdf637c0715be7

commit c673fd98a028e3d832f1e67aaefdf637c0715be7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-04-29 14:03 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:03 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bc7c054d454b3d4f065384ca664581707e245ce2

commit bc7c054d454b3d4f065384ca664581707e245ce2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-04-04 12:53 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:53 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=fb199a93b256725b029a863d832df63994214f7c

commit fb199a93b256725b029a863d832df63994214f7c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-03-29 20:29 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:29 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=87973b9911192890e796a3f2eaf6ce613cf3398e

commit 87973b9911192890e796a3f2eaf6ce613cf3398e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-03-16 18:02 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-03-16 18:02 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b39b7ec7d9a5aaf235496a2afa64f5d7343c7867

commit b39b7ec7d9a5aaf235496a2afa64f5d7343c7867
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-03-15 18:40 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-03-15 18:40 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b39b7ec7d9a5aaf235496a2afa64f5d7343c7867

commit b39b7ec7d9a5aaf235496a2afa64f5d7343c7867
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-03-11 17:24 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-03-11 17:24 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a96d69a690e1c720cad042521218234296d5565b

commit a96d69a690e1c720cad042521218234296d5565b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it
@ 2022-03-10 19:23 Adhemerval Zanella
  0 siblings, 0 replies; 25+ messages in thread
From: Adhemerval Zanella @ 2022-03-10 19:23 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c769aebbe41fb66a6f55b085ff322986de9a40c9

commit c769aebbe41fb66a6f55b085ff322986de9a40c9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 15:05:51 2022 -0300

    x86: Use -msse2avx iff compiler supports it

Diff:
---
 sysdeps/x86_64/configure              | 22 ++++++++++++++++++++++
 sysdeps/x86_64/configure.ac           |  9 +++++++++
 sysdeps/x86_64/fpu/multiarch/Makefile | 12 ++++++------
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index 44b6055e55..b113fc6c6c 100755
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -27,5 +27,27 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking -msse2avx" >&5
+$as_echo_n "checking -msse2avx... " >&6; }
+if ${libc_cv_cc_msse2avx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  libc_cv_cc_msse2avx=-msse2avx
+else
+  libc_cv_cc_msse2avx=
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_msse2avx" >&5
+$as_echo "$libc_cv_cc_msse2avx" >&6; }
+config_vars="$config_vars
+config-cflags-msse2avx = $libc_cv_cc_msse2avx"
+
 test -n "$critic_missing" && as_fn_error $? "
 *** $critic_missing" "$LINENO" 5
diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac
index 1215dcb1e4..5f176b1ef0 100644
--- a/sysdeps/x86_64/configure.ac
+++ b/sysdeps/x86_64/configure.ac
@@ -14,5 +14,14 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
+dnl Check if compiler supports -msse2avx
+AC_CACHE_CHECK(-msse2avx, libc_cv_cc_msse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+		   [libc_cv_cc_msse2avx=-msse2avx],
+		   [libc_cv_cc_msse2avx=])
+])
+LIBC_CONFIG_VAR([config-cflags-msse2avx],
+		[$libc_cv_cc_msse2avx])
+
 test -n "$critic_missing" && AC_MSG_ERROR([
 *** $critic_missing])
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
index ec796277a5..0721bc8c3f 100644
--- a/sysdeps/x86_64/fpu/multiarch/Makefile
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -50,12 +50,12 @@ CFLAGS-s_tan-fma4.c = -mfma4
 libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
 			e_atan2-avx s_sin-avx s_tan-avx
 
-CFLAGS-e_atan2-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_exp-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-e_log-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_atan-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_sin-avx.c = -msse2avx -DSSE2AVX
-CFLAGS-s_tan-avx.c = -msse2avx -DSSE2AVX
+CFLAGS-e_atan2-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_exp-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-e_log-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_atan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_sin-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
+CFLAGS-s_tan-avx.c = $(config-cflags-msse2avx) -DSSE2AVX
 endif
 
 ifeq ($(subdir),mathvec)


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2024-04-17 20:07 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 19:06 [glibc/azanella/clang] x86: Use -msse2avx iff compiler supports it Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-17 20:07 Adhemerval Zanella
2024-04-02 15:53 Adhemerval Zanella
2024-02-09 17:31 Adhemerval Zanella
2024-02-07 14:07 Adhemerval Zanella
2024-01-29 17:57 Adhemerval Zanella
2023-12-21 18:53 Adhemerval Zanella
2023-09-28 17:52 Adhemerval Zanella
2023-08-30 12:36 Adhemerval Zanella
2023-02-09 19:48 Adhemerval Zanella
2022-10-28 17:41 Adhemerval Zanella
2022-10-04 12:59 Adhemerval Zanella
2022-06-09 21:19 Adhemerval Zanella
2022-06-09 13:16 Adhemerval Zanella
2022-06-03 14:05 Adhemerval Zanella
2022-05-13 14:19 Adhemerval Zanella
2022-05-12 19:33 Adhemerval Zanella
2022-05-10 18:23 Adhemerval Zanella
2022-04-29 14:03 Adhemerval Zanella
2022-04-04 12:53 Adhemerval Zanella
2022-03-29 20:29 Adhemerval Zanella
2022-03-16 18:02 Adhemerval Zanella
2022-03-15 18:40 Adhemerval Zanella
2022-03-11 17:24 Adhemerval Zanella
2022-03-10 19:23 Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).