Build files: when using $(CPP), use the C flags alongside the CPP flags
authorRichard Levitte <levitte@openssl.org>
Thu, 22 Feb 2018 15:33:58 +0000 (16:33 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 22 Feb 2018 20:56:41 +0000 (21:56 +0100)
The reason for this is that some of the C flags affect built in macros
that we may depend on.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5436)

Configurations/descrip.mms.tmpl
Configurations/unix-Makefile.tmpl
Configurations/windows-makefile.tmpl

index 72bae8bbd02dac6c2d271835ce42c1f194171b68..2364644bbcb9394959a682e07aa09c91e31eab45 100644 (file)
@@ -658,9 +658,11 @@ EOF
               die "Generator type for $src unknown: $generator\n";
           }
 
-          my $cppflags = { lib => '$(LIB_CPPFLAGS)',
-                           dso => '$(DSO_CPPFLAGS)',
-                           bin => '$(BIN_CPPFLAGS)' } -> {$args{intent}};
+          my $cppflags = {
+              lib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
+              dso => '$(DSO_CFLAGS) $(DSO_CPPFLAGS)',
+              bin => '$(BIN_CFLAGS) $(BIN_CPPFLAGS)'
+          } -> {$args{intent}};
           my @incs_cmds = includes({ lib => '$(LIB_INCLUDES)',
                                      dso => '$(DSO_INCLUDES)',
                                      bin => '$(BIN_INCLUDES)' } -> {$args{intent}},
index b3edd66a56c9ae6b4275ea568593072735424eda..365499e00157a5c6eb1b518cb2e246a6ebe31420 100644 (file)
@@ -850,9 +850,9 @@ EOF
           }
 
           my $cppflags = {
-              lib => '$(LIB_CPPFLAGS)',
-              dso => '$(DSO_CPPFLAGS)',
-              bin => '$(BIN_CPPFLAGS)'
+              lib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)',
+              dso => '$(DSO_CFLAGS) $(DSO_CPPFLAGS)',
+              bin => '$(BIN_CFLAGS) $(BIN_CPPFLAGS)'
           } -> {$args{intent}};
           if (defined($generator)) {
               # If the target is named foo.S in build.info, we want to
index 3e8348ef6be1739e8e1431f051e888bbd173efcf..719397239de7d5572705312f61f6d5ef4293a11f 100644 (file)
@@ -436,9 +436,11 @@ EOF
           }
 
           my $cppflags = $incs;
-          $cppflags .= { lib => '$(LIB_CPPFLAGS)',
-                         dso => '$(DSO_CPPFLAGS)',
-                         bin => '$(BIN_CPPFLAGS)' } -> {$args{intent}};
+          $cppflags .= {
+              lib => ' $(LIB_CFLAGS) $(LIB_CPPFLAGS)',
+              dso => ' $(DSO_CFLAGS) $(DSO_CPPFLAGS)',
+              bin => ' $(BIN_CFLAGS) $(BIN_CPPFLAGS)'
+          } -> {$args{intent}};
           if (defined($generator)) {
               # If the target is named foo.S in build.info, we want to
               # end up generating foo.s in two steps.