summaryrefslogtreecommitdiffstats
path: root/Configurations
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-02-18 18:43:56 +0100
committerRichard Levitte <levitte@openssl.org>2016-02-19 11:06:54 +0100
commit3a55c92bbad0b720c9a3d7a56fa3c351b65a89ee (patch)
tree59e5462b3f76ce4de66c9b5dc8243f5d8f632670 /Configurations
parent5be5e56c09015633d94fb1ee1290081a78074546 (diff)
Rethink the uplink / applink story
Adding uplink and applink to some builds was done by "magic", the configuration for "mingw" only had a macro definition, the Configure would react to its presence by adding the uplink source files to cpuid_asm_src, and crypto/build.info inherited dance to get it compiled, and Makefile.shared made sure applink.o would be appropriately linked in. That was a lot under the hood. To replace this, we create a few template configurations in Configurations/00-base-templates.conf, inherit one of them in the "mingw" configuration, the rest is just about refering to the $target{apps_aux_src} / $target{apps_obj} in the right places. Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'Configurations')
-rw-r--r--Configurations/00-base-templates.conf25
-rw-r--r--Configurations/10-main.conf7
2 files changed, 28 insertions, 4 deletions
diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf
index cf5371b9ff..791634f352 100644
--- a/Configurations/00-base-templates.conf
+++ b/Configurations/00-base-templates.conf
@@ -12,7 +12,7 @@
thread_cflags => "",
thread_defines => [],
- apps_extra_src => "",
+ apps_aux_src => "",
cpuid_asm_src => "mem_clr.c",
bn_asm_src => "bn_asm.c",
ec_asm_src => "",
@@ -34,6 +34,7 @@
unistd => "<unistd.h>",
shared_target => "",
shared_cflag => "",
+ shared_defines => [],
shared_ldflag => "",
shared_rcflag => "",
shared_extension => "",
@@ -41,6 +42,28 @@
build_file => "Makefile",
},
+ uplink_common => {
+ template => 1,
+ apps_aux_src => add(" ","../ms/applink.c"),
+ cpuid_asm_src => add(" ","../ms/uplink.c"),
+ shared_defines => add(undef, "OPENSSL_USE_APPLINK"),
+ },
+ x86_uplink => {
+ inherit_from => [ "uplink_common" ],
+ template => 1,
+ cpuid_asm_src => add(" ","uplink-x86.s"),
+ },
+ x86_64_uplink => {
+ inherit_from => [ "uplink_common" ],
+ template => 1,
+ cpuid_asm_src => add(" ","uplink-x86_64.s"),
+ },
+ ia64_uplink => {
+ inherit_from => [ "uplink_common" ],
+ template => 1,
+ cpuid_asm_src => add(" ","uplink-ia64.s"),
+ },
+
x86_asm => {
template => 1,
cpuid_asm_src => "x86cpuid.s",
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 03dc56bde1..4372d92614 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1162,7 +1162,8 @@
#### MinGW
"mingw" => {
- inherit_from => [ asm("x86_asm") ],
+ inherit_from => [ asm("x86_asm"),
+ sub { $config{no_shared} ? () : "x86_uplink" } ],
cc => "gcc",
cflags => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
debug_cflags => "-g -O0",
@@ -1174,7 +1175,7 @@
perlasm_scheme => "coff",
dso_scheme => "win32",
shared_target => "cygwin-shared",
- shared_cflag => "-D_WINDLL -DOPENSSL_USE_APPLINK",
+ shared_cflag => add(" ", "-D_WINDLL"),
shared_ldflag => "-static-libgcc",
shared_rcflag => "--target=pe-i386",
shared_extension => ".dll",
@@ -1200,7 +1201,7 @@
perlasm_scheme => "mingw64",
dso_scheme => "win32",
shared_target => "cygwin-shared",
- shared_cflag => "-D_WINDLL",
+ shared_cflag => add(" ", "-D_WINDLL"),
shared_ldflag => "-static-libgcc",
shared_rcflag => "--target=pe-x86-64",
shared_extension => ".dll",