## -*- mode: perl; -*-
## Standard openssl configuration targets.
-sub picker {
- my %opts = @_;
- return sub { add($opts{default} || (),
- $opts{$config{build_type}} || ())->(); }
-}
-
-sub threads {
- my @flags = @_;
- return sub { add($disabled{threads} ? () : @flags)->(); }
-}
-
-sub combine {
- my @stuff = @_;
- return sub { add(@stuff)->(); }
-}
-
# Helper functions for the Windows configs
my $vc_win64a_info = {};
sub vc_win64a_info {
cc => "cl",
cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
coutflag => "/Fo",
+ rc => "rc",
+ rcoutflag => "/fo",
lib_cflags => sub { join(" ",
($disabled{shared} ? "/Zl" : ()),
"/Zi /Fdlib") },
dso_scheme => "win32",
},
"VC-noCE-common" => {
- inherit_from => [ "VC-common", "uplink_common" ],
+ inherit_from => [ "VC-common" ],
cflags => add(picker(default => "-DUNICODE -D_UNICODE",
debug =>
sub {
build_scheme => add("VC-W64", { separator => undef }),
},
"VC-WIN64I" => {
- inherit_from => [ "VC-WIN64-common", asm("ia64_asm") ],
+ inherit_from => [ "VC-WIN64-common", asm("ia64_asm"),
+ sub { $disabled{shared} ? () : "ia64_uplink" } ],
as => "ias",
asflags => "-d debug",
asoutflag => "-o",
perlasm_scheme => "ias",
},
"VC-WIN64A" => {
- inherit_from => [ "VC-WIN64-common", asm("x86_64_asm") ],
+ inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
+ sub { $disabled{shared} ? () : "x86_64_uplink" } ],
as => sub { vc_win64a_info()->{as} },
asflags => sub { vc_win64a_info()->{asflags} },
asoutflag => sub { vc_win64a_info()->{asoutflag} },
"VC-WIN32" => {
# x86 Win32 target defaults to ANSI API, if you want UNICODE,
# configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE'
- inherit_from => [ "VC-noCE-common", asm("x86_asm") ],
+ inherit_from => [ "VC-noCE-common", asm("x86_asm"),
+ sub { $disabled{shared} ? () : "x86_uplink" } ],
as => sub { my $ver=`nasm -v 2>NUL`;
my $vew=`nasmw -v 2>NUL`;
return $ver ge $vew ? "nasm" : "nasmw" },
shared_ldflag => "-dynamiclib",
shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
},
+ # Option "freeze" such as -std=gnu9x can't negatively interfere
+ # with future defaults for below two targets, because MacOS X
+ # for PPC has no future, it was discontinued by vendor in 2009.
"darwin-ppc-cc" => {
inherit_from => [ "darwin-common", asm("ppc32_asm") ],
- cflags => add("-arch ppc -DB_ENDIAN -Wa,-force_cpusubtype_ALL"),
+ cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"),
perlasm_scheme => "osx32",
shared_ldflag => "-arch ppc -dynamiclib",
},
"darwin64-ppc-cc" => {
inherit_from => [ "darwin-common", asm("ppc64_asm") ],
- cflags => add("-arch ppc64 -DB_ENDIAN"),
+ cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"),
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
perlasm_scheme => "osx64",
shared_ldflag => "-arch ppc64 -dynamiclib",