]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2017-12-14 Steve Ellcey <sellcey@cavium.com>
authorsje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Dec 2017 18:30:38 +0000 (18:30 +0000)
committersje <sje@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Dec 2017 18:30:38 +0000 (18:30 +0000)
* Makefile.am (IFUNC_OPTIONS): Change aarch64
option from -march=armv8.1-a to -march=armv8-a+lse.
* configure.ac (*aarch64*): Check to see if
compiler understands -march=armv8-a+lse option.
* configure.tgt (*aarch64*): Only set try_ifunc
if compiler understands -march=armv8-a+lse option.
* Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* configure: Regenerate.
* aclocal.m4: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255659 138bc75d-0d04-0410-961f-82ee72b054a4

libatomic/ChangeLog
libatomic/Makefile.am
libatomic/Makefile.in
libatomic/aclocal.m4
libatomic/configure
libatomic/configure.ac
libatomic/configure.tgt
libatomic/testsuite/Makefile.in

index 39656cdffc186bb6d499c148ab7b5e597374fcc6..6e823a03eafa436c6050950b818e7165647e4bc6 100644 (file)
@@ -1,3 +1,16 @@
+2017-12-14  Steve Ellcey  <sellcey@cavium.com>
+
+       * Makefile.am (IFUNC_OPTIONS): Change aarch64
+       option from -march=armv8.1-a to -march=armv8-a+lse.
+       * configure.ac (*aarch64*): Check to see if
+       compiler understands -march=armv8-a+lse option.
+       * configure.tgt (*aarch64*): Only set try_ifunc
+       if compiler understands -march=armv8-a+lse option.
+       * Makefile.in: Regenerate.
+       * testsuite/Makefile.in: Regenerate.
+       * configure: Regenerate.
+       * aclocal.m4: Regenerate.
+
 2017-12-04  Steve Ellcey  <sellcey@cavium.com>
 
        * Makefile.am (ARCH_AARCH64_LINUX): Add IFUNC_OPTIONS and
index ec36c8ef207c601bc7b3012dba0df7784c75bdd7..21fd1bec1edcedac5cd4619950c01da366633593 100644 (file)
@@ -123,7 +123,7 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS)))
 ## On a target-specific basis, include alternates to be selected by IFUNC.
 if HAVE_IFUNC
 if ARCH_AARCH64_LINUX
-IFUNC_OPTIONS       = -march=armv8.1-a
+IFUNC_OPTIONS       = -march=armv8-a+lse
 libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS)))
 endif
 if ARCH_ARM_LINUX
index 3c3db62de9186a94cd13b73daad039e19f3b0648..c8f38be5835cf6d2df28c009b428c70daf06f581 100644 (file)
@@ -73,6 +73,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -258,6 +259,7 @@ datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
 dvidir = @dvidir@
+enable_aarch64_lse = @enable_aarch64_lse@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@
@@ -348,7 +350,7 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files)))
 libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
        _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \
        $(am__append_3) $(am__append_4)
-@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8.1-a
+@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse
 @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64
 @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586
 @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16
index 1363e7b9cbcbd1e9bd266475f6dd0199ae294308..5affc51637a25fac51771506eb343329bf5c3283 100644 (file)
@@ -1017,6 +1017,7 @@ m4_include([../config/lthostflags.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/override.m4])
 m4_include([../config/stdint.m4])
+m4_include([../config/warnings.m4])
 m4_include([../ltoptions.m4])
 m4_include([../ltsugar.m4])
 m4_include([../ltversion.m4])
index cbba8347fd5773a3113c9f8e86770c92616a6f04..47a9b985450add84f17272692fca0fb0cb5445e3 100755 (executable)
@@ -624,6 +624,7 @@ LIBAT_BUILD_VERSIONED_SHLIB_FALSE
 LIBAT_BUILD_VERSIONED_SHLIB_TRUE
 OPT_LDFLAGS
 SECTION_LDFLAGS
+enable_aarch64_lse
 libtool_VERSION
 MAINT
 MAINTAINER_MODE_FALSE
@@ -11120,7 +11121,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11123 "configure"
+#line 11124 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11226,7 +11227,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11229 "configure"
+#line 11230 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11522,6 +11523,68 @@ target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_thread_file" >&5
 $as_echo "$target_thread_file" >&6; }
 
+case "$target" in
+ *aarch64*)
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+enable_aarch64_lse=
+save_CFLAGS="$CFLAGS"
+for real_option in -march=armv8-a+lse; do
+  # Do the check with the no- prefix removed since gcc silently
+  # accepts any -Wno-* option on purpose
+  case $real_option in
+    -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
+    *) option=$real_option ;;
+  esac
+  as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5
+$as_echo_n "checking whether $CC supports $option... " >&6; }
+if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  CFLAGS="$option"
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_acx_Woption=yes"
+else
+  eval "$as_acx_Woption=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+eval ac_res=\$$as_acx_Woption
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
+  enable_aarch64_lse="$enable_aarch64_lse${enable_aarch64_lse:+ }$real_option"
+fi
+  done
+CFLAGS="$save_CFLAGS"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+    ;;
+esac
+
 # Get target configury.
 . ${srcdir}/configure.tgt
 if test -n "$UNSUPPORTED"; then
index 6b11f21a03eb15d258f0c955b42865aac335b282..cee01985a15ff5d633e23cf28b2fa9a4c93a495c 100644 (file)
@@ -157,6 +157,12 @@ AC_MSG_CHECKING([for thread model used by GCC])
 target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
 AC_MSG_RESULT([$target_thread_file])
 
+case "$target" in
+ *aarch64*)
+    ACX_PROG_CC_WARNING_OPTS([-march=armv8-a+lse],[enable_aarch64_lse])
+    ;;
+esac
+
 # Get target configury.
 . ${srcdir}/configure.tgt
 if test -n "$UNSUPPORTED"; then
index 388ae95e6f4570d9b6f04a7ed5ebb12ed3ee81bb..2f3bcc9626c152fd5a2cde3de7da967e748cdf82 100644 (file)
@@ -44,7 +44,9 @@ case "${target_cpu}" in
        ARCH=aarch64
        case "${target}" in
            aarch64*-*-linux*)
-               try_ifunc=yes
+               if test -n "$enable_aarch64_lse"; then
+                   try_ifunc=yes
+               fi
                ;;
        esac
        ;;
index a95e3ca8e8ab9a18e537984d9455fb266cb6a734..0a7ac4b4dc7d0d57338156bd798356f64d89109a 100644 (file)
@@ -61,6 +61,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
        $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/override.m4 \
        $(top_srcdir)/../config/stdint.m4 \
+       $(top_srcdir)/../config/warnings.m4 \
        $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
        $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
        $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
@@ -172,6 +173,7 @@ datadir = @datadir@
 datarootdir = @datarootdir@
 docdir = @docdir@
 dvidir = @dvidir@
+enable_aarch64_lse = @enable_aarch64_lse@
 enable_shared = @enable_shared@
 enable_static = @enable_static@
 exec_prefix = @exec_prefix@