aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-03-29 22:30:34 (GMT)
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-03-29 22:30:35 (GMT)
commitaec28b44e467a139d5f5cefe038e3f4a30dfc478 (patch)
tree683ea6a4fdd09801ee89dbb792e4c2d43d394795 /gcc-4.9
parent859df16485d512e69b529f57a9c747107dec23bc (diff)
parent41c11c2a743ea85be67d0840dbbb6d5125bb8798 (diff)
downloadtoolchain_gcc-aec28b44e467a139d5f5cefe038e3f4a30dfc478.zip
toolchain_gcc-aec28b44e467a139d5f5cefe038e3f4a30dfc478.tar.gz
toolchain_gcc-aec28b44e467a139d5f5cefe038e3f4a30dfc478.tar.bz2
Merge "Add top-level flag, --enable-libatomic-ifuncs=[yes/no]"
Diffstat (limited to 'gcc-4.9')
-rwxr-xr-xgcc-4.9/configure19
-rw-r--r--gcc-4.9/configure.ac12
-rw-r--r--gcc-4.9/libatomic/acinclude.m45
3 files changed, 36 insertions, 0 deletions
diff --git a/gcc-4.9/configure b/gcc-4.9/configure
index b209bc9..186f52f 100755
--- a/gcc-4.9/configure
+++ b/gcc-4.9/configure
@@ -785,6 +785,7 @@ with_debug_prefix_map
with_build_config
enable_vtable_verify
enable_bionic_libs
+enable_libatomic_ifuncs
enable_serial_configure
with_build_time_tools
enable_maintainer_mode
@@ -1485,6 +1486,7 @@ Optional Features:
Objective-C runtime
--enable-vtable-verify Enable vtable verification feature
--enable-bionic-libs Use bionic libstdc++ libraries
+ --enable-bionic-libs Enable/disable IFUNCs in libatomic library
--enable-serial-[{host,target,build}-]configure
force sequential configuration of sub-packages for
the host, target or build machine, or all
@@ -7240,6 +7242,23 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_bionic_libs" >&5
$as_echo "$enable_bionic_libs" >&6; }
+# Use same top-level configure hooks in libatomic.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-libatomic-ifuncs" >&5
+$as_echo_n "checking for --enable-libatomic-ifuncs... " >&6; }
+# Check whether --enable-libatomic-ifuncs was given.
+if test "${enable_libatomic_ifuncs+set}" = set; then :
+ enableval=$enable_libatomic_ifuncs; case "$enableval" in
+ yes) enable_libatomic_ifuncs=yes ;;
+ no) enable_libatomic_ifuncs=no ;;
+ *) enable_libatomic_ifuncs=yes;;
+ esac
+else
+ enable_libatomic_ifuncs=yes
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libatomic_ifuncs" >&5
+$as_echo "$enable_libatomic_ifuncs" >&6; }
+
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
diff --git a/gcc-4.9/configure.ac b/gcc-4.9/configure.ac
index e04fdfe..b78629a 100644
--- a/gcc-4.9/configure.ac
+++ b/gcc-4.9/configure.ac
@@ -2556,6 +2556,18 @@ AC_ARG_ENABLE(bionic-libs,
[enable_bionic_libs=no])
AC_MSG_RESULT($enable_bionic_libs)
+# Use same top-level configure hooks in libatomic.
+AC_MSG_CHECKING([for --enable-libatomic-ifuncs])
+AC_ARG_ENABLE(libatomic-ifuncs,
+[ --enable-bionic-libs Enable/disable IFUNCs in libatomic library ],
+[case "$enableval" in
+ yes) enable_libatomic_ifuncs=yes ;;
+ no) enable_libatomic_ifuncs=no ;;
+ *) enable_libatomic_ifuncs=yes;;
+ esac],
+[enable_libatomic_ifuncs=yes])
+AC_MSG_RESULT($enable_libatomic_ifuncs)
+
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
diff --git a/gcc-4.9/libatomic/acinclude.m4 b/gcc-4.9/libatomic/acinclude.m4
index a86e52b..34db650 100644
--- a/gcc-4.9/libatomic/acinclude.m4
+++ b/gcc-4.9/libatomic/acinclude.m4
@@ -197,6 +197,11 @@ AC_DEFUN([LIBAT_CHECK_IFUNC], [
void *foo_sel(void) { return foo_alt; }
int foo(void) __attribute__((ifunc("foo_sel")));],
[return foo();], libat_cv_have_ifunc=yes, libat_cv_have_ifunc=no)])
+
+ if test $enable_libatomic_ifuncs = no; then
+ libat_cv_have_ifunc=no
+ fi
+
LIBAT_DEFINE_YESNO([HAVE_IFUNC], [$libat_cv_have_ifunc],
[Define to 1 if the target supports __attribute__((ifunc(...))).])
])