[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Fri Mar 9 13:08:07 UTC 2018


The branch master has been updated
       via  58d6be5b5de7c46e0c67438bc11d96e717578386 (commit)
       via  68b8bcf49c84b74e3d5560c50113e879f872d21a (commit)
      from  0244234d5d64b96d251fc86371bccbca6cfc52b5 (commit)


- Log -----------------------------------------------------------------
commit 58d6be5b5de7c46e0c67438bc11d96e717578386
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Mar 9 12:39:01 2018 +0100

    Display the library building flags
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5560)

commit 68b8bcf49c84b74e3d5560c50113e879f872d21a
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Mar 6 21:09:05 2018 +0100

    Configure et al: Move the definition of library only flags
    
    We're currently using the attributes 'defines', 'cppflags', 'cflags'
    etc quite liberally, with no regard for where that ends up.  Quite a
    few of those flags are actually only relevant for the libraries
    (mostly libcrypto), so it's safe to say that those could be applied to
    the libraries only.
    
    So, we move some of those flags to 'lib_defines', 'lib_cppflags',
    'lib_cflags', etc.
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5560)

-----------------------------------------------------------------------

Summary of changes:
 Configurations/00-base-templates.conf |   3 +
 Configurations/10-main.conf           | 166 ++++++++++++++++++----------------
 Configurations/descrip.mms.tmpl       |  28 +++---
 Configurations/unix-Makefile.tmpl     |  15 ++-
 Configurations/windows-makefile.tmpl  |  16 ++--
 Configure                             |  58 ++++++------
 crypto/build.info                     |   2 +-
 7 files changed, 159 insertions(+), 129 deletions(-)

diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf
index 310a370..a1837ca 100644
--- a/Configurations/00-base-templates.conf
+++ b/Configurations/00-base-templates.conf
@@ -8,6 +8,9 @@ my %targets=(
 	lflags		=> "",
 	defines		=> [],
 	includes	=> [],
+	lib_cflags	=> "",
+	lib_cppflags	=> "",
+	lib_defines	=> [],
 	thread_scheme	=> "(unknown)", # Assume we don't know
 	thread_defines	=> [],
 
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 6e7f2d1..65f08b0 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -192,7 +192,8 @@ my %targets = (
         CFLAGS           => picker(default => "-Wall",
                                    debug   => "-O0 -g",
                                    release => "-O3"),
-        cppflags         => "-D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
+        cppflags         => "-D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES",
+        lib_cppflags     => "-DB_ENDIAN",
         thread_scheme    => "(unknown)",
         sys_id           => "VOS",
         lflags           => add("-Wl,-map"),
@@ -204,7 +205,7 @@ my %targets = (
     "solaris-common" => {
         inherit_from     => [ "BASE_unix" ],
         template         => 1,
-        cppflags         => "-DFILIO_H",
+        lib_cppflags     => "-DFILIO_H",
         ex_libs          => add("-lsocket -lnsl -ldl"),
         dso_scheme       => "dlfcn",
         thread_scheme    => "pthreads",
@@ -222,7 +223,7 @@ my %targets = (
                                               debug   => "-O0 -g",
                                               release => "-O3 -fomit-frame-pointer")),
         cflags           => add(threads("-pthread")),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         ex_libs          => add(threads("-pthread")),
         bn_ops           => "BN_LLONG",
         shared_cflag     => "-fPIC",
@@ -243,7 +244,7 @@ my %targets = (
                                               debug   => "-O0 -g",
                                               release => "-O3")),
         cflags           => add_before("-m64", threads("-pthread")),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         ex_libs          => add(threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
@@ -271,7 +272,8 @@ my %targets = (
         CFLAGS           => add_before(picker(debug   => "-g",
                                               release => "-xO5 -xdepend -xbuiltin")),
         cflags           => add_before("-xarch=generic64 -xstrconst -Xa"),
-        cppflags         => add("-DL_ENDIAN", threads("-D_REENTRANT")),
+        cppflags         => add(threads("-D_REENTRANT")),
+        lib_cppflags     => add("-DL_ENDIAN"),
         thread_scheme    => "pthreads",
         lflags           => add(threads("-mt")),
         ex_libs          => add(threads("-lpthread")),
@@ -290,7 +292,7 @@ my %targets = (
                                               debug   => "-O0 -g",
                                               release => "-O3")),
         cflags           => add(threads("-pthread")),
-        cppflags         => add("-DB_ENDIAN -DBN_DIV2W"),
+        lib_cppflags     => add("-DB_ENDIAN -DBN_DIV2W"),
         ex_libs          => add(threads("-pthread")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         shared_cflag     => "-fPIC",
@@ -323,8 +325,8 @@ my %targets = (
         CFLAGS           => add_before(picker(debug   => "-g",
                                               release => "-xO5 -xdepend")),
         cflags           => add_before("-xstrconst -Xa"),
-        cppflags         => add("-DB_ENDIAN -DBN_DIV2W",
-                                threads("-D_REENTRANT")),
+        cppflags         => add(threads("-D_REENTRANT")),
+        lib_cppflags     => add("-DB_ENDIAN -DBN_DIV2W"),
         lflags           => add(threads("-mt")),
         ex_libs          => add(threads("-lpthread")),
         bn_ops           => "BN_LLONG RC4_CHAR",
@@ -357,6 +359,8 @@ my %targets = (
         cflags           => "-mabi=n32",
         cppflags         => combine("-DB_ENDIAN -DBN_DIV3W",
                                     threads("-D_SGI_MP_SOURCE")),
+        cppflags         => threads("-D_SGI_MP_SOURCE"),
+        lib_cppflags     => "-DB_ENDIAN -DBN_DIV3W",
         ex_libs          => add(threads("-lpthread")),
         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT",
         thread_scheme    => "pthreads",
@@ -372,8 +376,8 @@ my %targets = (
         CFLAGS           => picker(debug   => "-g -O0",
                                    release => "-O2"),
         cflags           => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared",
-        cppflags         => combine("-DB_ENDIAN -DBN_DIV3W",
-                                    threads("-D_SGI_MP_SOURCE")),
+        cppflags         => threads("-D_SGI_MP_SOURCE"),
+        lib_cppflags     => "-DB_ENDIAN -DBN_DIV3W",
         ex_libs          => add(threads("-lpthread")),
         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT",
         thread_scheme    => "pthreads",
@@ -390,8 +394,8 @@ my %targets = (
         CFLAGS           => picker(debug   => "-g -O0",
                                    release => "-O3"),
         cflags           => "-mabi=64 -mips4",
-        cppflags         => combine("-DB_ENDIAN -DBN_DIV3W",
-                                    threads("-D_SGI_MP_SOURCE")),
+        cppflags         => threads("-D_SGI_MP_SOURCE"),
+        lib_cppflags     => "-DB_ENDIAN -DBN_DIV3W",
         ex_libs          => add(threads("-lpthread")),
         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthreads",
@@ -406,10 +410,9 @@ my %targets = (
         CC               => "cc",
         CFLAGS           => picker(debug   => "-g -O0",
                                    release => "-O2"),
-        cppflags         => threads("-D_SGI_MP_SOURCE"),
         cflags           => "-64 -mips4 -use_readonly_const -G0 -rdata_shared",
-        cppflags         => combine("-DB_ENDIAN -DBN_DIV3W",
-                                    threads("-D_SGI_MP_SOURCE")),
+        cppflags         => threads("-D_SGI_MP_SOURCE"),
+        lib_cppflags     => "-DB_ENDIAN -DBN_DIV3W",
         ex_libs          => threads("-lpthread"),
         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthreads",
@@ -453,7 +456,7 @@ my %targets = (
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O3"),
         cflags           => add(threads("-pthread")),
-        cppflags         => "-DB_ENDIAN -DBN_DIV2W",
+        lib_cppflags     => "-DB_ENDIAN -DBN_DIV2W",
         ex_libs          => add("-Wl,+s -ldld", threads("-pthread")),
         bn_ops           => "BN_LLONG",
         thread_scheme    => "pthreads",
@@ -472,7 +475,8 @@ my %targets = (
         CC               => "gcc",
         CFLAGS           => combine(picker(debug   => "-O0 -g",
                                            release => "-O3")),
-        cppflags         => combine("-DB_ENDIAN", threads("-D_REENTRANT")),
+        cppflags         => threads("-D_REENTRANT"),
+        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add("-ldl"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         thread_scheme    => "pthreads",
@@ -491,8 +495,8 @@ my %targets = (
         CFLAGS           => picker(debug   => "+O0 +d -g",
                                    release => "+O3"),
         cflags           => "+Optrs_strongly_typed -Ae +ESlit",
-        cppflags         => combine("-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
-                                    threads("-D_REENTRANT")),
+        cppflags         => threads("-D_REENTRANT"),
+        lib_cppflags     => "-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY",
         ex_libs          => add("-Wl,+s -ldld",threads("-lpthread")),
         bn_ops           => "RC4_CHAR",
         thread_scheme    => "pthreads",
@@ -513,8 +517,8 @@ my %targets = (
         CFLAGS           => picker(debug   => "+O0 +d -g",
                                    release => "+O3") ,
         cflags           => "+DD64 +Optrs_strongly_typed -Ae +ESlit",
-        cppflags         => combine("-DB_ENDIAN -DMD32_XARRAY",
-                                    threads("-D_REENTRANT")),
+        cppflags         => threads("-D_REENTRANT") ,
+        lib_cppflags     => "-DB_ENDIAN -DMD32_XARRAY",
         ex_libs          => add("-ldl",threads("-lpthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         thread_scheme    => "pthreads",
@@ -533,7 +537,8 @@ my %targets = (
         CFLAGS           => picker(debug   => "+O0 +d -g",
                                    release => "+O2"),
         cflags           => "-Ae +DD32 +Olit=all -z",
-        cppflags         => combine("-DB_ENDIAN", threads("-D_REENTRANT")),
+        cppflags         => add(threads("-D_REENTRANT")),
+        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add("-ldl",threads("-lpthread")),
         bn_ops           => "SIXTY_FOUR_BIT",
         thread_scheme    => "pthreads",
@@ -550,7 +555,8 @@ my %targets = (
         CFLAGS           => picker(debug   => "+O0 +d -g",
                                    release => "+O3"),
         cflags           => "-Ae +DD64 +Olit=all -z",
-        cppflags         => combine("-DB_ENDIAN", threads("-D_REENTRANT")),
+        cppflags         => threads("-D_REENTRANT"),
+        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add("-ldl", threads("-lpthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthreads",
@@ -568,7 +574,7 @@ my %targets = (
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O3"),
         cflags           => add(threads("-pthread")),
-        cppflags         => "-DB_ENDIAN",
+        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT",
         thread_scheme    => "pthreads",
@@ -585,7 +591,7 @@ my %targets = (
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O3"),
         cflags           => combine("-mlp64", threads("-pthread")),
-        cppflags         => "-DB_ENDIAN",
+        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthreads",
@@ -602,8 +608,9 @@ my %targets = (
         inherit_from     => [ "BASE_unix" ],
         CC               => "gcc",
         CFLAGS           => "-O3",
-        cppflags         => "-DBN_DIV2W -D_POSIX_SOURCE -D_SOCKET_SOURCE",
-        includes         => add("/SYSLOG/PUB"),
+        cppflags         => "-D_POSIX_SOURCE -D_SOCKET_SOURCE",
+        includes         => [ "/SYSLOG/PUB" ],
+        lib_cppflags     => "-DBN_DIV2W",
         sys_id           => "MPE",
         lflags           => add("-L/SYSLOG/PUB"),
         ex_libs          => add("-lsyslog -lsocket -lcurses"),
@@ -661,7 +668,7 @@ my %targets = (
                                    release => "-O3"),
         cflags           => threads("-pthread"),
         cxxflags         => combine("-std=c++11", threads("-pthread")),
-        cppflags         => "-DOPENSSL_USE_NODELETE",
+        lib_cppflags     => "-DOPENSSL_USE_NODELETE",
         ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "BN_LLONG RC4_CHAR",
         thread_scheme    => "pthreads",
@@ -684,7 +691,7 @@ my %targets = (
         inherit_from     => [ "linux-generic64", asm("ppc64_asm") ],
         cflags           => add("-m64"),
         cxxflags         => add("-m64"),
-        cppflags         => add("-DB_ENDIAN"),
+        lib_cppflags     => add("-DB_ENDIAN"),
         perlasm_scheme   => "linux64",
         multilib         => "64",
     },
@@ -692,7 +699,7 @@ my %targets = (
         inherit_from     => [ "linux-generic64", asm("ppc64_asm") ],
         cflags           => add("-m64"),
         cxxflags         => add("-m64"),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         perlasm_scheme   => "linux64le",
     },
 
@@ -749,7 +756,7 @@ my %targets = (
         inherit_from     => [ "linux-generic32", asm("mips32_asm") ],
         cflags           => add("-mabi=32"),
         cxxflags         => add("-mabi=32"),
-        cppflags         => add("-DBN_DIV3W"),
+        lib_cppflags     => add("-DBN_DIV3W"),
         perlasm_scheme   => "o32",
     },
     # mips32 and mips64 below refer to contemporary MIPS Architecture
@@ -758,7 +765,7 @@ my %targets = (
         inherit_from     => [ "linux-generic32", asm("mips64_asm") ],
         cflags           => add("-mabi=n32"),
         cxxflags         => add("-mabi=n32"),
-        cppflags         => add("-DBN_DIV3W"),
+        lib_cppflags     => add("-DBN_DIV3W"),
         bn_ops           => "SIXTY_FOUR_BIT RC4_CHAR",
         perlasm_scheme   => "n32",
         multilib         => "32",
@@ -767,7 +774,7 @@ my %targets = (
         inherit_from     => [ "linux-generic64", asm("mips64_asm") ],
         cflags           => add("-mabi=64"),
         cxxflags         => add("-mabi=64"),
-        cppflags         => add("-DBN_DIV3W"),
+        lib_cppflags     => add("-DBN_DIV3W"),
         perlasm_scheme   => "64",
         multilib         => "64",
     },
@@ -778,7 +785,7 @@ my %targets = (
     "linux-elf" => {
         inherit_from     => [ "linux-generic32", asm("x86_elf_asm") ],
         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "BN_LLONG",
     },
     "linux-aout" => {
@@ -787,7 +794,7 @@ my %targets = (
         CFLAGS           => add(picker(default => "-Wall",
                                        debug   => "-O0 -g",
                                        release => "-O3 -fomit-frame-pointer")),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "BN_LLONG",
         thread_scheme    => "(unknown)",
         perlasm_scheme   => "a.out",
@@ -799,7 +806,7 @@ my %targets = (
         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
         cflags           => add("-m32"),
         cxxflags         => add("-m32"),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "BN_LLONG",
         perlasm_scheme   => "elf",
     },
@@ -813,7 +820,7 @@ my %targets = (
         inherit_from     => [ "linux-generic64", asm("x86_64_asm") ],
         cflags           => add("-m64"),
         cxxflags         => add("-m64"),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
         multilib         => "64",
@@ -828,7 +835,7 @@ my %targets = (
         inherit_from     => [ "linux-generic32", asm("x86_64_asm") ],
         cflags           => add("-mx32"),
         cxxflags         => add("-mx32"),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "SIXTY_FOUR_BIT",
         perlasm_scheme   => "elf32",
         multilib         => "x32",
@@ -843,7 +850,7 @@ my %targets = (
         inherit_from     => [ "linux-generic64", asm("s390x_asm") ],
         cflags           => add("-m64"),
         cxxflags         => add("-m64"),
-        cppflags         => add("-DB_ENDIAN"),
+        lib_cppflags     => add("-DB_ENDIAN"),
         perlasm_scheme   => "64",
         multilib         => "64",
     },
@@ -867,7 +874,7 @@ my %targets = (
         inherit_from     => [ "linux-generic32", asm("s390x_asm") ],
         cflags           => add("-m31 -Wa,-mzarch"),
         cxxflags         => add("-m31 -Wa,-mzarch"),
-        cppflags         => add("-DB_ENDIAN"),
+        lib_cppflags     => add("-DB_ENDIAN"),
         bn_asm_src       => sub { my $r=join(" ", at _); $r=~s|asm/s390x\.S|bn_asm.c|; $r; },
         perlasm_scheme   => "31",
         multilib         => "/highgprs",
@@ -1057,7 +1064,7 @@ my %targets = (
     "BSD-x86" => {
         inherit_from     => [ "BSD-generic32", asm("x86_asm") ],
         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "BN_LLONG",
         shared_target    => "bsd-shared",
         perlasm_scheme   => "a.out",
@@ -1070,26 +1077,26 @@ my %targets = (
     "BSD-sparcv8" => {
         inherit_from     => [ "BSD-generic32", asm("sparcv8_asm") ],
         cflags           => add("-mcpu=v8"),
-        cppflags         => add("-DB_ENDIAN"),
+        lib_cppflags     => add("-DB_ENDIAN"),
     },
     "BSD-sparc64" => {
         # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
         # simply *happens* to work around a compiler bug in gcc 3.3.3,
         # triggered by RIPEMD160 code.
         inherit_from     => [ "BSD-generic64", asm("sparcv9_asm") ],
-        cppflags         => add("-DB_ENDIAN -DMD32_REG_T=int"),
+        lib_cppflags     => add("-DB_ENDIAN -DMD32_REG_T=int"),
         bn_ops           => "BN_LLONG",
     },
 
     "BSD-ia64" => {
         inherit_from     => [ "BSD-generic64", asm("ia64_asm") ],
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
     },
 
     "BSD-x86_64" => {
         inherit_from     => [ "BSD-generic64", asm("x86_64_asm") ],
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
     },
@@ -1098,7 +1105,7 @@ my %targets = (
         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
         CC               => "gcc",
         CFLAGS           => "-fomit-frame-pointer -O3 -Wall",
-        cppflags         => "-DPERL5 -DL_ENDIAN",
+        lib_cppflags     => "-DPERL5 -DL_ENDIAN",
         ex_libs          => add("-ldl"),
         bn_ops           => "BN_LLONG",
         thread_scheme    => "(unknown)",
@@ -1130,7 +1137,7 @@ my %targets = (
         inherit_from     => [ "BASE_unix" ],
         CC               => "cc",
         CFLAGS           => "",
-        cppflags         => "-DL_ENDIAN -DTERMIO",
+        lib_cppflags     => "-DL_ENDIAN -DTERMIO",
         thread_scheme    => "(unknown)",
     },
     "QNX6" => {
@@ -1146,7 +1153,7 @@ my %targets = (
         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
         CC               => "gcc",
         CFLAGS           => "-O2 -Wall",
-        cppflags         => "-DL_ENDIAN",
+        lib_cppflags     => "-DL_ENDIAN",
         ex_libs          => add("-lsocket"),
         dso_scheme       => "dlfcn",
         shared_target    => "bsd-gcc-shared",
@@ -1169,7 +1176,7 @@ my %targets = (
         inherit_from     => [ "BASE_unix" ],
         CC               => "cc",
         cflags           => threads("-Kthread"),
-        cppflags         => "-DFILIO_H -DNO_STRINGS_H",
+        lib_cppflags     => "-DFILIO_H -DNO_STRINGS_H",
         ex_libs          => add("-lsocket -lnsl -lresolv -lx"),
         thread_scheme    => "uithreads",
     },
@@ -1178,7 +1185,7 @@ my %targets = (
         CC               => "cc",
         CFLAGS           => "-O",
         cflags           => threads("-Kthread"),
-        cppflags         => "-DFILIO_H",
+        lib_cppflags     => "-DFILIO_H",
         ex_libs          => add("-lsocket -lnsl -lresolv -lx"),
         thread_scheme    => "uithreads",
     },
@@ -1187,7 +1194,7 @@ my %targets = (
         CC               => "cc",
         CFLAGS           => "-O",
         cflags           => combine("-Kalloca", threads("-Kthread")),
-        cppflags         => "-DFILIO_H",
+        lib_cppflags     => "-DFILIO_H",
         ex_libs          => add("-lsocket -lnsl"),
         thread_scheme    => "uithreads",
         bn_ops           => "BN_LLONG",
@@ -1201,8 +1208,8 @@ my %targets = (
         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
         CC               => "gcc",
         CFLAGS           => "-O3 -fomit-frame-pointer -Wall",
-        cppflags         => add("-DL_ENDIAN -DFILIO_H",
-                                threads("-D_REENTRANT")),
+        cppflags         => add(threads("-D_REENTRANT")),
+        lib_cppflags     => add("-DL_ENDIAN -DFILIO_H"),
         ex_libs          => add("-lsocket -lnsl"),
         bn_ops           => "BN_LLONG",
         thread_scheme    => "pthreads",
@@ -1251,7 +1258,7 @@ my %targets = (
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O"),
         cflags           => add(threads("-pthread")),
-        cppflags         => "-DB_ENDIAN",
+        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add(threads("-pthread")),
         sys_id           => "AIX",
         bn_ops           => "BN_LLONG RC4_CHAR",
@@ -1269,7 +1276,7 @@ my %targets = (
         CFLAGS           => picker(debug   => "-O0 -g",
                                    release => "-O"),
         cflags           => combine("-maix64", threads("-pthread")),
-        cppflags         => "-DB_ENDIAN",
+        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add(threads("-pthread")),
         sys_id           => "AIX",
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
@@ -1288,7 +1295,8 @@ my %targets = (
                                    release => "-O"),
         cflags           => combine("-q32 -qmaxmem=16384 -qro -qroconst",
                                     threads("-qthreaded")),
-        cppflags         => combine("-DB_ENDIAN", threads("-D_THREAD_SAFE")),
+        cppflags         => threads("-D_THREAD_SAFE"),
+        lib_cppflags     => "-DB_ENDIAN",
         sys_id           => "AIX",
         bn_ops           => "BN_LLONG RC4_CHAR",
         thread_scheme    => "pthreads",
@@ -1307,7 +1315,8 @@ my %targets = (
                                    release => "-O"),
         cflags           => combine("-q64 -qmaxmem=16384 -qro -qroconst",
                                     threads("-qthreaded")),
-        cppflags         => combine("-DB_ENDIAN", threads("-D_THREAD_SAFE")),
+        cppflags         => threads("-D_THREAD_SAFE"),
+        lib_cppflags     => "-DB_ENDIAN",
         sys_id           => "AIX",
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         thread_scheme    => "pthreads",
@@ -1326,7 +1335,8 @@ my %targets = (
         CC               => "c89",
         CFLAGS           => "-O",
         cflags           => "-XLLML -XLLMK -XL",
-        cppflags         => "-DB_ENDIAN -DCHARSET_EBCDIC",
+        cppflags         => "-DCHARSET_EBCDIC",
+        lib_cppflags     => "-DB_ENDIAN",
         ex_libs          => add("-lsocket -lnsl"),
         bn_ops           => "THIRTY_TWO_BIT RC4_CHAR",
         thread_scheme    => "(unknown)",
@@ -1353,8 +1363,10 @@ my %targets = (
         coutflag         => "/Fo",
         cflags           => '-Gs0 -GF -Gy',
         defines          => add("OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN",
-                                "L_ENDIAN", "_CRT_SECURE_NO_DEPRECATE",
-                                "_WINSOCK_DEPRECATED_NO_WARNINGS",
+                                "_CRT_SECURE_NO_DEPRECATE",
+                                "_WINSOCK_DEPRECATED_NO_WARNINGS"),
+        lib_cflags       => add("/Zi /Fdossl_static"),
+        lib_defines      => add([ "L_ENDIAN" ],
                                 sub { my @defs = ();
                                       unless ($disabled{"zlib-dynamic"}) {
                                           my $zlib =
@@ -1365,7 +1377,6 @@ my %targets = (
                                       }
                                       return [ @defs ];
                                   }),
-        lib_cflags       => add("/Zi /Fdossl_static"),
         dso_cflags       => "/Zi /Fddso",
         bin_cflags       => "/Zi /Fdapp",
         shared_ldflag    => "/dll",
@@ -1490,9 +1501,10 @@ my %targets = (
                               ? ($disabled{shared} ? " /MT" : " /MD")
                               : " /MC"; }),
         cppflags         => sub { vc_wince_info()->{cppflags}; },
-        defines          => [ "UNICODE", "_UNICODE", "L_ENDIAN", "DSO_WIN32",
-                              "NO_CHMOD", "OPENSSL_SMALL_FOOTPRINT",
-                              "WIN32_LEAN_AND_MEAN" ],
+        defines          => [ "WIN32_LEAN_AND_MEAN" ],
+        lib_defines      => [ "L_ENDIAN", "DSO_WIN32", "NO_CHMOD",
+                              "OPENSSL_SMALL_FOOTPRINT" ],
+        lib_cppflags     => sub { vc_wince_info()->{cppflags}; },
         includes         =>
             add(combine(sub { defined(env('WCECOMPAT'))
                               ? '$(WCECOMPAT)/include' : (); },
@@ -1535,9 +1547,9 @@ my %targets = (
                                    debug   => "-g -O0",
                                    release => "-O3 -fomit-frame-pointer"),
         cflags           => "-m32",
-        cppflags         => combine("-DL_ENDIAN -DUNICODE -D_UNICODE",
-                                    "-DWIN32_LEAN_AND_MEAN",
+        cppflags         => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN",
                                     threads("-D_MT")),
+        lib_cppflags     => "-DL_ENDIAN",
         sys_id           => "MINGW32",
         ex_libs          => add("-lws2_32 -lgdi32 -lcrypt32"),
         bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
@@ -1567,9 +1579,9 @@ my %targets = (
                                    debug   => "-g -O0",
                                    release => "-O3"),
         cflags           => "-m64",
-        cppflags         => combine("-DL_ENDIAN -DUNICODE -D_UNICODE",
-                                    "-DWIN32_LEAN_AND_MEAN",
+        cppflags         => combine("-DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN",
                                     threads("-D_MT")),
+        lib_cppflags     => "-DL_ENDIAN",
         sys_id           => "MINGW64",
         ex_libs          => add("-lws2_32 -lgdi32 -lcrypt32"),
         bn_ops           => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
@@ -1590,7 +1602,7 @@ my %targets = (
         inherit_from     => [ "BASE_unix" ],
         CC               => "cc",
         CFLAGS           => "-O",
-        cppflags         => "-DL_ENDIAN",
+        lib_cppflags     => "-DL_ENDIAN",
         sys_id           => "UEFI",
     },
 
@@ -1612,7 +1624,7 @@ my %targets = (
         CFLAGS           => picker(default => "-Wall",
                                    debug   => "-g -O0",
                                    release => "-O3 -fomit-frame-pointer"),
-        cppflags         => "-DTERMIOS -DL_ENDIAN",
+        lib_cppflags     => "-DTERMIOS -DL_ENDIAN",
         sys_id           => "CYGWIN",
         bn_ops           => "BN_LLONG",
         thread_scheme    => "pthread",
@@ -1628,7 +1640,7 @@ my %targets = (
         CFLAGS           => picker(default => "-Wall",
                                    debug   => "-g -O0",
                                    release => "-O3"),
-        cppflags         => "-DTERMIOS -DL_ENDIAN",
+        lib_cppflags     => "-DTERMIOS -DL_ENDIAN",
         sys_id           => "CYGWIN",
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         thread_scheme    => "pthread",
@@ -1681,14 +1693,14 @@ my %targets = (
     "darwin-ppc-cc" => {
         inherit_from     => [ "darwin-common", asm("ppc32_asm") ],
         cflags           => add("-arch ppc -std=gnu9x -Wa,-force_cpusubtype_ALL"),
-        cppflags         => add("-DB_ENDIAN"),
+        lib_cppflags     => add("-DB_ENDIAN"),
         shared_cflag     => add("-fno-common"),
         perlasm_scheme   => "osx32",
     },
     "darwin64-ppc-cc" => {
         inherit_from     => [ "darwin-common", asm("ppc64_asm") ],
         cflags           => add("-arch ppc64 -std=gnu9x"),
-        cppflags         => add("-DB_ENDIAN"),
+        lib_cppflags     => add("-DB_ENDIAN"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         perlasm_scheme   => "osx64",
     },
@@ -1696,7 +1708,7 @@ my %targets = (
         inherit_from     => [ "darwin-common", asm("x86_asm") ],
         CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
         cflags           => add("-arch i386"),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "BN_LLONG RC4_INT",
         perlasm_scheme   => "macosx",
     },
@@ -1704,7 +1716,7 @@ my %targets = (
         inherit_from     => [ "darwin-common", asm("x86_64_asm") ],
         CFLAGS           => add("-Wall"),
         cflags           => add("-arch x86_64"),
-        cppflags         => add("-DL_ENDIAN"),
+        lib_cppflags     => add("-DL_ENDIAN"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "macosx",
     },
@@ -1753,7 +1765,7 @@ my %targets = (
         CC               => "gcc",
         CFLAGS           => "-O3 -fomit-frame-pointer -Wall",
         cflags           => threads("-pthread"),
-        cppflags         => "-DL_ENDIAN",
+        lib_cppflags     => "-DL_ENDIAN",
         ex_libs          => add("-ldl", threads("-pthread")),
         bn_ops           => "BN_LLONG",
         thread_scheme    => "pthreads",
@@ -1911,7 +1923,7 @@ my %targets = (
                               @{vms_info()->{disable_warns}};
                           @warnings
                               ? "/WARNINGS=DISABLE=(".join(",", at warnings).")" : (); }),
-        defines          =>
+        lib_defines      =>
             add("OPENSSL_USE_NODELETE",
                 sub {
                     return vms_info()->{def_zlib}
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl
index e8780e4..1972314 100644
--- a/Configurations/descrip.mms.tmpl
+++ b/Configurations/descrip.mms.tmpl
@@ -221,23 +221,28 @@ CNF_EX_LIBS={- join('', map{ ",$_" } @{$target{ex_libs}},
 LIB_ASFLAGS={- join(' ', $target{lib_asflags} || (),
                          @{$config{lib_asflags}},
                          '$(CNF_ASFLAGS)', '$(ASFLAGS)') -}
-LIB_DEFINES={- join('', (map { ",$_" } @{$target{lib_defines}},
+LIB_DEFINES={- our $lib_defines =
+               join('', (map { ",$_" } @{$target{lib_defines}},
                                        @{$target{shared_defines}},
                                        @{$config{lib_defines}},
-                                       @{$config{shared_defines}},
-                                       'OPENSSLDIR="""$(OPENSSLDIR_C)"""',
+                                       @{$config{shared_defines}});
+               join('', $lib_defines,
+                        (map { ",$_" } 'OPENSSLDIR="""$(OPENSSLDIR_C)"""',
                                        'ENGINESDIR="""$(ENGINESDIR_C)"""'),
                         '$(CNF_DEFINES)', '$(DEFINES)') -}
-LIB_INCLUDES={- join(',', @{$target{lib_includes}},
+LIB_INCLUDES={- our $lib_includes =
+                join(',', @{$target{lib_includes}},
                           @{$target{shared_includes}},
                           @{$config{lib_includes}},
                           @{$config{shared_includes}}) -}
-LIB_CPPFLAGS={- join('', "'qual_includes'",
-                         '/DEFINE=(__dummy$(LIB_DEFINES))',
-                         $target{lib_cppflags} || (),
+LIB_CPPFLAGS={- our $lib_cppflags =
+                join('', $target{lib_cppflags} || (),
                          $target{shared_cppflags} || (),
                          @{$config{lib_cppflags}},
-                         @{$config{shared_cppflag}},
+                         @{$config{shared_cppflag}});
+                join('', "'qual_includes'",
+                         '/DEFINE=(__dummy$(LIB_DEFINES))'
+                         $lib_cppflags,
                          '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
 LIB_CFLAGS={- join('', $target{lib_cflags} || (),
                        $target{shared_cflag} || (),
@@ -325,9 +330,10 @@ NO_INST_BIN_CFLAGS={- join('', $target{no_inst_bin_cflags}
 PERLASM_SCHEME={- $target{perlasm_scheme} -}
 
 # CPPFLAGS_Q is used for one thing only: to build up buildinf.h
-CPPFLAGS_Q={- (my $c = $cppflags1.$cppflags2) =~ s|"|""|g;
-              (my $d = $defines1.$defines2) =~ s|"|""|g;
-              my $i = join(',', $includes1 || (), $includes2 || ());
+CPPFLAGS_Q={- (my $c = $lib_cppflags.$cppflags2.$cppflags1) =~ s|"|""|g;
+              (my $d = $lib_defines.$defines2.$defines1) =~ s|"|""|g;
+              my $i = join(',', $lib_includes || (), $includes2 || (),
+                                $includes1 || ());
               my $x = $c;
               $x .= "/INCLUDE=($i)" if $i;
               $x .= "/DEFINE=($d)" if $d;
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index fc483f0..8230676 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -254,15 +254,18 @@ CNF_EX_LIBS={- join(' ', $target{ex_libs} || (),
 # Variables starting with BIN_ are used to build programs and their object
 # files.
 
-LIB_CPPFLAGS={- join(' ', $target{lib_cppflags} || (),
+LIB_CPPFLAGS={- our $lib_cppflags =
+                join(' ', $target{lib_cppflags} || (),
                           $target{shared_cppflag} || (),
                           (map { '-D'.$_ }
                                @{$config{lib_defines}},
-                               @{$config{shared_defines}},
+                               @{$config{shared_defines}}),
+                          @{$config{lib_cppflags}},
+                          @{$config{shared_cppflag}});
+                join(' ', $lib_cppflags,
+                          (map { '-D'.$_ }
                                'OPENSSLDIR="\"$(OPENSSLDIR)\""',
                                'ENGINESDIR="\"$(ENGINESDIR)\""'),
-                          @{$config{lib_cppflags}},
-                          @{$config{shared_cppflag}},
                           '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
 LIB_CFLAGS={- join(' ', $target{lib_cflags} || (),
                         $target{shared_cflag} || (),
@@ -316,7 +319,9 @@ BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
 # CPPFLAGS_Q is used for one thing only: to build up buildinf.h
 CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g;
               $cppflags2 =~ s|([\\"])|\\$1|g;
-              join(' ', $cppflags1 || (), $cppflags2 || ()) -}
+              $lib_cppflags =~ s|([\\"])|\\$1|g;
+              join(' ', $lib_cppflags || (), $cppflags2 || (),
+                        $cppflags1 || ()) -}
 
 PERLASM_SCHEME= {- $target{perlasm_scheme} -}
 
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index 83f893d..214619a 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -230,22 +230,25 @@ CNF_EX_LIBS={- join(' ', $target{ex_libs} || (),
 LIB_ASFLAGS={- join(' ', $target{lib_asflags} || (),
                          @{$config{lib_asflags}},
                          '$(CNF_ASFLAGS)', '$(ASFLAGS)') -}
-LIB_CPPFLAGS={- join(' ', $target{lib_cppflags} || (),
+LIB_CPPFLAGS={- our $lib_cppflags =
+                join(' ', $target{lib_cppflags} || (),
                           $target{shared_cppflag} || (),
                           (map { quotify_l("-D".$_) }
                                @{$target{lib_defines}},
                                @{$target{shared_defines}},
                                @{$config{lib_defines}},
-                               @{$config{shared_defines}},
-                               "OPENSSLDIR=\"$openssldir\"",
-                               "ENGINESDIR=\"$enginesdir\""),
+                               @{$config{shared_defines}}),
                           (map { quotify_l("-I".$_) }
                                @{$target{lib_includes}},
                                @{$target{shared_includes}},
                                @{$config{lib_includes}},
                                @{$config{shared_includes}}),
                           @{$config{lib_cppflags}},
-                          @{$config{shared_cppflag}},
+                          @{$config{shared_cppflag}});
+                join(' ', $lib_cppflags,
+                          (map { quotify_l("-D".$_) }
+                               "OPENSSLDIR=\"$openssldir\"",
+                               "ENGINESDIR=\"$enginesdir\""),
                           '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
 LIB_CFLAGS={- join(' ', $target{lib_cflags} || (),
                         $target{shared_cflag} || (),
@@ -294,7 +297,8 @@ BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
 # CPPFLAGS_Q is used for one thing only: to build up buildinf.h
 CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g;
               $cppflags2 =~ s|([\\"])|\\$1|g;
-              join(' ', $cppflags1 || (), $cppflags2 || ()) -}
+              join(' ', $lib_cppflags || (), $cppflags2 || (),
+                        $cppflags1 || ()) -}
 
 PERLASM_SCHEME= {- $target{perlasm_scheme} -}
 
diff --git a/Configure b/Configure
index 9cf3d75..016a9f3 100755
--- a/Configure
+++ b/Configure
@@ -1226,15 +1226,15 @@ if (!$disabled{dso} && $target{dso_scheme} ne "")
 	$target{dso_scheme} =~ tr/[a-z]/[A-Z]/;
 	if ($target{dso_scheme} eq "DLFCN")
 		{
-		unshift @{$config{defines}}, "DSO_DLFCN", "HAVE_DLFCN_H";
+		unshift @{$config{lib_defines}}, "DSO_DLFCN", "HAVE_DLFCN_H";
 		}
 	elsif ($target{dso_scheme} eq "DLFCN_NO_H")
 		{
-		unshift @{$config{defines}}, "DSO_DLFCN";
+		unshift @{$config{lib_defines}}, "DSO_DLFCN";
 		}
 	else
 		{
-		unshift @{$config{defines}}, "DSO_$target{dso_scheme}";
+		unshift @{$config{lib_defines}}, "DSO_$target{dso_scheme}";
 		}
 	}
 
@@ -1285,10 +1285,10 @@ if ($target{shared_target} eq "")
 	}
 
 if ($disabled{"dynamic-engine"}) {
-        push @{$config{defines}}, "OPENSSL_NO_DYNAMIC_ENGINE";
+        push @{$config{openssl_other_defines}}, "OPENSSL_NO_DYNAMIC_ENGINE";
         $config{dynamic_engines} = 0;
 } else {
-        push @{$config{defines}}, "OPENSSL_NO_STATIC_ENGINE";
+        push @{$config{openssl_other_defines}}, "OPENSSL_NO_STATIC_ENGINE";
         $config{dynamic_engines} = 1;
 }
 
@@ -1333,7 +1333,7 @@ if ($disabled{pic})
 	}
 else
 	{
-	push @{$config{defines}}, "OPENSSL_PIC";
+	push @{$config{lib_defines}}, "OPENSSL_PIC";
 	}
 
 if ($target{sys_id} ne "")
@@ -1343,65 +1343,65 @@ if ($target{sys_id} ne "")
 
 unless ($disabled{asm}) {
     $target{cpuid_asm_src}=$table{DEFAULTS}->{cpuid_asm_src} if ($config{processor} eq "386");
-    push @{$config{defines}}, "OPENSSL_CPUID_OBJ" if ($target{cpuid_asm_src} ne "mem_clr.c");
+    push @{$config{lib_defines}}, "OPENSSL_CPUID_OBJ" if ($target{cpuid_asm_src} ne "mem_clr.c");
 
     $target{bn_asm_src} =~ s/\w+-gf2m.c// if (defined($disabled{ec2m}));
 
     # bn-586 is the only one implementing bn_*_part_words
-    push @{$config{defines}}, "OPENSSL_BN_ASM_PART_WORDS" if ($target{bn_asm_src} =~ /bn-586/);
-    push @{$config{defines}}, "OPENSSL_IA32_SSE2" if (!$disabled{sse2} && $target{bn_asm_src} =~ /86/);
+    push @{$config{lib_defines}}, "OPENSSL_BN_ASM_PART_WORDS" if ($target{bn_asm_src} =~ /bn-586/);
+    push @{$config{lib_defines}}, "OPENSSL_IA32_SSE2" if (!$disabled{sse2} && $target{bn_asm_src} =~ /86/);
 
-    push @{$config{defines}}, "OPENSSL_BN_ASM_MONT" if ($target{bn_asm_src} =~ /-mont/);
-    push @{$config{defines}}, "OPENSSL_BN_ASM_MONT5" if ($target{bn_asm_src} =~ /-mont5/);
-    push @{$config{defines}}, "OPENSSL_BN_ASM_GF2m" if ($target{bn_asm_src} =~ /-gf2m/);
+    push @{$config{lib_defines}}, "OPENSSL_BN_ASM_MONT" if ($target{bn_asm_src} =~ /-mont/);
+    push @{$config{lib_defines}}, "OPENSSL_BN_ASM_MONT5" if ($target{bn_asm_src} =~ /-mont5/);
+    push @{$config{lib_defines}}, "OPENSSL_BN_ASM_GF2m" if ($target{bn_asm_src} =~ /-gf2m/);
 
     if ($target{sha1_asm_src}) {
-	push @{$config{defines}}, "SHA1_ASM"   if ($target{sha1_asm_src} =~ /sx86/ || $target{sha1_asm_src} =~ /sha1/);
-	push @{$config{defines}}, "SHA256_ASM" if ($target{sha1_asm_src} =~ /sha256/);
-	push @{$config{defines}}, "SHA512_ASM" if ($target{sha1_asm_src} =~ /sha512/);
+	push @{$config{lib_defines}}, "SHA1_ASM"   if ($target{sha1_asm_src} =~ /sx86/ || $target{sha1_asm_src} =~ /sha1/);
+	push @{$config{lib_defines}}, "SHA256_ASM" if ($target{sha1_asm_src} =~ /sha256/);
+	push @{$config{lib_defines}}, "SHA512_ASM" if ($target{sha1_asm_src} =~ /sha512/);
     }
     if ($target{rc4_asm_src} ne $table{DEFAULTS}->{rc4_asm_src}) {
-	push @{$config{defines}}, "RC4_ASM";
+	push @{$config{lib_defines}}, "RC4_ASM";
     }
     if ($target{md5_asm_src}) {
-	push @{$config{defines}}, "MD5_ASM";
+	push @{$config{lib_defines}}, "MD5_ASM";
     }
     $target{cast_asm_src}=$table{DEFAULTS}->{cast_asm_src} unless $disabled{pic}; # CAST assembler is not PIC
     if ($target{rmd160_asm_src}) {
-	push @{$config{defines}}, "RMD160_ASM";
+	push @{$config{lib_defines}}, "RMD160_ASM";
     }
     if ($target{aes_asm_src}) {
-	push @{$config{defines}}, "AES_ASM" if ($target{aes_asm_src} =~ m/\baes-/);;
+	push @{$config{lib_defines}}, "AES_ASM" if ($target{aes_asm_src} =~ m/\baes-/);;
 	# aes-ctr.fake is not a real file, only indication that assembler
 	# module implements AES_ctr32_encrypt...
-	push @{$config{defines}}, "AES_CTR_ASM" if ($target{aes_asm_src} =~ s/\s*aes-ctr\.fake//);
+	push @{$config{lib_defines}}, "AES_CTR_ASM" if ($target{aes_asm_src} =~ s/\s*aes-ctr\.fake//);
 	# aes-xts.fake indicates presence of AES_xts_[en|de]crypt...
-	push @{$config{defines}}, "AES_XTS_ASM" if ($target{aes_asm_src} =~ s/\s*aes-xts\.fake//);
+	push @{$config{lib_defines}}, "AES_XTS_ASM" if ($target{aes_asm_src} =~ s/\s*aes-xts\.fake//);
 	$target{aes_asm_src} =~ s/\s*(vpaes|aesni)-x86\.s//g if ($disabled{sse2});
-	push @{$config{defines}}, "VPAES_ASM" if ($target{aes_asm_src} =~ m/vpaes/);
-	push @{$config{defines}}, "BSAES_ASM" if ($target{aes_asm_src} =~ m/bsaes/);
+	push @{$config{lib_defines}}, "VPAES_ASM" if ($target{aes_asm_src} =~ m/vpaes/);
+	push @{$config{lib_defines}}, "BSAES_ASM" if ($target{aes_asm_src} =~ m/bsaes/);
     }
     if ($target{wp_asm_src} =~ /mmx/) {
         if ($config{processor} eq "386") {
 	    $target{wp_asm_src}=$table{DEFAULTS}->{wp_asm_src};
 	} elsif (!$disabled{"whirlpool"}) {
-	    push @{$config{defines}}, "WHIRLPOOL_ASM";
+	    push @{$config{lib_defines}}, "WHIRLPOOL_ASM";
 	}
     }
     if ($target{modes_asm_src} =~ /ghash-/) {
-	push @{$config{defines}}, "GHASH_ASM";
+	push @{$config{lib_defines}}, "GHASH_ASM";
     }
     if ($target{ec_asm_src} =~ /ecp_nistz256/) {
-	push @{$config{defines}}, "ECP_NISTZ256_ASM";
+	push @{$config{lib_defines}}, "ECP_NISTZ256_ASM";
     }
     if ($target{ec_asm_src} =~ /x25519/) {
-	push @{$config{defines}}, "X25519_ASM";
+	push @{$config{lib_defines}}, "X25519_ASM";
     }
     if ($target{padlock_asm_src} ne $table{DEFAULTS}->{padlock_asm_src}) {
-	push @{$config{defines}}, "PADLOCK_ASM";
+	push @{$config{lib_defines}}, "PADLOCK_ASM";
     }
     if ($target{poly1305_asm_src} ne "") {
-	push @{$config{defines}}, "POLY1305_ASM";
+	push @{$config{lib_defines}}, "POLY1305_ASM";
     }
 }
 
diff --git a/crypto/build.info b/crypto/build.info
index c406a11..368671a 100644
--- a/crypto/build.info
+++ b/crypto/build.info
@@ -11,7 +11,7 @@ EXTRA=  ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \
         ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl
 
 DEPEND[cversion.o]=buildinf.h
-GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(CNF_CFLAGS) $(CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)"
+GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)"
 DEPEND[buildinf.h]=../configdata.pm
 
 GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME)


More information about the openssl-commits mailing list