freebsd-ports/devel/libffi33/files/patch-configure
Gleb Popov 957f31fc71 devel/libffi33: Add new port.
This is a compat port needed mainly for binaries downloaded by devel/stack.
See the commit message for devel/libffi321 and the linked PR for detailed
explanation.
2022-05-30 22:09:38 +03:00

23 lines
951 B
Text

--- configure.orig 2020-08-20 10:54:03 UTC
+++ configure
@@ -18545,17 +18545,11 @@ if ${libffi_cv_ro_eh_frame+:} false; then :
$as_echo_n "(cached) " >&6
else
- libffi_cv_ro_eh_frame=no
+ libffi_cv_ro_eh_frame=yes
echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
if $CC $CFLAGS -c -fpic -fexceptions -o conftest.o conftest.c > /dev/null 2>&1; then
- objdump -h conftest.o > conftest.dump 2>&1
- libffi_eh_frame_line=`grep -n eh_frame conftest.dump | cut -d: -f 1`
- if test "x$libffi_eh_frame_line" != "x"; then
- libffi_test_line=`expr $libffi_eh_frame_line + 1`p
- sed -n $libffi_test_line conftest.dump > conftest.line
- if grep READONLY conftest.line > /dev/null; then
- libffi_cv_ro_eh_frame=yes
- fi
+ if readelf -WS conftest.o | grep -q -n 'eh_frame .* WA'; then
+ libffi_cv_ro_eh_frame=no
fi
fi
rm -f conftest.*