diff options
author | Richard Levitte <levitte@openssl.org> | 2018-01-27 14:56:06 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-01-28 16:22:40 +0100 |
commit | fa153b57a30154b828cabdfb079f832a96eeb2e1 (patch) | |
tree | ae6f6812843aa98802b9c170bd1ac7f3df30d55a /Configurations | |
parent | e548c1fe98e35888e8ad90b16a4fdcd3ab577210 (diff) |
Treat C++ flags more like C flags, and only if C++ compiler specified
C++ flags got the same config target value as C flags, but then
nothing else happened while C flags get all kinds of stuff added to
them (especially when --strict-warnings is used).
Now, C++ flags get the exact same treatment as C flags. However, this
only happens when a C++ compiler is specified, to avoid confusing
messages about added C++ flags.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5181)
Diffstat (limited to 'Configurations')
-rw-r--r-- | Configurations/10-main.conf | 4 | ||||
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 6830294e47..735b2a3d72 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -632,6 +632,10 @@ my %targets = ( debug => "-O0 -g", release => "-O3"), threads("-pthread")), + cxxflags => combine(picker(default => "-std=c++11 -Wall", + debug => "-O0 -g", + release => "-O3"), + threads("-pthread")), cppflags => "-DOPENSSL_USE_NODELETE", ex_libs => add("-ldl", threads("-pthread")), bn_ops => "BN_LLONG RC4_CHAR", diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 1eb5818ddc..27d804c3c0 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -192,7 +192,7 @@ CPPFLAGS_Q={- $cppflags =~ s|([\\"])|\\$1|g; $cppflags -} CC= $(CROSS_COMPILE){- $config{cc} -} CFLAGS={- join(' ', @{$config{cflags}}) -} CXX= $(CROSS_COMPILE){- $config{cxx} -} -CXXFLAGS={- join(' ', @{$config{cxxflags}}) -} -std=c++11 +CXXFLAGS={- join(' ', @{$config{cxxflags}}) -} LDFLAGS= {- join(' ', @{$config{lflags}}) -} PLIB_LDFLAGS= {- join(' ', @{$config{plib_lflags}}) -} EX_LIBS= {- join(' ', @{$config{ex_libs}}) -} |