diff options
author | Tanzinul Islam <tanzinul.islam@gmail.com> | 2020-12-10 14:53:07 +0000 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2021-04-19 11:05:55 +0200 |
commit | 16f2a44435fccbd7466b0659220c765a17e5d0c0 (patch) | |
tree | 0cd711a3618e0935b5a48a5b037802d83b17a6cd /Configurations | |
parent | 96d4ec6724a9ecc5d193172d0cf1a347f428372a (diff) |
Generate dependency information
The Clang-based `bcc32c.exe` doesn't implement the `-Hp` option, so we
have to use [`cpp32.exe`][1] instead. Therefore, change the dependency-
emitting command to use `$(CPP)` instead of `$(CC)`, which which also
uncovered the [existing bug of `2>&1` before `> $dep`][2]. Also
C++Builder's `make.exe` doesn't implement `2>&1` in its command runner,
so wrap the whole line in a `cmd /C`.
[1]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/CPP32.EXE,_the_C_Compiler_Preprocessor
[2]: https://ss64.com/nt/syntax-redirection.html
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/13540)
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/10-main.conf | 3 | ||||
-rw-r--r-- | Configurations/50-cppbuilder.conf | 2 | ||||
-rw-r--r-- | Configurations/windows-makefile.tmpl | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 4d42c7fae8..f5e5754b3a 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -1275,9 +1275,10 @@ my %targets = ( inherit_from => [ "BASE_Windows" ], template => 1, CC => "cl", - CPP => '$(CC) /EP /C', + CPP => '"$(CC)" /EP /C', CFLAGS => "/W3 /wd4090 /nologo", coutflag => "/Fo", + cpp_depend_flags => "/Zs /showIncludes", LD => "link", LDFLAGS => "/nologo /debug", ldoutflag => "/out:", diff --git a/Configurations/50-cppbuilder.conf b/Configurations/50-cppbuilder.conf index 40b89b403e..7ca972956a 100644 --- a/Configurations/50-cppbuilder.conf +++ b/Configurations/50-cppbuilder.conf @@ -5,6 +5,7 @@ my %targets = ( bn_ops => "BN_LLONG", thread_scheme => "winthreads", cc => "bcc32c", + CPP => "cpp32 -oCON -Sc -Sr", defines => add("WIN32_LEAN_AND_MEAN", "OPENSSL_SYS_WIN32", "L_ENDIAN", "DSO_WIN32", "_stricmp=stricmp", "_strnicmp=strnicmp", "_malloca=malloc", @@ -17,6 +18,7 @@ my %targets = ( bin_cflags => "-tWC", lib_cflags => shared("-tWD -D_WINDLL -D_DLL"), coutflag => "-o", + cpp_depend_flags => "-Hp", LD => "ilink32", LDFLAGS => picker(default => "-ap -x -Gn -q", debug => '-j"$(BDS)\lib\win32c\debug" ' . diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index 521f72d7b7..bcb092d045 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -226,7 +226,7 @@ libdir={- file_name_is_absolute($libdir) ##### User defined commands and flags ################################ CC="{- $config{CC} -}" -CPP="{- $config{CPP} -}" +CPP={- $config{CPP} -} CPPFLAGS={- our $cppflags1 = join(" ", (map { "-D".$_} @{$config{CPPDEFINES}}), (map { " -I".$_} @{$config{CPPINCLUDES}}), @@ -836,7 +836,7 @@ $obj: $deps \$(CC) $cflags $defs -c \$(COUTFLAG)\$\@ $srcs EOF $recipe .= <<"EOF" unless $disabled{makedepend}; - \$(CC) $cflags $defs /Zs /showIncludes $srcs 2>&1 > $dep + cmd /C "\$(CPP) $cflags $defs $target{cpp_depend_flags} $srcs > $dep 2>&1" EOF return $recipe; } |