use-nscd = @use_nscd@
build-hardcoded-path-in-tests= @hardcoded_path_in_tests@
build-pt-chown = @build_pt_chown@
+enable-mpx = @enable_mpx@
+enable-mpx-write-only = @enable_mpx_write_only@
# Build tools.
CC = @CC@
CXX = @CXX@
BUILD_CC = @BUILD_CC@
CFLAGS = @CFLAGS@
+ASFLAGS = @ASFLAGS@
CPPFLAGS-config = @CPPFLAGS@
CPPUNDEFS = @CPPUNDEFS@
ASFLAGS-config = @ASFLAGS_config@
libc_cv_nss_crypt
all_warnings
force_install
+ASFLAGS
+enable_mpx_write_only
+enable_mpx
bindnow
hardcoded_path_in_tests
oldest_abi
enable_add_ons
enable_hidden_plt
enable_bind_now
+enable_mpx
+enable_mpx_write_only
enable_static_nss
enable_force_install
enable_kernel
for add-ons if no parameter given
--disable-hidden-plt do not hide internal function calls to avoid PLT
--enable-bind-now disable lazy relocations in DSOs
+ --enable-mpx turn on Intel MPX extension
+ --enable-mpx-write-only turn on Intel MPX extension
--enable-static-nss build static NSS modules [default=no]
--disable-force-install don't force installation of files from this package,
even if they are older than the installed files
+# Check whether --enable-mpx was given.
+if test "${enable_mpx+set}" = set; then :
+ enableval=$enable_mpx; enable_mpx=$enableval
+else
+ enable_mpx=no
+fi
+
+
+
+# Check whether --enable-mpx-write-only was given.
+if test "${enable_mpx_write_only+set}" = set; then :
+ enableval=$enable_mpx_write_only; enable_mpx_write_only=$enableval
+else
+ enable_mpx_write_only=no
+fi
+
+
+
+
+
+if test "$enable_mpx" = yes ; then
+ CFLAGS="$CFLAGS -g -fcheck-pointers -mmpx -fno-chkp-check-incomplete-type -fchkp-zero-input-bounds-for-main";
+ ASFLAGS="$ASFLAGS -g -D__CHKP__ -mmpx -Wa,-madd-bnd-prefix"
+fi
+
+if test "$enable_mpx_write_only" = yes ; then
+ CFLAGS="$CFLAGS -g -fcheck-pointers -fno-chkp-check-read -mmpx -fno-chkp-check-incomplete-type -fchkp-zero-input-bounds-for-main";
+ ASFLAGS="$ASFLAGS -g -D__CHKWR__ -mmpx -Wa,-madd-bnd-prefix"
+ enable_mpx=yes
+fi
+
# Check whether --enable-static-nss was given.
if test "${enable_static_nss+set}" = set; then :
enableval=$enable_static_nss; static_nss=$enableval
[bindnow=no])
AC_SUBST(bindnow)
+AC_ARG_ENABLE([mpx],
+ AC_HELP_STRING([--enable-mpx],
+ [turn on Intel MPX extension]),
+ [enable_mpx=$enableval],
+ [enable_mpx=no])
+AC_SUBST(enable_mpx)
+
+AC_ARG_ENABLE([mpx-write-only],
+ AC_HELP_STRING([--enable-mpx-write-only],
+ [turn on Intel MPX extension]),
+ [enable_mpx_write_only=$enableval],
+ [enable_mpx_write_only=no])
+AC_SUBST(enable_mpx_write_only)
+
+AC_SUBST(ASFLAGS)
+
+if test "$enable_mpx" = yes ; then
+ CFLAGS="$CFLAGS -g -fcheck-pointers -mmpx -fno-chkp-check-incomplete-type -fchkp-zero-input-bounds-for-main";
+ ASFLAGS="$ASFLAGS -g -D__CHKP__ -mmpx -Wa,-madd-bnd-prefix"
+fi
+
+if test "$enable_mpx_write_only" = yes ; then
+ CFLAGS="$CFLAGS -g -fcheck-pointers -fno-chkp-check-read -mmpx -fno-chkp-check-incomplete-type -fchkp-zero-input-bounds-for-main";
+ ASFLAGS="$ASFLAGS -g -D__CHKWR__ -mmpx -Wa,-madd-bnd-prefix"
+ enable_mpx=yes
+fi
+
dnl On some platforms we cannot use dynamic loading. We must provide
dnl static NSS modules.
AC_ARG_ENABLE([static-nss],
additional security risks to the system and you should enable it only if
you understand and accept those risks.
+@item --enable-mpx
+By default, Intel MPX extension is disabled. This option turns it on.
+@item --enable-mpx-write-only
+By default, Intel MPX extension is disabled. This option turns it on for
+write only checks.
+
@item --build=@var{build-system}
@itemx --host=@var{host-system}
These options are for cross-compiling. If you specify both options and