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
This commit is contained in:
Steve Ellcey 2017-12-14 18:30:38 +00:00 committed by Steve Ellcey
parent 2004617a8c
commit 9d0e85af87
8 changed files with 94 additions and 5 deletions

View 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

View 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

View 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

View 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])

67
libatomic/configure vendored
View File

@ -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

View 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

View 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
;;

View 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@