+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
## 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
$(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 \
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
+enable_aarch64_lse = @enable_aarch64_lse@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
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
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])
LIBAT_BUILD_VERSIONED_SHLIB_TRUE
OPT_LDFLAGS
SECTION_LDFLAGS
+enable_aarch64_lse
libtool_VERSION
MAINT
MAINTAINER_MODE_FALSE
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
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
{ $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
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
ARCH=aarch64
case "${target}" in
aarch64*-*-linux*)
- try_ifunc=yes
+ if test -n "$enable_aarch64_lse"; then
+ try_ifunc=yes
+ fi
;;
esac
;;
$(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 \
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
+enable_aarch64_lse = @enable_aarch64_lse@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@