diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-09 14:12:57 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-09 14:12:57 +0000 |
commit | 85c0a25cac9bede4664b0ddaa95df5d0142af79a (patch) | |
tree | da6907a1c5c815841942c5773bfc6c02f7b889e8 /gcc/configure | |
parent | eb8ae8fc718711519de1ff9dcc4285d7742dd642 (diff) | |
download | gcc-85c0a25cac9bede4664b0ddaa95df5d0142af79a.tar.gz |
* configure.ac (gnu_indirect_function): New test.
* configure: Rebuilt.
* config.in (HAVE_GAS_INDIRECT_FUNCTION): New.
* defaults.h (IFUNC_ASM_TYPE): Provide default.
* doc/extend.texi (Function Attributes): Document ifunc.
* varasm.c (do_assemble_alias): Deal with ifuncs too.
c-family/
* c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
(handle_alias_attribute): ... here.
(handle_ifunc_attribute): New.
testsuite/
* lib/target-supports-dg.exp (dg-require-ifunc): New.
* lib/target-supports.exp (check_ifunc_available): New.
* gcc.dg/attr-ifunc-1.c: New.
* gcc.dg/attr-ifunc-2.c: New.
* gcc.dg/attr-ifunc-3.c: New.
* gcc.dg/attr-ifunc-4.c: New.
* gcc.dg/attr-ifunc-5.c: New.
* testsuite/g++.dg/ext/attr-ifunc-1.C
* testsuite/g++.dg/ext/attr-ifunc-2.C
* testsuite/g++.dg/ext/attr-ifunc-3.C
* testsuite/g++.dg/ext/attr-ifunc-4.C
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164110 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure index 240a8765b79..ebbead293e3 100755 --- a/gcc/configure +++ b/gcc/configure @@ -21327,6 +21327,48 @@ fi $as_echo "$gcc_cv_as_hidden" >&6; } +# gnu_indirect_function type is an extension proposed at +# http://groups.google/com/group/generic-abi/files. It allows dynamic runtime +# selection of function implementation +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for gnu_indirect_function" >&5 +$as_echo_n "checking assembler for gnu_indirect_function... " >&6; } +if test "${gcc_cv_as_indirect_function+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_indirect_function=no + if test $in_tree_gas = yes; then + if test $in_tree_gas_is_elf = yes \ + && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 20 \) \* 1000 + 1` + then gcc_cv_as_indirect_function=yes +fi + elif test x$gcc_cv_as != x; then + echo ' .type Foo, @gnu_indirect_function +Foo:' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then + gcc_cv_as_indirect_function=yes + else + echo "configure: failed program was" >&5 + cat conftest.s >&5 + fi + rm -f conftest.o conftest.s + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_indirect_function" >&5 +$as_echo "$gcc_cv_as_indirect_function" >&6; } + + +if test $gcc_cv_as_indirect_function = yes ; then + +$as_echo "#define HAVE_GAS_INDIRECT_FUNCTION 1" >>confdefs.h + +fi + if test $in_tree_ld != yes ; then ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` if test x"$ld_is_gold" = xyes; then |