summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-03-06 20:35:30 +0100
committerRichard Levitte <levitte@openssl.org>2018-03-08 17:24:02 +0100
commitabe256e7951e6d57f8f6b4364ea696eb4ead3852 (patch)
treec135023d8af4063a2907a349cb580bebb92849aa
parent48dcca265c9cb0c26459240ab1858577dacf9e67 (diff)
Make "make variables" config attributes for overridable flags
With the support of "make variables" comes the possibility for the user to override them. However, we need to make a difference between defaults that we use (and that should be overridable by the user) and flags that are crucial for building OpenSSL (should not be overridable). Typically, overridable flags are those setting optimization levels, warnings levels, that kind of thing, while non-overridable flags are, for example, macros that indicate aspects of how the config target should be treated, such as L_ENDIAN and B_ENDIAN. We do that differentiation by allowing upper case attributes in the config targets, named exactly like the "make variables" we support, and reserving the lower case attributes for non-overridable project flags. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5534)
-rw-r--r--Configurations/00-base-templates.conf42
-rw-r--r--Configurations/10-main.conf514
-rw-r--r--Configurations/50-djgpp.conf5
-rw-r--r--Configurations/50-haiku.conf9
-rw-r--r--Configurations/50-masm.conf5
-rw-r--r--Configurations/90-team.conf6
-rw-r--r--Configurations/descrip.mms.tmpl209
-rw-r--r--Configurations/shared-info.pl4
-rw-r--r--Configurations/unix-Makefile.tmpl172
-rw-r--r--Configurations/windows-makefile.tmpl176
-rwxr-xr-xConfigure96
-rw-r--r--apps/CA.pl.in2
-rw-r--r--apps/tsget.in2
-rw-r--r--crypto/build.info2
-rw-r--r--tools/c_rehash.in2
15 files changed, 787 insertions, 459 deletions
diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf
index 0350997ff7..310a37091e 100644
--- a/Configurations/00-base-templates.conf
+++ b/Configurations/00-base-templates.conf
@@ -46,16 +46,16 @@ my %targets=(
build_scheme => [ "unified", "unix" ],
build_file => "Makefile",
- ar => "ar",
- arflags => "r",
- cc => "cc",
- hashbangperl => "/usr/bin/env perl",
- ranlib => sub { which("$config{cross_compile_prefix}ranlib")
+ AR => "ar",
+ ARFLAGS => "r",
+ CC => "cc",
+ HASHBANGPERL => "/usr/bin/env perl",
+ RANLIB => sub { which("$config{cross_compile_prefix}ranlib")
? "ranlib" : "" },
- rc => "windres",
+ RC => "windres",
#### THESE WILL BE ENABLED IN OpenSSL 1.2
- #hashbangperl => "PERL", # Only Unix actually cares
+ #HASHBANGPERL => "PERL", # Only Unix actually cares
},
BASE_common => {
@@ -84,19 +84,19 @@ my %targets=(
inherit_from => [ "BASE_common" ],
template => 1,
- ar => "ar",
- arflags => "r",
- cc => "cc",
+ AR => "ar",
+ ARFLAGS => "r",
+ CC => "cc",
lflags =>
sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
ex_libs =>
sub { !defined($disabled{zlib})
&& defined($disabled{"zlib-dynamic"})
? "-lz" : () },
- hashbangperl => "/usr/bin/env perl", # Only Unix actually cares
- ranlib => sub { which("$config{cross_compile_prefix}ranlib")
+ HASHBANGPERL => "/usr/bin/env perl", # Only Unix actually cares
+ RANLIB => sub { which("$config{cross_compile_prefix}ranlib")
? "ranlib" : "" },
- rc => "windres",
+ RC => "windres",
build_scheme => [ "unified", "unix" ],
build_file => "Makefile",
@@ -116,16 +116,16 @@ my %targets=(
return ();
},
- ld => "link",
- lflags => "/nologo",
- loutflag => "/out:",
- ar => "lib",
- arflags => "/nologo",
+ LD => "link",
+ LDFLAGS => "/nologo",
+ ldoutflag => "/out:",
+ AR => "lib",
+ ARFLAGS => "/nologo",
aroutflag => "/out:",
- rc => "rc",
+ RC => "rc",
rcoutflag => "/fo",
- mt => "mt",
- mtflags => "-nologo",
+ MT => "mt",
+ MTFLAGS => "-nologo",
mtinflag => "-manifest ",
mtoutflag => "-outputresource:",
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 7f07752511..277ec26625 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -6,16 +6,19 @@ my $vc_win64a_info = {};
sub vc_win64a_info {
unless (%$vc_win64a_info) {
if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) {
- $vc_win64a_info = { as => "nasm",
- asflags => "-f win64 -DNEAR -Ox -g",
+ $vc_win64a_info = { AS => "nasm",
+ ASFLAGS => "-g",
+ asflags => "-Ox -f win64 -DNEAR",
asoutflag => "-o" };
} elsif ($disabled{asm}) {
- $vc_win64a_info = { as => "ml64",
- asflags => "/c /Cp /Cx /Zi",
+ $vc_win64a_info = { AS => "ml64",
+ ASFLAGS => "/Zi",
+ asflags => "/c /Cp /Cx",
asoutflag => "/Fo" };
} else {
$die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n");
- $vc_win64a_info = { as => "{unknown}",
+ $vc_win64a_info = { AS => "{unknown}",
+ ASFLAGS => "",
asflags => "",
asoutflag => "" };
}
@@ -29,18 +32,21 @@ sub vc_win32_info {
my $ver=`nasm -v 2>NUL`;
my $vew=`nasmw -v 2>NUL`;
if ($ver ne "" || $vew ne "") {
- $vc_win32_info = { as => $ver ge $vew ? "nasm" : "nasmw",
+ $vc_win32_info = { AS => $ver ge $vew ? "nasm" : "nasmw",
+ ASFLAGS => "",
asflags => "-f win32",
asoutflag => "-o",
perlasm_scheme => "win32n" };
} elsif ($disabled{asm}) {
- $vc_win32_info = { as => "ml",
- asflags => "/nologo /Cp /coff /c /Cx /Zi",
+ $vc_win32_info = { AS => "ml",
+ ASFLAGS => "/nologo /Zi",
+ asflags => "/Cp /coff /c /Cx",
asoutflag => "/Fo",
perlasm_scheme => "win32" };
} else {
$die->("NASM not found - please read INSTALL and NOTES.WIN for further details\n");
- $vc_win32_info = { as => "{unknown}",
+ $vc_win32_info = { AS => "{unknown}",
+ ASFLAGS => "",
asflags => "",
asoutflag => "",
perlasm_scheme => "win32" };
@@ -150,8 +156,9 @@ sub vms_info {
if ($config{target} =~ /-ia64/) {
`PIPE ias -H 2> NL:`;
if ($? == 0) {
- $vms_info->{as} = "ias";
- $vms_info->{asflags} = '-d debug "-N" vms_upcase';
+ $vms_info->{AS} = "ias";
+ $vms_info->{ASFLAGS} = '-d debug';
+ $vms_info->{asflags} = '"-N" vms_upcase';
$vms_info->{asoutflag} = "-o";
$vms_info->{perlasm_scheme} = "ias";
}
@@ -165,24 +172,24 @@ my %targets = (
#### Basic configs that should work on any 32-bit box
"gcc" => {
inherit_from => [ "BASE_unix" ],
- cc => "gcc",
- cflags => picker(debug => "-O0 -g",
+ CC => "gcc",
+ CFLAGS => picker(debug => "-O0 -g",
release => "-O3"),
thread_scheme => "(unknown)",
bn_ops => "BN_LLONG",
},
"cc" => {
inherit_from => [ "BASE_unix" ],
- cc => "cc",
- cflags => "-O",
+ CC => "cc",
+ CFLAGS => "-O",
thread_scheme => "(unknown)",
},
#### VOS Configurations
"vos-gcc" => {
inherit_from => [ "BASE_unix" ],
- cc => "gcc",
- cflags => picker(default => "-Wall",
+ CC => "gcc",
+ CFLAGS => picker(default => "-Wall",
debug => "-O0 -g",
release => "-O3"),
cppflags => "-D_POSIX_C_SOURCE=200112L -D_BSD -D_VOS_EXTENDED_NAMES -DB_ENDIAN",
@@ -210,11 +217,11 @@ my %targets = (
# /usr/ccs/bin/as. Failure to comply will result in compile
# failures [at least] in 32-bit build.
inherit_from => [ "solaris-common", asm("x86_elf_asm") ],
- cc => "gcc",
- cflags => add_before(picker(default => "-Wall",
+ CC => "gcc",
+ CFLAGS => add_before(picker(default => "-Wall",
debug => "-O0 -g",
- release => "-O3 -fomit-frame-pointer"),
- threads("-pthread")),
+ release => "-O3 -fomit-frame-pointer")),
+ cflags => add(threads("-pthread")),
cppflags => add("-DL_ENDIAN"),
ex_libs => add(threads("-pthread")),
bn_ops => "BN_LLONG",
@@ -231,11 +238,11 @@ my %targets = (
# to consider using gcc shared build even with vendor compiler:-)
# -- <appro@openssl.org>
inherit_from => [ "solaris-common", asm("x86_64_asm") ],
- cc => "gcc",
- cflags => add_before(picker(default => "-m64 -Wall",
+ CC => "gcc",
+ CFLAGS => add_before(picker(default => "-Wall",
debug => "-O0 -g",
- release => "-O3"),
- threads("-pthread")),
+ release => "-O3")),
+ cflags => add_before("-m64", threads("-pthread")),
cppflags => add("-DL_ENDIAN"),
ex_libs => add(threads("-pthread")),
bn_ops => "SIXTY_FOUR_BIT_LONG",
@@ -260,10 +267,10 @@ my %targets = (
#
"solaris64-x86_64-cc" => {
inherit_from => [ "solaris-common", asm("x86_64_asm") ],
- cc => "cc",
- cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa",
- debug => "-g",
+ CC => "cc",
+ CFLAGS => add_before(picker(debug => "-g",
release => "-xO5 -xdepend -xbuiltin")),
+ cflags => add_before("-xarch=generic64 -xstrconst -Xa"),
cppflags => add("-DL_ENDIAN", threads("-D_REENTRANT")),
thread_scheme => "pthreads",
lflags => add(threads("-mt")),
@@ -278,11 +285,11 @@ my %targets = (
#### SPARC Solaris with GNU C setups
"solaris-sparcv7-gcc" => {
inherit_from => [ "solaris-common" ],
- cc => "gcc",
- cflags => add_before(picker(default => "-Wall",
+ CC => "gcc",
+ CFLAGS => add_before(picker(default => "-Wall",
debug => "-O0 -g",
- release => "-O3"),
- threads("-pthread")),
+ release => "-O3")),
+ cflags => add(threads("-pthread")),
cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
ex_libs => add(threads("-pthread")),
bn_ops => "BN_LLONG RC4_CHAR",
@@ -312,10 +319,10 @@ my %targets = (
# SC5.0 note: Compiler common patch 107357-01 or later is required!
"solaris-sparcv7-cc" => {
inherit_from => [ "solaris-common" ],
- cc => "cc",
- cflags => add_before(picker(default => "-xstrconst -Xa",
- debug => "-g",
+ CC => "cc",
+ CFLAGS => add_before(picker(debug => "-g",
release => "-xO5 -xdepend")),
+ cflags => add_before("-xstrconst -Xa"),
cppflags => add("-DB_ENDIAN -DBN_DIV2W",
threads("-D_REENTRANT")),
lflags => add(threads("-mt")),
@@ -344,10 +351,10 @@ my %targets = (
# Only N32 and N64 ABIs are supported.
"irix-mips3-gcc" => {
inherit_from => [ "BASE_unix", asm("mips64_asm") ],
- cc => "gcc",
- cflags => combine(picker(default => "-mabi=n32",
- debug => "-g -O0",
- release => "-O3")),
+ CC => "gcc",
+ CFLAGS => picker(debug => "-g -O0",
+ release => "-O3"),
+ cflags => "-mabi=n32",
cppflags => combine("-DB_ENDIAN -DBN_DIV3W",
threads("-D_SGI_MP_SOURCE")),
ex_libs => add(threads("-lpthread")),
@@ -361,10 +368,10 @@ my %targets = (
},
"irix-mips3-cc" => {
inherit_from => [ "BASE_unix", asm("mips64_asm") ],
- cc => "cc",
- cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared",
- debug => "-g -O0",
- release => "-O2")),
+ CC => "cc",
+ 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")),
ex_libs => add(threads("-lpthread")),
@@ -379,10 +386,10 @@ my %targets = (
# N64 ABI builds.
"irix64-mips4-gcc" => {
inherit_from => [ "BASE_unix", asm("mips64_asm") ],
- cc => "gcc",
- cflags => combine(picker(default => "-mabi=64 -mips4",
- debug => "-g -O0",
- release => "-O3")),
+ CC => "gcc",
+ CFLAGS => picker(debug => "-g -O0",
+ release => "-O3"),
+ cflags => "-mabi=64 -mips4",
cppflags => combine("-DB_ENDIAN -DBN_DIV3W",
threads("-D_SGI_MP_SOURCE")),
ex_libs => add(threads("-lpthread")),
@@ -396,13 +403,14 @@ my %targets = (
},
"irix64-mips4-cc" => {
inherit_from => [ "BASE_unix", asm("mips64_asm") ],
- cc => "cc",
- cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared",
- debug => "-g -O0",
- release => "-O2")),
+ 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")),
- ex_libs => add(threads("-lpthread")),
+ ex_libs => threads("-lpthread"),
bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
thread_scheme => "pthreads",
perlasm_scheme => "64",
@@ -441,10 +449,10 @@ my %targets = (
# thus adequate performance is provided even with PA-RISC 1.1 build.
"hpux-parisc-gcc" => {
inherit_from => [ "BASE_unix" ],
- cc => "gcc",
- cflags => combine(picker(debug => "-O0 -g",
- release => "-O3"),
- threads("-pthread")),
+ CC => "gcc",
+ CFLAGS => picker(debug => "-O0 -g",
+ release => "-O3"),
+ cflags => add(threads("-pthread")),
cppflags => "-DB_ENDIAN -DBN_DIV2W",
ex_libs => add("-Wl,+s -ldld", threads("-pthread")),
bn_ops => "BN_LLONG",
@@ -461,8 +469,8 @@ my %targets = (
},
"hpux64-parisc2-gcc" => {
inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
- cc => "gcc",
- cflags => combine(picker(debug => "-O0 -g",
+ CC => "gcc",
+ CFLAGS => combine(picker(debug => "-O0 -g",
release => "-O3")),
cppflags => combine("-DB_ENDIAN", threads("-D_REENTRANT")),
ex_libs => add("-ldl"),
@@ -479,10 +487,10 @@ my %targets = (
# More attempts at unified 10.X and 11.X targets for HP C compiler.
"hpux-parisc-cc" => {
inherit_from => [ "BASE_unix" ],
- cc => "cc",
- cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit",
- debug => "+O0 +d -g",
- release => "+O3")),
+ CC => "cc",
+ 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")),
ex_libs => add("-Wl,+s -ldld",threads("-lpthread")),
@@ -501,10 +509,10 @@ my %targets = (
},
"hpux64-parisc2-cc" => {
inherit_from => [ "BASE_unix", asm("parisc20_64_asm") ],
- cc => "cc",
- cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit",
- debug => "+O0 +d -g",
- release => "+O3")),
+ CC => "cc",
+ CFLAGS => picker(debug => "+O0 +d -g",
+ release => "+O3") ,
+ cflags => "+DD64 +Optrs_strongly_typed -Ae +ESlit",
cppflags => combine("-DB_ENDIAN -DMD32_XARRAY",
threads("-D_REENTRANT")),
ex_libs => add("-ldl",threads("-lpthread")),
@@ -521,10 +529,10 @@ my %targets = (
# HP/UX IA-64 targets
"hpux-ia64-cc" => {
inherit_from => [ "BASE_unix", asm("ia64_asm") ],
- cc => "cc",
- cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z",
- debug => "+O0 +d -g",
- release => "+O2")),
+ CC => "cc",
+ CFLAGS => picker(debug => "+O0 +d -g",
+ release => "+O2"),
+ cflags => "-Ae +DD32 +Olit=all -z",
cppflags => combine("-DB_ENDIAN", threads("-D_REENTRANT")),
ex_libs => add("-ldl",threads("-lpthread")),
bn_ops => "SIXTY_FOUR_BIT",
@@ -538,10 +546,10 @@ my %targets = (
},
"hpux64-ia64-cc" => {
inherit_from => [ "BASE_unix", asm("ia64_asm") ],
- cc => "cc",
- cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z",
- debug => "+O0 +d -g",
- release => "+O3")),
+ CC => "cc",
+ CFLAGS => picker(debug => "+O0 +d -g",
+ release => "+O3"),
+ cflags => "-Ae +DD64 +Olit=all -z",
cppflags => combine("-DB_ENDIAN", threads("-D_REENTRANT")),
ex_libs => add("-ldl", threads("-lpthread")),
bn_ops => "SIXTY_FOUR_BIT_LONG",
@@ -556,10 +564,10 @@ my %targets = (
# GCC builds...
"hpux-ia64-gcc" => {
inherit_from => [ "BASE_unix", asm("ia64_asm") ],
- cc => "gcc",
- cflags => combine(picker(debug => "-O0 -g",
- release => "-O3"),
- threads("-pthread")),
+ CC => "gcc",
+ CFLAGS => picker(debug => "-O0 -g",
+ release => "-O3"),
+ cflags => add(threads("-pthread")),
cppflags => "-DB_ENDIAN",
ex_libs => add("-ldl", threads("-pthread")),
bn_ops => "SIXTY_FOUR_BIT",
@@ -573,11 +581,10 @@ my %targets = (
},
"hpux64-ia64-gcc" => {
inherit_from => [ "BASE_unix", asm("ia64_asm") ],
- cc => "gcc",
- cflags => combine(picker(default => "-mlp64",
- debug => "-O0 -g",
- release => "-O3"),
- threads("-pthread")),
+ CC => "gcc",
+ CFLAGS => picker(debug => "-O0 -g",
+ release => "-O3"),
+ cflags => combine("-mlp64", threads("-pthread")),
cppflags => "-DB_ENDIAN",
ex_libs => add("-ldl", threads("-pthread")),
bn_ops => "SIXTY_FOUR_BIT_LONG",
@@ -593,8 +600,8 @@ my %targets = (
#### HP MPE/iX http://jazz.external.hp.com/src/openssl/
"MPE/iX-gcc" => {
inherit_from => [ "BASE_unix" ],
- cc => "gcc",
- cflags => "-O3",
+ CC => "gcc",
+ CFLAGS => "-O3",
cppflags => "-D_ENDIAN -DBN_DIV2W -D_POSIX_SOURCE -D_SOCKET_SOURCE",
includes => add("/SYSLOG/PUB"),
sys_id => "MPE",
@@ -610,8 +617,9 @@ my %targets = (
#### but not anymore...
"tru64-alpha-gcc" => {
inherit_from => [ "BASE_unix", asm("alpha_asm") ],
- cc => "gcc",
- cflags => combine("-std=c9x -O3", threads("-pthread")),
+ CC => "gcc",
+ CFLAGS => "-O3",
+ cflags => add("-std=c9x", threads("-pthread")),
cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE",
ex_libs => add("-lrt", threads("-pthread")), # for mlock(2)
bn_ops => "SIXTY_FOUR_BIT_LONG",
@@ -622,9 +630,10 @@ my %targets = (
},
"tru64-alpha-cc" => {
inherit_from => [ "BASE_unix", asm("alpha_asm") ],
- cc => "cc",
- cflags => combine("-std1 -tune host -fast -readonly_strings",
- threads("-pthread")),
+ CC => "cc",
+ CFLAGS => "-tune host -fast",
+ cflags => add("-std1 -readonly_strings",
+ threads("-pthread")),
cppflags => "-D_XOPEN_SOURCE=500 -D_OSF_SOURCE",
ex_libs => add("-lrt", threads("-pthread")), # for mlock(2)
bn_ops => "SIXTY_FOUR_BIT_LONG",
@@ -642,16 +651,16 @@ my %targets = (
# throw in -D[BL]_ENDIAN, whichever appropriate...
"linux-generic32" => {
inherit_from => [ "BASE_unix" ],
- cc => "gcc",
- cxx => "g++",
- cflags => combine(picker(default => "-Wall",
- debug => "-O0 -g",
- release => "-O3"),
- threads("-pthread")),
- cxxflags => combine(picker(default => "-std=c++11 -Wall",
- debug => "-O0 -g",
- release => "-O3"),
- threads("-pthread")),
+ CC => "gcc",
+ CXX => "g++",
+ CFLAGS => picker(default => "-Wall",
+ debug => "-O0 -g",
+ release => "-O3"),
+ CXXFLAGS => picker(default => "-Wall",
+ debug => "-O0 -g",
+ release => "-O3"),
+ cflags => threads("-pthread"),
+ cxxflags => combine("-std=c++11", threads("-pthread")),
cppflags => "-DOPENSSL_USE_NODELETE",
ex_libs => add("-ldl", threads("-pthread")),
bn_ops => "BN_LLONG RC4_CHAR",
@@ -762,14 +771,14 @@ my %targets = (
#### machines where gcc doesn't understand -m32 and -m64
"linux-elf" => {
inherit_from => [ "linux-generic32", asm("x86_elf_asm") ],
- cflags => add(picker(release => "-fomit-frame-pointer")),
+ CFLAGS => add(picker(release => "-fomit-frame-pointer")),
cppflags => add("-DL_ENDIAN"),
bn_ops => "BN_LLONG",
},
"linux-aout" => {
inherit_from => [ "BASE_unix", asm("x86_asm") ],
- cc => "gcc",
- cflags => add(picker(default => "-Wall",
+ CC => "gcc",
+ CFLAGS => add(picker(default => "-Wall",
debug => "-O0 -g",
release => "-O3 -fomit-frame-pointer")),
cppflags => add("-DL_ENDIAN"),
@@ -781,17 +790,17 @@ my %targets = (
#### X86 / X86_64 targets
"linux-x86" => {
inherit_from => [ "linux-generic32", asm("x86_asm") ],
- cflags => add(picker(default => "-m32",
- release => "-fomit-frame-pointer")),
+ CFLAGS => add(picker(release => "-fomit-frame-pointer")),
+ cflags => add("-m32"),
cppflags => add("-DL_ENDIAN"),
bn_ops => "BN_LLONG",
perlasm_scheme => "elf",
},
"linux-x86-clang" => {
inherit_from => [ "linux-x86" ],
- cc => "clang",
- cxx => "clang++",
- cflags => add("-Wextra"),
+ CC => "clang",
+ CXX => "clang++",
+ CFLAGS => add("-Wextra"),
},
"linux-x86_64" => {
inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
@@ -803,9 +812,9 @@ my %targets = (
},
"linux-x86_64-clang" => {
inherit_from => [ "linux-x86_64" ],
- cc => "clang",
- cxx => "clang++",
- cflags => add("-Wextra"),
+ CC => "clang",
+ CXX => "clang++",
+ CFLAGS => add("-Wextra"),
},
"linux-x32" => {
inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
@@ -857,34 +866,35 @@ my %targets = (
"linux-sparcv8" => {
inherit_from => [ "linux-generic32", asm("sparcv8_asm") ],
cflags => add("-mcpu=v8"),
- cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
+ lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
},
"linux-sparcv9" => {
# it's a real mess with -mcpu=ultrasparc option under Linux,
# but -Wa,-Av8plus should do the trick no matter what.
inherit_from => [ "linux-generic32", asm("sparcv9_asm") ],
cflags => add("-m32 -mcpu=ultrasparc -Wa,-Av8plus"),
- cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
+ lib_cppflags => add("-DB_ENDIAN -DBN_DIV2W"),
},
"linux64-sparcv9" => {
# GCC 3.1 is a requirement
inherit_from => [ "linux-generic64", asm("sparcv9_asm") ],
cflags => add("-m64 -mcpu=ultrasparc"),
- cppflags => add("-DB_ENDIAN"),
+ lib_cppflags => add("-DB_ENDIAN"),
bn_ops => "BN_LLONG RC4_CHAR",
multilib => "64",
},
"linux-alpha-gcc" => {
inherit_from => [ "linux-generic64", asm("alpha_asm") ],
- cppflags => add("-DL_ENDIAN"),
+ lib_cppflags => add("-DL_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG",
},
"linux-c64xplus" => {
inherit_from => [ "BASE_unix" ],
# TI_CGT_C6000_7.3.x is a requirement
- cc => "cl6x",
- cflags => "--linux -ea=.s -eo=.o -mv6400+ -o2 -ox -ms -pden",
+ CC => "cl6x",
+ CFLAGS => "-o2 -ox -ms",
+ cflags => "--linux -ea=.s -eo=.o -mv6400+ -pden",
cppflags => combine("-DOPENSSL_SMALL_FOOTPRINT",
threads("-D_REENTRANT")),
bn_ops => "BN_LLONG",
@@ -937,7 +947,7 @@ my %targets = (
},
"android-x86" => {
inherit_from => [ "android", asm("x86_asm") ],
- cflags => add(picker(release => "-fomit-frame-pointer")),
+ CFLAGS => add(picker(release => "-fomit-frame-pointer")),
bn_ops => "BN_LLONG",
perlasm_scheme => "android",
},
@@ -1007,11 +1017,11 @@ my %targets = (
# -D_THREAD_SAFE and sometimes -D_REENTRANT. FreeBSD 5.x
# expands it as -lc_r, which seems to be sufficient?
inherit_from => [ "BASE_unix" ],
- cc => "cc",
- cflags => combine(picker(default => "-Wall",
- debug => "-O0 -g",
- release => "-O3"),
- threads("-pthread")),
+ CC => "cc",
+ CFLAGS => picker(default => "-Wall",
+ debug => "-O0 -g",
+ release => "-O3"),
+ cflags => threads("-pthread"),
cppflags => threads("-D_THREAD_SAFE -D_REENTRANT"),
ex_libs => add(threads("-pthread")),
enable => add("devcryptoeng"),
@@ -1029,7 +1039,7 @@ my %targets = (
"BSD-x86" => {
inherit_from => [ "BSD-generic32", asm("x86_asm") ],
- cflags => add(picker(release => "-fomit-frame-pointer")),
+ CFLAGS => add(picker(release => "-fomit-frame-pointer")),
cppflags => add("-DL_ENDIAN"),
bn_ops => "BN_LLONG",
shared_target => "bsd-shared",
@@ -1069,8 +1079,8 @@ my %targets = (
"bsdi-elf-gcc" => {
inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
- cc => "gcc",
- cflags => "-fomit-frame-pointer -O3 -Wall",
+ CC => "gcc",
+ CFLAGS => "-fomit-frame-pointer -O3 -Wall",
cppflags => "-DPERL5 -DL_ENDIAN",
ex_libs => add("-ldl"),
bn_ops => "BN_LLONG",
@@ -1083,16 +1093,16 @@ my %targets = (
"nextstep" => {
inherit_from => [ "BASE_unix" ],
- cc => "cc",
- cflags => "-O -Wall",
+ CC => "cc",
+ CFLAGS => "-O -Wall",
unistd => "<libc.h>",
bn_ops => "BN_LLONG",
thread_scheme => "(unknown)",
},
"nextstep3.3" => {
inherit_from => [ "BASE_unix" ],
- cc => "cc",
- cflags => "-O3 -Wall",
+ CC => "cc",
+ CFLAGS => "-O3 -Wall",
unistd => "<libc.h>",
bn_ops => "BN_LLONG",
thread_scheme => "(unknown)",
@@ -1101,14 +1111,14 @@ my %targets = (
# QNX
"qnx4" => {
inherit_from => [ "BASE_unix" ],
- cc => "cc",
- cflags => "",
+ CC => "cc",
+ CFLAGS => "",
cppflags => "-DL_ENDIAN -DTERMIO",
thread_scheme => "(unknown)",
},
"QNX6" => {
inherit_from => [ "BASE_unix" ],
- cc => "gcc",
+ CC => "gcc",
ex_libs => add("-lsocket"),
dso_scheme => "dlfcn",
shared_target => "bsd-gcc-shared",
@@ -1117,8 +1127,8 @@ my %targets = (
},
"QNX6-i386" => {
inherit_from => [ "BASE_unix", asm("x86_elf_asm") ],
- cc => "gcc",
- cflags => "-O2 -Wall",
+ CC => "gcc",
+ CFLAGS => "-O2 -Wall",
cppflags => "-DL_ENDIAN",
ex_libs => add("-lsocket"),
dso_scheme => "dlfcn",
@@ -1140,24 +1150,26 @@ my %targets = (
# UnixWare 2.0x fails destest with -O.
"unixware-2.0" => {
inherit_from => [ "BASE_unix" ],
- cc => "cc",
- cflags => combine(threads("-Kthread")),
+ CC