]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Remove the hacks to avoid floating-point issues in the tcpdump checks.
authorGuy Harris <[email protected]>
Tue, 4 Feb 2020 23:47:02 +0000 (15:47 -0800)
committerGuy Harris <[email protected]>
Tue, 4 Feb 2020 23:47:02 +0000 (15:47 -0800)
I can't seem to make those issues pop up on my (x86-64) machine, and, if
they do show up on any platforms, the best hack to handle it is probably
to have a special tcpdump flag to force it to do a floating-point
calculation and see what result is generated, and report the result, so
we know what it'll do with the numbers in the test files, and have
tests/TESTrun run tcpdump with that flag.

If those tests *do* fail, we'll know what calculations to do.

aclocal.m4
configure
tests/isis-seg-fault-1-v.tests
tests/lmp-v.tests

index 0168c595bdde8267ccdf7439eda50a968d90e071..6abc82be87812515e484129d260997cae12ca010 100644 (file)
@@ -102,14 +102,6 @@ AC_DEFUN(AC_LBL_C_INIT,
            # -Werror forces warnings to be errors.
            #
            ac_lbl_cc_force_warning_errors=-Werror
-
-           #
-           # Use -ffloat-store so that, on 32-bit x86, we don't
-           # do 80-bit arithmetic with the FPU; that way we should
-           # get the same results for floating-point calculations
-           # on x86-32 and x86-64.
-           #
-           AC_LBL_CHECK_COMPILER_OPT($1, -ffloat-store)
     else
            $2="$$2 -I/usr/local/include"
            LDFLAGS="$LDFLAGS -L/usr/local/lib"
index 1943642ab22f1b785ab7b05f3d571b6ffd0c5056..3135e68c062c10c8752cd94290c4200ed3699f43 100755 (executable)
--- a/configure
+++ b/configure
@@ -3392,62 +3392,11 @@ fi
 
 
 
-
     if test "$GCC" = yes ; then
            #
            # -Werror forces warnings to be errors.
            #
            ac_lbl_cc_force_warning_errors=-Werror
-
-           #
-           # Use -ffloat-store so that, on 32-bit x86, we don't
-           # do 80-bit arithmetic with the FPU; that way we should
-           # get the same results for floating-point calculations
-           # on x86-32 and x86-64.
-           #
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -ffloat-store option" >&5
-$as_echo_n "checking whether the compiler supports the -ffloat-store option... " >&6; }
-       save_CFLAGS="$CFLAGS"
-       if expr "x-ffloat-store" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -ffloat-store"
-       elif expr "x-ffloat-store" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -ffloat-store"
-       elif expr "x-ffloat-store" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -ffloat-store"
-       else
-           CFLAGS="$CFLAGS -ffloat-store"
-       fi
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-               CFLAGS="$save_CFLAGS"
-               V_CCOPT="$V_CCOPT -ffloat-store"
-
-else
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               CFLAGS="$save_CFLAGS"
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
     else
            V_INCLS="$V_INCLS -I/usr/local/include"
            LDFLAGS="$LDFLAGS -L/usr/local/lib"
@@ -3542,7 +3491,8 @@ $as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
                    if ${ac_cv_lbl_cc_const_proto+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 int
index f90fc4a79331ab4d35aa4cda66e2ccf280c748b4..857f5374aa6d6bdee9a0ebbe7f03920654096938 100644 (file)
@@ -6,7 +6,6 @@
 
 $testlist = [
     {
-        config_set => 'USING_GCC',
         name => 'isis-seg-fault-1-v',
         input => 'isis-seg-fault-1.pcapng',
         output => 'isis-seg-fault-1-v.out',
index 272325126e0580dfd5fa6bf258d21d09616959c4..01c4ede13460ec2a337d98121c30f24fac67bdaf 100644 (file)
@@ -8,7 +8,6 @@
 
 $testlist = [
     {
-        config_set => 'USING_GCC',
         name => 'lmp-v',
         input => 'lmp.pcap',
         output => 'lmp-v.out',