diff options
author | Steve Ellcey <sellcey@cavium.com> | 2017-12-14 18:30:38 +0000 |
---|---|---|
committer | Steve Ellcey <sje@gcc.gnu.org> | 2017-12-14 18:30:38 +0000 |
commit | 9d0e85af87d9e7fe3bd68d1647b7c47ad299f011 (patch) | |
tree | e5a3ca9f6062a7f43dd9730ab98439e6fe3ebc86 /libatomic/configure | |
parent | 2004617a8c2e67005230ebfcbdd1e4216b411bf1 (diff) | |
download | gcc-9d0e85af87d9e7fe3bd68d1647b7c47ad299f011.tar.gz |
Makefile.am (IFUNC_OPTIONS): Change aarch64 option from -march=armv8.1-a to -march=armv8-a+lse.
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.
From-SVN: r255659
Diffstat (limited to 'libatomic/configure')
-rwxr-xr-x | libatomic/configure | 67 |
1 files changed, 65 insertions, 2 deletions
diff --git a/libatomic/configure b/libatomic/configure index cbba8347fd5..47a9b985450 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -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 |