summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-09-29 07:31:48 +0930
committerAlan Modra <amodra@gcc.gnu.org>2016-09-29 07:31:48 +0930
commite9dda04f0760e78c5834b1beddab39cd562ad7c1 (patch)
tree7d561e18cf4ecf2d793c4c34f392eac627e6209d /gcc/configure.ac
parent91eaca5e32abab6179fba0e2543daf1cc1f64bde (diff)
downloadgcc-e9dda04f0760e78c5834b1beddab39cd562ad7c1.tar.gz
[RS6000] .gnu.attributes Tag_GNU_Power_ABI_FP
Extend this attribute to cover long double ABIs, for 64-bit too. This patch also corrects an error that crept in to code setting rs6000_passes_float. See the added comment. Passing IEEE128 values in vsx regs ought to set both Tag_GNU_Power_ABI_FP and Tag_GNU_Power_ABI_Vector. Also adds a new option, default on, that disables output of .gnu_attribute assembly directives. * config/rs6000/sysv4.opt (mgnu-attribute): New option. * doc/invoke.texi: Document it. * config/rs6000/rs6000.c (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): Define. (rs6000_passes_float): Comment. (rs6000_passes_long_double): New static var. (call_ABI_of_interest): Return false unless rs6000_gnu_attr is set. (init_cumulative_args): Set up to emit fp .gnu_attribute for ELF 64-bit ABIs as well as 32-bit ELF. Correct rs6000_passes_float to include fp values returned in vectors. Set rs6000_passes_long_double. (rs6000_function_arg_advance_1): Likewise for function args. (rs6000_elf_file_end): Emit fp .gnu_attribute for ELF 64-bit ABIs, and SPE. Emit long double tag value too. (rs6000_opt_vars): Add gnu-attr. * configure.ac (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): New ppc32 test. * configure: Regenerate. * config.in: Regenerate. From-SVN: r240601
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac45
1 files changed, 45 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 534f22e47de..a702f176974 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5322,6 +5322,51 @@ if test "x$gcc_cv_ld_clearcap" = xyes; then
fi
AC_MSG_RESULT($gcc_cv_ld_clearcap)
+case "$target" in
+ powerpc*-*-*)
+ case "$target" in
+ *le-*-linux*)
+ emul_name="-melf32lppc"
+ ;;
+ *)
+ emul_name="-melf32ppc"
+ ;;
+ esac
+ AC_CACHE_CHECK(linker .gnu.attributes long double support,
+ gcc_cv_ld_ppc_attr,
+ [gcc_cv_ld_ppc_attr=no
+ if test x"$ld_is_gold" = xyes; then
+ gcc_cv_ld_ppc_attr=yes
+ elif test $in_tree_ld = yes ; then
+ if test "$gcc_cv_gld_major_version" -eq 2 \
+ -a "$gcc_cv_gld_minor_version" -ge 28 \
+ -o "$gcc_cv_gld_major_version" -gt 2; then
+ gcc_cv_ld_ppc_attr=yes
+ fi
+ elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then
+ # check that merging the long double .gnu_attribute doesn't warn
+ cat > conftest1.s <<EOF
+ .gnu_attribute 4,1
+EOF
+ cat > conftest2.s <<EOF
+ .gnu_attribute 4,9
+EOF
+ if $gcc_cv_as -a32 -o conftest1.o conftest1.s > /dev/null 2>&1 \
+ && $gcc_cv_as -a32 -o conftest2.o conftest2.s > /dev/null 2>&1 \
+ && $gcc_cv_ld $emul_name -r -o conftest.o conftest1.o conftest2.o > /dev/null 2> conftest.err \
+ && test ! -s conftest.err; then
+ gcc_cv_ld_ppc_attr=yes
+ fi
+ rm -f conftest.err conftest.o conftest1.o conftest2.o conftest1.s conftest2.s
+ fi
+ ])
+ if test x$gcc_cv_ld_ppc_attr = xyes; then
+ AC_DEFINE(HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE, 1,
+ [Define if your PowerPC linker has .gnu.attributes long double support.])
+ fi
+ ;;
+esac
+
case "$target:$tm_file" in
powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
case "$target" in