Commit f3f1cf84 authored by Rich Salz's avatar Rich Salz Committed by Rich Salz
Browse files

Move to REF_DEBUG, for consistency.



Add utility macros REF_ASSERT_NOT and REF_PRINT_COUNT
This is also RT 4181

Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
parent 7823d792
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4,6 +4,9 @@

 Changes between 1.0.2f and 1.1.0  [xx XXX xxxx]

  *) Rename REF_CHECK to REF_DEBUG.
     [Rich Salz]

  *) New "unified" build system

     The "unified" build system is aimed to be a common system for all
+6 −6
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
    "vos-gcc" => {
        cc               => "gcc",
        cflags           => "-Wall -DOPENSSL_SYS_VOS -D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
        debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG",
        debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
        release_cflags   => "-O3",
        thread_cflag     => "(unknown)",
        sys_id           => "VOS",
@@ -134,7 +134,7 @@
        # -mcpu=ultrasparc
        inherit_from     => [ "solaris-sparcv7-gcc", asm("sparcv9_asm") ],
        cflags           => add_before(" ", "-m32 -mcpu=ultrasparc"),
        debug_cflags     => "-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -O -g -pedantic -ansi -Wshadow -Wno-long-long -D__EXTENSIONS__",
        debug_cflags     => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -O -g -pedantic -ansi -Wshadow -Wno-long-long -D__EXTENSIONS__",
    },
    "solaris64-sparcv9-gcc" => {
        inherit_from     => [ "solaris-sparcv9-gcc" ],
@@ -152,7 +152,7 @@
        inherit_from     => [ "solaris-common" ],
        cc               => "cc",
        cflags           => add_before("-xstrconst -Xa -DB_ENDIAN -DBN_DIV2W"),
        debug_cflags     => "-g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG",
        debug_cflags     => "-g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG",
        release_cflags   => "-xO5 -xdepend",
        thread_cflag     => "-D_REENTRANT",
        lflags           => add("-mt"),
@@ -496,7 +496,7 @@
    "linux-generic32" => {
        cc               => "gcc",
        cflags           => "-Wall",
        debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG",
        debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
        release_cflags   => "-O3",
        thread_cflag     => "-pthread",
        ex_libs          => "-ldl",
@@ -607,7 +607,7 @@
        inherit_from     => [ "linux-generic32", asm("x86_elf_asm") ],
        cc               => "gcc",
        cflags           => "-march=i486 -DL_ENDIAN -Wall",
        debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG",
        debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG",
        release_cflags   => "-O3 -fomit-frame-pointer",
        debug_ex_libs    => "-lefence",
        bn_ops           => "BN_LLONG",
@@ -1467,7 +1467,7 @@
    },
    "vxworks-ppc750-debug" => {
        cc               => "ccppc",
        cflags           => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g",
        cflags           => "-ansi -nostdinc -DPPC750 -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -fsigned-char -Wall -msoft-float -mlongcall -DCPU=PPC604 -I\$(WIND_BASE)/target/h -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DDEBUG -g",
        sys_id           => "VXWORKS",
        lflags           => "-r",
    },
+4 −4
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
    },
    "debug" => {
        cc               => "gcc",
        cflags           => "-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror",
        cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror",
        thread_cflag     => "(unknown)",
        ex_libs          => "-lefence",
    },
@@ -36,7 +36,7 @@
    "debug-linux-pentium" => {
        inherit_from     => [ "x86_elf_asm" ],
        cc               => "gcc",
        cflags           => "-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DL_ENDIAN -g -mcpu=pentium -Wall",
        cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DL_ENDIAN -g -mcpu=pentium -Wall",
        thread_cflag     => "-D_REENTRANT",
        ex_libs          => "-ldl",
        bn_ops           => "BN_LLONG",
@@ -45,7 +45,7 @@
    "debug-linux-ppro" => {
        inherit_from     => [ "x86_elf_asm" ],
        cc               => "gcc",
        cflags           => "-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DL_ENDIAN -g -mcpu=pentiumpro -Wall",
        cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DL_ENDIAN -g -mcpu=pentiumpro -Wall",
        thread_cflag     => "-D_REENTRANT",
        ex_libs          => "-ldl",
        bn_ops           => "BN_LLONG",
@@ -54,7 +54,7 @@
    "debug-linux-elf-noefence" => {
        inherit_from     => [ "x86_elf_asm" ],
        cc               => "gcc",
        cflags           => "-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DL_ENDIAN -g -march=i486 -Wall",
        cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DL_ENDIAN -g -march=i486 -Wall",
        thread_cflag     => "-D_REENTRANT",
        ex_libs          => "-ldl",
        bn_ops           => "BN_LLONG",
+4 −4
Original line number Diff line number Diff line
@@ -8,17 +8,17 @@
%targets = (
    "debug-ben" => {
        cc               => "gcc",
        cflags           => "$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -O2 -pipe",
        cflags           => "$gcc_devteam_warn -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -O2 -pipe",
        thread_cflag     => "(unknown)",
    },
    "debug-ben-openbsd" => {
        cc               => "gcc",
        cflags           => "-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe",
        cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe",
        thread_cflag     => "(unknown)",
    },
    "debug-ben-openbsd-debug" => {
        cc               => "gcc",
        cflags           => "-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe",
        cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe",
        thread_cflag     => "(unknown)",
    },
    "debug-ben-debug" => {
@@ -74,7 +74,7 @@
    },
    "debug-ben-strict" => {
        cc               => "gcc",
        cflags           => "-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe",
        cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe",
        thread_cflag     => "(unknown)",
    },
    "debug-ben-darwin64" => {
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimenta
# Minimum warning options... any contributions to OpenSSL should at least get
# past these.

my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Werror -DREF_CHECK -DDEBUG_UNUSED";
my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Wtype-limits -Werror -DREF_DEBUG -DDEBUG_UNUSED";

# These are used in addition to $gcc_devteam_warn when the compiler is clang.
# TODO(openssl-team): fix problems and investigate if (at least) the
Loading