Skip to content

Commit b19fe71

Browse files
committed
Configure: add mechanism to specify uplink target architecture
As preparation for moving uplink file specs to build.info files, we must make sure there is still some base information to help select the correct files. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from openssl#9166)
1 parent 0ee7b9f commit b19fe71

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

Configurations/10-main.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,7 @@ my %targets = (
12801280
sys_id => "WIN64I",
12811281
bn_asm_src => sub { return undef unless @_;
12821282
my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; },
1283+
uplink_arch => 'ia64',
12831284
perlasm_scheme => "ias",
12841285
multilib => "-ia64",
12851286
},
@@ -1293,6 +1294,7 @@ my %targets = (
12931294
sys_id => "WIN64A",
12941295
bn_asm_src => sub { return undef unless @_;
12951296
my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
1297+
uplink_arch => 'x86_64',
12961298
perlasm_scheme => "auto",
12971299
multilib => "-x64",
12981300
},
@@ -1306,6 +1308,7 @@ my %targets = (
13061308
asflags => sub { vc_win32_info()->{asflags} },
13071309
sys_id => "WIN32",
13081310
bn_ops => add("BN_LLONG"),
1311+
uplink_arch => 'x86',
13091312
perlasm_scheme => sub { vc_win32_info()->{perlasm_scheme} },
13101313
# "WOW" stands for "Windows on Windows", and "VC-WOW" engages
13111314
# some installation path heuristics in windows-makefile.tmpl...
@@ -1387,15 +1390,16 @@ my %targets = (
13871390
cflags => "-m32",
13881391
sys_id => "MINGW32",
13891392
bn_ops => add("BN_LLONG"),
1393+
uplink_arch => 'x86',
13901394
perlasm_scheme => "coff",
13911395
shared_rcflag => "--target=pe-i386",
13921396
multilib => "",
13931397
},
13941398
"mingw64" => {
1395-
# As for OPENSSL_USE_APPLINK. Applink makes it possible to use
1399+
# As for uplink_arch. Applink makes it possible to use
13961400
# .dll compiled with one compiler with application compiled with
13971401
# another compiler. It's possible to engage Applink support in
1398-
# mingw64 build, but it's not done, because till mingw64
1402+
# mingw64 build, but it's not done, because until mingw64
13991403
# supports structured exception handling, one can't seriously
14001404
# consider its binaries for using with non-mingw64 run-time
14011405
# environment. And as mingw64 is always consistent with itself,
@@ -1404,6 +1408,7 @@ my %targets = (
14041408
cflags => "-m64",
14051409
sys_id => "MINGW64",
14061410
bn_ops => add("SIXTY_FOUR_BIT"),
1411+
uplink_arch => undef,
14071412
perlasm_scheme => "mingw64",
14081413
shared_rcflag => "--target=pe-x86-64",
14091414
multilib => "64",

Configurations/50-masm.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ my %targets = (
1818
sys_id => "WIN64A",
1919
bn_asm_src => sub { return undef unless @_;
2020
my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
21+
uplink_arch => 'x86_64',
2122
perlasm_scheme => "masm",
2223
},
2324
);

Configurations/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ In each table entry, the following keys are significant:
165165
that use dlopen() et al but do not have
166166
fcntl.h), "DL" (shl_load() et al), "WIN32"
167167
and "VMS".
168+
uplink_arch => The architecture to be used for compiling uplink
169+
source. This acts as a selector in build.info files.
170+
This is separate from asm_arch because it's compiled
171+
even when 'no-asm' is given, even though it contains
172+
assembler source.
168173
perlasm_scheme => The perlasm method used to create the
169174
assembler files used when compiling with
170175
assembler implementations.

Configure

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,10 @@ foreach my $feature (@{$target{enable}}) {
11351135
delete $disabled{$feature};
11361136
}
11371137
}
1138+
1139+
# If uplink_arch isn't defined, disable uplink
1140+
$disabled{uplink} = 'no uplink_arch' unless (defined $target{uplink_arch});
1141+
11381142
disable(); # Run a cascade now
11391143

11401144
$target{CXXFLAGS}//=$target{CFLAGS} if $target{CXX};

0 commit comments

Comments
 (0)