fi
fi
+AC_ARG_ENABLE([mpers],
+ [AS_HELP_STRING([--enable-mpers=yes|no|check],
+ [whether to enable multiple personalities support required
+ for proper decoding of structures used by tracees with
+ personalities that differ from the personality of strace,
+ default is yes.])],
+ [case "$enableval" in
+ yes|no|check) enable_mpers="$enableval" ;;
+ *) AC_MSG_ERROR([bad value $enableval for enable-mpers option.
+ Valid options are: yes, no, check.]) ;;
+ esac],
+ [enable_mpers=yes])
+
st_MPERS([m32], [aarch64|powerpc64|riscv|sparc64|tile|x32|x86_64])
st_MPERS([mx32], [x86_64])
build/Makefile:
mkdir -p $(@D)
- cd $(@D); sh ../configure --prefix=/usr $(CONFIG_OPTS)
+ cd $(@D); sh ../configure --enable-mpers=check --prefix=/usr $(CONFIG_OPTS)
build64/Makefile:
mkdir -p $(@D)
- cd $(@D); CC="$(CC64)" sh ../configure --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
+ cd $(@D); CC="$(CC64)" sh ../configure --enable-mpers=check --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
clean:
dh_testdir
case "$arch" in
[$2])
+ if test "$enable_mpers" = no; then
+ st_cv_runtime=no
+ st_cv_mpers=no
+ else
+
AH_TEMPLATE([HAVE_GNU_STUBS_32_H],
[Define to 1 if you have the <gnu/stubs-32.h> header file.])
AH_TEMPLATE([HAVE_GNU_STUBS_X32_H],
fi
fi
CFLAGS="$saved_CFLAGS"
+
+ fi
+
+ test "$st_cv_mpers" = yes ||
+ st_cv_mpers=no
+ AC_MSG_CHECKING([whether to enable $1 personality support])
+ AC_MSG_RESULT([$st_cv_mpers])
+ if test "$enable_mpers" = yes && test "$st_cv_mpers" != yes; then
+ AC_MSG_ERROR([Cannot enable $1 personality support])
+ fi
;;
*)
printf 'kernel-headers %%s.%%s.%%s\n' $(($kver/65536)) $(($kver/256%%256)) $(($kver%%256))
echo 'END OF BUILD ENVIRONMENT INFORMATION'
-%configure
+%configure --enable-mpers=check
make %{?_smp_mflags}
%install