Commit a836f142 by Rainer Orth

Fix HAVE_GAS_CFI_DIRECTIVE for x86_64-pc-solaris2.*

	* configure.ac (gcc_fn_eh_frame_ro): New function.
	(gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
	correct .eh_frame permissions.
	* configure: Regenerate.

From-SVN: r257424
parent 78be97b8
2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (gcc_fn_eh_frame_ro): New function.
(gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
correct .eh_frame permissions.
* configure: Regenerate.
2018-02-06 Andrew Jenner <andrew@codeourcery.com> 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
* doc/invoke.texi: Add section for the PowerPC SPE backend. Remove irrelevant options. * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
irrelevant options.
2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
......
...@@ -23181,6 +23181,13 @@ $as_echo "#define HAVE_AS_LEB128 0" >>confdefs.h ...@@ -23181,6 +23181,13 @@ $as_echo "#define HAVE_AS_LEB128 0" >>confdefs.h
fi fi
# Determine if an .eh_frame section is read-only.
gcc_fn_eh_frame_ro () {
$gcc_cv_as $1 -o conftest.o conftest.s > /dev/null 2>&1 && \
$gcc_cv_objdump -h conftest.o 2>/dev/null | \
sed -e '/.eh_frame/!d' -e N | grep READONLY > /dev/null
}
# Check if we have assembler support for unwind directives. # Check if we have assembler support for unwind directives.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cfi directives" >&5
$as_echo_n "checking assembler for cfi directives... " >&6; } $as_echo_n "checking assembler for cfi directives... " >&6; }
...@@ -23208,41 +23215,41 @@ else ...@@ -23208,41 +23215,41 @@ else
# If the linker used on Solaris (like Sun ld) isn't capable of merging # If the linker used on Solaris (like Sun ld) isn't capable of merging
# read-only and read-write sections, we need to make sure that the # read-only and read-write sections, we need to make sure that the
# assembler used emits read-write .eh_frame sections. # assembler used emits read-write .eh_frame sections.
if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then if test "x$gcc_cv_ld_ro_rw_mix" = xread-write; then
if test "x$gcc_cv_objdump" != x; then gcc_cv_as_cfi_directive=yes
if $gcc_cv_objdump -h conftest.o 2>/dev/null | \ elif test "x$gcc_cv_objdump" = x; then
sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then # No objdump, err on the side of caution.
gcc_cv_as_cfi_directive=no gcc_cv_as_cfi_directive=no
else else
case "$target" in if test x$gas = xyes; then
i?86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*) as_32_opt="--32"
# On Solaris/x86, make sure that GCC and assembler agree on using as_64_opt="--64"
# read-only .eh_frame sections for 64-bit.
if test x$gas = xyes; then
as_ix86_64_opt="--64"
else
as_ix86_64_opt="-xarch=amd64"
fi
if $gcc_cv_as $as_ix86_64_opt -o conftest.o conftest.s > /dev/null 2>&1 && \
$gcc_cv_objdump -h conftest.o 2>/dev/null | \
sed -e /.eh_frame/!d -e N | \
grep READONLY > /dev/null; then
gcc_cv_as_cfi_directive=yes
else
gcc_cv_as_cfi_directive=no
fi
;;
*)
gcc_cv_as_cfi_directive=yes
;;
esac
fi
else else
# no objdump, err on the side of caution as_32_opt="-m32"
gcc_cv_as_cfi_directive=no as_64_opt="-m64"
fi fi
else case "$target" in
gcc_cv_as_cfi_directive=yes sparc*-*-solaris2.*)
# On Solaris/SPARC, .eh_frame sections should always be read-write.
if gcc_fn_eh_frame_ro $as_32_opt \
|| gcc_fn_eh_frame_ro $as_64_opt; then
gcc_cv_as_cfi_directive=no
else
gcc_cv_as_cfi_directive=yes
fi
;;
i?86-*-solaris2.* | x86_64-*-solaris2.*)
# On Solaris/x86, make sure that GCC and assembler agree on using
# read-only .eh_frame sections for 64-bit.
if gcc_fn_eh_frame_ro $as_32_opt; then
gcc_cv_as_cfi_directive=no
elif gcc_fn_eh_frame_ro $as_64_opt; then
gcc_cv_as_cfi_directive=yes
else
gcc_cv_as_cfi_directive=no
fi
;;
esac
fi fi
;; ;;
*-*-*) *-*-*)
......
...@@ -2754,6 +2754,13 @@ L2:], ...@@ -2754,6 +2754,13 @@ L2:],
[AC_DEFINE(HAVE_AS_LEB128, 0, [AC_DEFINE(HAVE_AS_LEB128, 0,
[Define if your assembler supports .sleb128 and .uleb128.])]) [Define if your assembler supports .sleb128 and .uleb128.])])
# Determine if an .eh_frame section is read-only.
gcc_fn_eh_frame_ro () {
$gcc_cv_as $1 -o conftest.o conftest.s > /dev/null 2>&1 && \
$gcc_cv_objdump -h conftest.o 2>/dev/null | \
sed -e '/.eh_frame/!d' -e N | grep READONLY > /dev/null
}
# Check if we have assembler support for unwind directives. # Check if we have assembler support for unwind directives.
gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive, gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive,
,, ,,
...@@ -2769,41 +2776,41 @@ gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive, ...@@ -2769,41 +2776,41 @@ gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive,
# If the linker used on Solaris (like Sun ld) isn't capable of merging # If the linker used on Solaris (like Sun ld) isn't capable of merging
# read-only and read-write sections, we need to make sure that the # read-only and read-write sections, we need to make sure that the
# assembler used emits read-write .eh_frame sections. # assembler used emits read-write .eh_frame sections.
if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then if test "x$gcc_cv_ld_ro_rw_mix" = xread-write; then
if test "x$gcc_cv_objdump" != x; then gcc_cv_as_cfi_directive=yes
if $gcc_cv_objdump -h conftest.o 2>/dev/null | \ elif test "x$gcc_cv_objdump" = x; then
sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then # No objdump, err on the side of caution.
gcc_cv_as_cfi_directive=no gcc_cv_as_cfi_directive=no
else else
case "$target" in if test x$gas = xyes; then
i?86-*-solaris2.1[[0-9]]* | x86_64-*-solaris2.1[[0-9]]*) as_32_opt="--32"
# On Solaris/x86, make sure that GCC and assembler agree on using as_64_opt="--64"
# read-only .eh_frame sections for 64-bit.
if test x$gas = xyes; then
as_ix86_64_opt="--64"
else
as_ix86_64_opt="-xarch=amd64"
fi
if $gcc_cv_as $as_ix86_64_opt -o conftest.o conftest.s > /dev/null 2>&1 && \
$gcc_cv_objdump -h conftest.o 2>/dev/null | \
sed -e /.eh_frame/!d -e N | \
grep READONLY > /dev/null; then
gcc_cv_as_cfi_directive=yes
else
gcc_cv_as_cfi_directive=no
fi
;;
*)
gcc_cv_as_cfi_directive=yes
;;
esac
fi
else else
# no objdump, err on the side of caution as_32_opt="-m32"
gcc_cv_as_cfi_directive=no as_64_opt="-m64"
fi fi
else case "$target" in
gcc_cv_as_cfi_directive=yes sparc*-*-solaris2.*)
# On Solaris/SPARC, .eh_frame sections should always be read-write.
if gcc_fn_eh_frame_ro $as_32_opt \
|| gcc_fn_eh_frame_ro $as_64_opt; then
gcc_cv_as_cfi_directive=no
else
gcc_cv_as_cfi_directive=yes
fi
;;
i?86-*-solaris2.* | x86_64-*-solaris2.*)
# On Solaris/x86, make sure that GCC and assembler agree on using
# read-only .eh_frame sections for 64-bit.
if gcc_fn_eh_frame_ro $as_32_opt; then
gcc_cv_as_cfi_directive=no
elif gcc_fn_eh_frame_ro $as_64_opt; then
gcc_cv_as_cfi_directive=yes
else
gcc_cv_as_cfi_directive=no
fi
;;
esac
fi fi
;; ;;
*-*-*) *-*-*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment