Ensure the linker supports @unwind sections in libffi. From Mozilla bug 756740.
https://bugzilla.mozilla.org/show_bug.cgi?id=778414 Also tracked as issue #42. https://github.com/atgreen/libffi/issues/42
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2014-03-10 Landry Breuil <landry@openbsd.org>
|
||||||
|
|
||||||
|
* configure.ac: Ensure the linker supports @unwind sections in libffi.
|
||||||
|
|
||||||
2014-03-01 Anthony Green <green@moxielogic.com>
|
2014-03-01 Anthony Green <green@moxielogic.com>
|
||||||
|
|
||||||
* Makefile.am (EXTRA_DIST): Replace old scripts with
|
* Makefile.am (EXTRA_DIST): Replace old scripts with
|
||||||
|
|||||||
28
configure.ac
28
configure.ac
@@ -215,7 +215,7 @@ case "$host" in
|
|||||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||||
TARGET=MIPS; TARGETDIR=mips
|
TARGET=MIPS; TARGETDIR=mips
|
||||||
;;
|
;;
|
||||||
mips*-*-linux* | mips*-*-openbsd*)
|
mips*-*linux* | mips*-*-openbsd*)
|
||||||
# Support 128-bit long double for NewABI.
|
# Support 128-bit long double for NewABI.
|
||||||
HAVE_LONG_DOUBLE='defined(__mips64)'
|
HAVE_LONG_DOUBLE='defined(__mips64)'
|
||||||
TARGET=MIPS; TARGETDIR=mips
|
TARGET=MIPS; TARGETDIR=mips
|
||||||
@@ -460,12 +460,28 @@ AM_CONDITIONAL(FFI_EXEC_TRAMPOLINE_TABLE, test x$FFI_EXEC_TRAMPOLINE_TABLE = x1)
|
|||||||
AC_SUBST(FFI_EXEC_TRAMPOLINE_TABLE)
|
AC_SUBST(FFI_EXEC_TRAMPOLINE_TABLE)
|
||||||
|
|
||||||
if test x$TARGET = xX86_64; then
|
if test x$TARGET = xX86_64; then
|
||||||
AC_CACHE_CHECK([assembler supports unwind section type],
|
AC_CACHE_CHECK([toolchain supports unwind section type],
|
||||||
libffi_cv_as_x86_64_unwind_section_type, [
|
libffi_cv_as_x86_64_unwind_section_type, [
|
||||||
libffi_cv_as_x86_64_unwind_section_type=yes
|
cat > conftest1.s << EOF
|
||||||
echo '.section .eh_frame,"a",@unwind' > conftest.s
|
.text
|
||||||
if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
|
.globl foo
|
||||||
libffi_cv_as_x86_64_unwind_section_type=no
|
foo:
|
||||||
|
jmp bar
|
||||||
|
.section .eh_frame,"a",@unwind
|
||||||
|
bar:
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > conftest2.c << EOF
|
||||||
|
extern void foo();
|
||||||
|
int main(){foo();}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
libffi_cv_as_x86_64_unwind_section_type=no
|
||||||
|
# we ensure that we can compile _and_ link an assembly file containing an @unwind section
|
||||||
|
# since the compiler can support it and not the linker (ie old binutils)
|
||||||
|
if $CC -Wa,--fatal-warnings $CFLAGS -c conftest1.s > /dev/null 2>&1 && \
|
||||||
|
$CC conftest2.c conftest1.o > /dev/null 2>&1 ; then
|
||||||
|
libffi_cv_as_x86_64_unwind_section_type=yes
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
|
if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
|
||||||
|
|||||||
Reference in New Issue
Block a user