ALLOW_UNALIGNED is not used anymore in the code. Also drop the
configure check that disables it with the undefined sanitizer.

        * configure.ac: Remove the CHECK_UNDEFINED test.
        * lib/eu-config.h: Remove the ALLOW_UNALIGNED definition.

Signed-off-by: Mark Wielaard <[email protected]>
---
 configure.ac    | 8 --------
 lib/eu-config.h | 9 ---------
 2 files changed, 17 deletions(-)

diff --git a/configure.ac b/configure.ac
index e1a8f98e9042..d381c5175a2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -353,7 +353,6 @@ AC_ARG_ENABLE([sanitize-undefined],
 if test "$use_undefined" = yes; then
   old_CFLAGS="$CFLAGS"
   old_CXXFLAGS="$CXXFLAGS"
-  # We explicitly use unaligned access when possible (see ALLOW_UNALIGNED)
   # We want to fail immediately on first error, don't try to recover.
   CFLAGS="$CFLAGS -fsanitize=undefined -fno-sanitize-recover"
   CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover"
@@ -362,13 +361,6 @@ if test "$use_undefined" = yes; then
         AC_MSG_WARN([gcc undefined behaviour sanitizer not available])
         CFLAGS="$old_CFLAGS" CXXFLAGS="$old_CXXFLAGS")
 fi
-case $use_undefined in
- yes) check_undefined_val=1 ;;
- *)   check_undefined_val=0 ;;
-esac
-AC_DEFINE_UNQUOTED(CHECK_UNDEFINED, $check_undefined_val,
-                  [Building with -fsanitize=undefined or not])
-
 AC_ARG_ENABLE([sanitize-address],
               AS_HELP_STRING([--enable-sanitize-address],
                              [Use gcc address sanitizer]),
diff --git a/lib/eu-config.h b/lib/eu-config.h
index 0bf2aa76e756..f0ef8a7ff898 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -64,15 +64,6 @@
   __attribute__ ((packed))
 #endif
 
-/* Define ALLOW_UNALIGNED if the architecture allows operations on
-   unaligned memory locations.  */
-#define SANITIZE_UNDEFINED 1
-#if (defined __i386__ || defined __x86_64__) && ! CHECK_UNDEFINED
-# define ALLOW_UNALIGNED       1
-#else
-# define ALLOW_UNALIGNED       0
-#endif
-
 #if DEBUGPRED
 # ifdef __x86_64__
 asm (".section predict_data, \"aw\"; .previous\n"
-- 
2.56.1

Reply via email to