Use include paths to our source before any other cflags

This is just in case someone passed an inclusion path with the
configuration, and there are OpenSSL headers from another version
in there.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Roumen Petrov 2016-06-27 21:24:07 +02:00 committed by Richard Levitte
parent 7a53360031
commit 57ade5711b
2 changed files with 9 additions and 9 deletions

View File

@ -871,7 +871,7 @@ EOF
$target: $args{generator}->[0] $deps $target: $args{generator}->[0] $deps
( trap "rm -f \$@.*" INT 0; \\ ( trap "rm -f \$@.*" INT 0; \\
$generator \$@.S; \\ $generator \$@.S; \\
\$(CC) \$(CFLAGS) $incs -E \$@.S | \\ \$(CC) $incs \$(CFLAGS) -E \$@.S | \\
\$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@.i && \\ \$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@.i && \\
mv -f \$@.i \$@ ) mv -f \$@.i \$@ )
EOF EOF
@ -884,7 +884,7 @@ EOF
} }
return <<"EOF"; return <<"EOF";
$args{src}: $args{generator}->[0] $deps $args{src}: $args{generator}->[0] $deps
\$(CC) \$(CFLAGS) $incs -E \$< | \\ \$(CC) $incs \$(CFLAGS) -E \$< | \\
\$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@ \$(PERL) -ne '/^#(line)?\\s*[0-9]+/ or print' > \$@
EOF EOF
} }
@ -918,7 +918,7 @@ EOF
if (!$disabled{makedepend} && $makedepprog =~ /\/makedepend/) { if (!$disabled{makedepend} && $makedepprog =~ /\/makedepend/) {
$recipe .= <<"EOF"; $recipe .= <<"EOF";
$obj$depext: $deps $obj$depext: $deps
-\$(MAKEDEPEND) -f- -o"|$obj$objext" -- \$(CFLAGS) $ecflags$incs -- $srcs \\ -\$(MAKEDEPEND) -f- -o"|$obj$objext" -- $incs \$(CFLAGS) $ecflags -- $srcs \\
>\$\@.tmp 2>/dev/null >\$\@.tmp 2>/dev/null
-\$(PERL) -i -pe 's/^.*\\|//; s/ \\/(\\\\.|[^ ])*//; \$\$_ = undef if (/: *\$\$/ || /^(#.*| *)\$\$/); \$\$_.="\\n" unless !defined(\$\$_) or /\\R\$\$/g;' \$\@.tmp -\$(PERL) -i -pe 's/^.*\\|//; s/ \\/(\\\\.|[^ ])*//; \$\$_ = undef if (/: *\$\$/ || /^(#.*| *)\$\$/); \$\$_.="\\n" unless !defined(\$\$_) or /\\R\$\$/g;' \$\@.tmp
\@if cmp \$\@.tmp \$\@ > /dev/null 2> /dev/null; then \\ \@if cmp \$\@.tmp \$\@ > /dev/null 2> /dev/null; then \\
@ -932,13 +932,13 @@ EOF
if ($disabled{makedepend} || $makedepprog =~ /\/makedepend/) { if ($disabled{makedepend} || $makedepprog =~ /\/makedepend/) {
$recipe .= <<"EOF"; $recipe .= <<"EOF";
$obj$objext: $deps $obj$objext: $deps
\$(CC) \$(CFLAGS) $ecflags$incs -c -o \$\@ $srcs \$(CC) $incs \$(CFLAGS) $ecflags -c -o \$\@ $srcs
EOF EOF
} }
if (!$disabled{makedepend} && $makedepprog !~ /\/makedepend/) { if (!$disabled{makedepend} && $makedepprog !~ /\/makedepend/) {
$recipe .= <<"EOF"; $recipe .= <<"EOF";
$obj$objext: $deps $obj$objext: $deps
\$(CC) \$(CFLAGS) $ecflags$incs -MMD -MF $obj$depext.tmp -MT \$\@ -c -o \$\@ $srcs \$(CC) $incs \$(CFLAGS) $ecflags -MMD -MF $obj$depext.tmp -MT \$\@ -c -o \$\@ $srcs
\@touch $obj$depext.tmp \@touch $obj$depext.tmp
\@if cmp $obj$depext.tmp $obj$depext > /dev/null 2> /dev/null; then \\ \@if cmp $obj$depext.tmp $obj$depext > /dev/null 2> /dev/null; then \\
rm -f $obj$depext.tmp; \\ rm -f $obj$depext.tmp; \\

View File

@ -349,7 +349,7 @@ EOF
$target: "$args{generator}->[0]" $deps $target: "$args{generator}->[0]" $deps
set ASM=\$(AS) set ASM=\$(AS)
$generator \$@.S $generator \$@.S
\$(CC) \$(CFLAGS) $incs /EP /C \$@.S > \$@.i && move /Y \$@.i \$@ \$(CC) $incs \$(CFLAGS) /EP /C \$@.S > \$@.i && move /Y \$@.i \$@
del /Q \$@.S del /Q \$@.S
EOF EOF
} }
@ -362,7 +362,7 @@ EOF
} }
return <<"EOF"; return <<"EOF";
$target: "$args{generator}->[0]" $deps $target: "$args{generator}->[0]" $deps
\$(CC) \$(CFLAGS) $incs /EP /C "$args{generator}->[0]" > \$@.i && move /Y \$@.i \$@ \$(CC) $incs \$(CFLAGS) /EP /C "$args{generator}->[0]" > \$@.i && move /Y \$@.i \$@
EOF EOF
} }
} }
@ -400,13 +400,13 @@ s/^Note: including file: *//;
END { print '$obj$objext: ',join(" ", sort keys \%collect),"\\n" } END { print '$obj$objext: ',join(" ", sort keys \%collect),"\\n" }
<< <<
$obj$objext: $obj$depext $obj$objext: $obj$depext
\$(CC) \$(CFLAGS) $ecflags$incs -c \$(COUTFLAG)\$\@ @<< \$(CC) $incs \$(CFLAGS) $ecflags -c \$(COUTFLAG)\$\@ @<<
$srcs $srcs
<< <<
EOF EOF
return <<"EOF" if ($disabled{makedepend}); return <<"EOF" if ($disabled{makedepend});
$obj$objext: $deps $obj$objext: $deps
\$(CC) \$(CFLAGS) $ecflags$incs -c \$(COUTFLAG)\$\@ $srcs \$(CC) $incs \$(CFLAGS) $ecflags -c \$(COUTFLAG)\$\@ $srcs
EOF EOF
} }